Skip to main content
Google Drive logo

Google Drive

Overview

Integrate Google Drive with Superblocks to seamlessly combine cloud storage with powerful file management. Connect with Google Drive's API to create custom workflows, automate file-related tasks, synchronize data across applications, and enhance your file management capabilities.

Setting up Google Drive

Create an access token

To begin using Google Drive's API, you'll need to set up and configure your integration:

  1. Sign in to your Google account to access your account
  2. Visit the Google Developer Console by navigating to it
  3. Create a new project by starting one or selecting an existing one
  4. Enable the Google Drive API within your project
  5. Create API credentials for your project to receive a client ID and client secret
  6. Configure the OAuth consent screen with the necessary details
  7. Specify the redirect URIs where users will be redirected after authentication when configuring Redirect URIs
  8. Specify the scopes required for your use-case
  9. Login with your Google Account on the integrations page if you want to use one account for all end-users

Learn more about Google Drive API Authentication.

Add integration

Once you have an access token, you're ready to set up your Superblocks integration.

  1. In the web app, navigate to the Integrations page
  2. Click on the Google Drive tile
  3. Name the integration
  4. Paste your credentials into the relevant fields
  5. Optionally, add more configurations to set credentials for different environments
  6. Click Create
success

Google Drive connected Now you can use Google Drive in any Application, Workflow, or Scheduled Job.

Use Google Drive in APIs

Once your Google Drive integration is created, you can start creating steps in Application backend APIs, Workflows, and Scheduled Jobs to call Google Drive API actions. Google Drive actions are REST requests. To learn more about REST requests in Superblocks, see the Building REST requests guide.

Supported actions

Get about information

Gets information about the user, the user's Drive, and system capabilities.

List changes

Lists the changes for a user or shared drive.

Get starting pageToken

Gets the starting pageToken for listing future changes.

Subscribe to changes

Subscribes to changes for a user.

Stop watching resources

Stops watching resources through this channel.

List shared drives

Lists the user's shared drives. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for shared drives](/drive/api/guides/search-shareddrives) guide.

Create a shared drive

Creates a shared drive.

Get a shared drive's metadata

Gets a shared drive's metadata by ID.

Update a shared drive's metadata

Updates the metadata for a shared drive.

Delete a shared drive

Permanently deletes a shared drive for which the user is an `organizer`. The shared drive cannot contain any untrashed items.

Hide a shared drive

Hides a shared drive from the default view.

Restore a shared drive

Restores a shared drive to the default view.

List files

Lists the user's files. This method accepts the `q` parameter, which is a search query combining one or more search terms. For more information, see the [Search for files & folders](/drive/api/guides/search-files) guide. *Note:* This method returns *all* files by default, including trashed files. If you don't want trashed files to appear in the list, use the `trashed=false` query parameter to remove trashed files from the results.

Create a file

Creates a new file. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](/drive/api/guides/manage-uploads). Apps creating shortcuts with `files.create` must specify the MIME type `application/vnd.google-apps.shortcut`. Apps should specify a file extension in the `name` property when inserting files with the API. For example, an operation to insert a JPEG file should specify something like `"name": "cat.jpg"` in the metadata. Subsequent `GET` requests include the read-only `fileExtension` property populated with the extension originally specified in the `title` property. When a Google Drive user requests to download a file, or when the file is downloaded through the sync client, Drive builds a full filename (with extension) based on the title. In cases where the extension is missing, Drive attempts to determine the extension based on the file's MIME type.

Generate a set of file IDs

Generates a set of file IDs which can be provided in create or copy requests.

Delete all trashed files

Permanently deletes all of the user's trashed files.

Get a file's metadata

Gets a file's metadata or content by ID. If you provide the URL parameter `alt=media`, then the response includes the file contents in the response body. Downloading content with `alt=media` only works if the file is stored in Drive. To download Google Docs, Sheets, and Slides use [`files.export`](/drive/api/reference/rest/v3/files/export) instead. For more information, see [Download & export files](/drive/api/guides/manage-downloads).

Update a file's metadata

Updates a file's metadata and/or content. When calling this method, only populate fields in the request that you want to modify. When updating fields, some fields might be changed automatically, such as `modifiedDate`. This method supports patch semantics. This method supports an */upload* URI and accepts uploaded media with the following characteristics: - *Maximum file size:* 5,120 GB - *Accepted Media MIME types:*`*/*` Note: Specify a valid MIME type, rather than the literal `*/*` value. The literal `*/*` is only used to indicate that any valid MIME type can be uploaded. For more information on uploading files, see [Upload file data](/drive/api/guides/manage-uploads).

Delete a file

Permanently deletes a file owned by the user without moving it to the trash. If the file belongs to a shared drive, the user must be an `organizer` on the parent folder. If the target is a folder, all descendants owned by the user are also deleted.

List a file's comments

Lists a file's comments.

Create a comment on a file

Creates a comment on a file.

Get a comment

Gets a comment by ID.

Update a comment

Updates a comment with patch semantics.

Delete a comment

Deletes a comment.

List a comment's replies

Lists a comment's replies.

Create a reply to a comment

Creates a reply to a comment.

Get a reply

Gets a reply by ID.

Update a reply

Updates a reply with patch semantics.

Delete a reply

Deletes a reply.

Create a copy of a file

Creates a copy of a file and applies any requested updates with patch semantics.

Export a document

Exports a Google Workspace document to the requested MIME type and returns exported byte content. Note that the exported content is limited to 10MB.

List the labels on a file

Lists the labels on a file.

Modify labels of a file

Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified.

List permissions

Lists a file's or shared drive's permissions.

Create permissions

Creates a permission for a file or shared drive. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.

Get a permission

Gets a permission by ID.

Update a permission

Updates a permission with patch semantics. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.

Delete a permission

Deletes a permission. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.

List a file's revisions

Lists a file's revisions.

Get a revision

Gets a revision's metadata or content by ID.

Update a revision

Updates a revision with patch semantics.

Delete a file version

Permanently deletes a file version. You can only delete revisions for files with binary content in Google Drive, like images or videos. Revisions for other files, like Google Docs or Sheets, and the last remaining file version can't be deleted.

Subscribe to changes to a file

Subscribes to changes to a file.
and 28 more

Generic HTTP Request

Every SaaS integration in Superblocks comes with a built in Generic HTTP Request Action. This is a powerful action you can use to call Google Drive API endpoints not in the Superblocks supported actions.

To use this action simply add the method, path, required query parameters, and body for the desired endpoint.

info

Learn more about REST requests in Superblocks in our Building REST requests guide.

Generic HTTP Requests use the authentication set up and base URL you've configured for your integration, making it an easy for your team to extend Superblocks Integrations to meet their needs.