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:
- Sign in to your Google account to access your account
- Visit the Google Developer Console by navigating to it
- Create a new project by starting one or selecting an existing one
- Enable the Google Drive API within your project
- Create API credentials for your project to receive a client ID and client secret
- Configure the OAuth consent screen with the necessary details
- Specify the redirect URIs where users will be redirected after authentication when configuring Redirect URIs
- Specify the scopes required for your use-case
- 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.
- In the web app, navigate to the Integrations page
- Click on the Google Drive tile
- Name the integration
- Paste your credentials into the relevant fields
- Optionally, add more configurations to set credentials for different environments
- Click Create
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 calling Google Drive actions in Superblocks APIs.
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.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.
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.