Google Cloud

The Google Cloud Platform

Go to site

Integrate the Google Cloud API with the Google Drive API

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

Upload File to Folder by File Path

Allows you to upload a file previously-saved to the /tmp directory, by passing in the path to that file

 
Try it
Upload File by URL

Upload a file to Google Drive by URL

 
Try it
Get Files

Gets or searches files.

 
Try it
Create a folder
 
Try it
Create File

Creates a new file.

 
Try it

Connect Google Cloud

// Required workaround to get the @google-cloud/storage package
// working correctly on Pipedream
require("@dylburger/umask")()

const { Storage } = require('@google-cloud/storage')

const key = JSON.parse(auths.google_cloud.key_json)
 
// Creates a client from a Google service account key.
// See https://cloud.google.com/nodejs/docs/reference/storage/1.6.x/global#ClientConfig
const storage = new Storage({
  projectId: key.project_id,
  credentials: {
    client_email: key.client_email,
    private_key: key.private_key,
  }
})

// Uncomment this section and rename for your bucket before running this code
// const bucketName = 'pipedream-test-bucket';

await storage.createBucket(bucketName)
console.log(`Bucket ${bucketName} created.`)

Connect Google Drive

return await require("@pipedreamhq/platform").axios(this, {
  url: `https://www.googleapis.com/oauth2/v1/userinfo`,
  headers: {
    Authorization: `Bearer ${auths.google_drive.oauth_access_token}`,
  },
})