Node

Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.

Go to site

Integrate the Node API with the Google Drive API

Setup the Node API trigger to run a workflow which integrates with the Google Drive API. Pipedream's integration platform allows you to integrate Node and Google Drive remarkably fast. Free for developers.

Connect Node

// To use previous step data, pass the `steps` object to the run() function
export default defineComponent({
  async run({ steps, $ }) {
    // Return data to use it in future steps
    return steps.trigger.event
  },
})

Connect Google Drive

import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    google_drive: {
      type: "app",
      app: "google_drive",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://www.googleapis.com/oauth2/v1/userinfo`,
      headers: {
        Authorization: `Bearer ${this.google_drive.$auth.oauth_access_token}`,
      },
    })
  },
})