Skip to main content

Google Drive Connector

Google Drive Google Drive is Google's cloud storage for work and home. This component allows creating, copying, downloading, updating, listing, and deleting files stored in a Google Drive account.

API Documentation​

This component was built using the Google Drive API v3

Connections​

OAuth2​

OAuth2 Connection

The Google Drive component authenticates requests through the Google Cloud Platform (GCP) OAuth 2.0 service. A GCP OAuth 2.0 app is required for the integration to authenticate and perform Google Drive tasks on behalf of users.

Prerequisites​

Setup Steps​

To create a Google Drive OAuth 2.0 app:

  1. Open the Google Drive API console at https://console.cloud.google.com/apis/api/drive.googleapis.com
  2. Click CREATE PROJECT to create a new GCP project, or select an existing project.
  3. Enable the Google Drive API for the project by clicking ENABLE.
  4. On the sidebar, select Credentials.
  5. Configure the OAuth 2.0 Consent Screen (the page that asks "Do you want to allow (Your Company) to access Google Drive on your behalf?"). Click CONFIGURE CONSENT SCREEN.
    1. Choose a User Type of External so the app will be available to customers.
    2. Fill out the OAuth consent screen with an app name (company or product name), support email, app logo, domain, etc.
    3. Domains can be ignored for now.
    4. On the next page, add the scope https://www.googleapis.com/auth/drive.
    5. Enter some test users for testing purposes. The app will only work for those testing users until it is "verified" by Google. When ready for verification (Google verifies privacy policy statement, etc), click PUBLISH APP on the OAuth consent screen. This will allow customers to authorize the integration to access their Google Drive.
  6. Once the "Consent Screen" is configured, open the Credentials page from the sidebar again.
  7. Click +CREATE CREDENTIALS and select OAuth client ID.
    1. Under Application type select Web application.
    2. Under Authorized redirect URIs enter the OAuth 2.0 callback URL: https://oauth2.integrations.acme.com/callback
    3. Click CREATE.
  8. Copy the Client ID and Client Secret that are generated.

Configure the Connection​

App Verification​

Google requires OAuth apps that request access to user data to pass a verification review before being deployed at scale. This process ensures the app complies with Google's API Services User Data Policy, accurately represents its functionality, and handles user data responsibly.

Google OAuth apps pass through three stages before they are ready for production use.

Testing (unpublished): The app is only accessible to users manually added as test users in the OAuth consent screen. Up to 100 test users are allowed. All other users receive an error. This is the expected state during initial development.

Published, unverified: After publishing the app, all Google users can authenticate. However, for restricted scopes, users see a "This app isn't verified" warning. Users can proceed by clicking Advanced → Go to [app name] (unsafe), but this warning reduces trust and may be blocked by organizations with strict Google Workspace policies.

Verified: Google has reviewed and approved the app. No warning is shown. Verification is required before deploying to production users.

Publishing the App​

Publishing is required before any users outside the test list can authenticate:

  1. In the Google Cloud Console, navigate to APIs & Services → OAuth consent screen
  2. Click PUBLISH APP and confirm

Requesting Verification​

This component uses restricted scopes (https://www.googleapis.com/auth/drive). Restricted scopes require a security assessment in addition to standard sensitive scope verification:

  1. On the OAuth consent screen, click Prepare for verification
  2. Provide a privacy policy URL, authorized domain, and app logo
  3. Arrange a security assessment with a Google-approved assessor. This is required for restricted scopes.
  4. Submit for review. Restricted scope reviews can take longer than sensitive scope reviews.

Refer to Google's OAuth consent screen documentation for the full verification requirements.

This connection uses OAuth 2.0, a common authentication mechanism for integrations. Read about how OAuth 2.0 works here.

InputCommentsDefault
ScopesSpace delimited listing of scopes. https://developers.google.com/identity/protocols/oauth2/scopes#drivehttps://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.activity.readonly
Client IDThe Client ID from the Google Cloud Console. Navigate to APIs & Services > Credentials to find this value.
Client SecretThe Client Secret from the Google Cloud Console. This value is shown when creating OAuth 2.0 credentials.

Triggers​

Drive Activity​

Retrieves existing and ongoing Google Drive activity. Load history once, check for activity on a schedule, or both. By default yields activity on personal 'My Drive'. For activity on a shared drive, specify a shared drive's folder's 'Folder ID'.

InputCommentsDefault
Trigger EventsThe event types the trigger will poll.
File IDReturn activities for this Drive item.
Folder or Drive IDReturn activities for this Drive or folder, plus all children and descendants. You may supply an array of drive or folder IDs.
Consolidation StrategyDetails on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated.
Look-back DateThe date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each file modified on or after this date once, then hands off to incremental polling.
ConnectionThe Connection to use for Google Drive authorization.

New and Updated Files​

Retrieves existing and ongoing files for a specified Google Drive, or all drives if omitted. Load history once, check for changes on a schedule, or both.

InputCommentsDefault
Look-back DateThe date the initial sync starts from, in YYYY-MM-DD format. Cannot be a future date. Leave empty to start from the first recurrence with no backfill. When set, the initial sync seeds each file modified on or after this date once, then hands off to incremental polling.
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".

Push Notification Webhook​

Receive and validate webhook requests from Google Drive for webhooks you configure.

Actions​

Copy File​

Copy a file by file id

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
File NameThe name of the file.
Folder IDA unique opaque ID for each folder.

Create File​

Create a new file with content and metadata

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Parent Folder IDA unique opaque ID for each folder.
File ContentThe binary or text body of the file. Images, videos, text, and PDF files can be stored in Google Drive.
File NameThe name of the file.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*

Create Folder​

Create a directory file

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Folder NameThe name of the folder.
Parent Folder IDA unique opaque ID for each folder.

Create Webhook for Drive​

Create a webhook to receive notifications of changes with a Google Drive

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".
EndpointThe URL where webhook notifications will be sent.
Expiration TimeThe time at which the webhook will expire as a UNIX timestamp in milliseconds. Defaults to 1 hour from now, and can be set to a maximum of 1 day from now.

Create Webhook for File or Folder​

Create a webhook to receive notifications of changes for a file or folder

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File or Folder IDThe unique identifier of the file or folder to watch for changes.
EndpointThe URL where webhook notifications will be sent.
Expiration TimeThe time at which the webhook will expire as a UNIX timestamp in milliseconds. Defaults to 1 hour from now, and can be set to a maximum of 1 day from now.

Delete File​

Delete a file by file id

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*

Delete Webhook​

Stop a webhook channel from sending notifications

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Webhook IDThe channel ID returned when the webhook was created.
Resource IDThe resource ID returned when the webhook was created.

Empty Trash​

Empty the trash of deleted files

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.

Get About​

Gets information about the user's Drive and system capabilities

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*

Get Current User​

Get the information and metadata of the user that is currently logged in

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.

Get File​

Gets a file's metadata and content by ID.

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
Preferred Export TypeThe MIME type to export the file as. If not compatible, the first available export type will be used. Only required for non-binary files.

Get File Metadata​

Gets a file's metadata by ID.

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
FieldsA comma separated list of fields to return in the response.

List Changes​

List changes made to files in Google Drive since the last time this step ran (up to 1000)

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".

List Drives​

List all drives

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.

List Files​

Lists all available files and directories

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".
Fetch AllWhen true, automatically fetches all pages of results using pagination.false
PaginationPage-size and page-token controls for paging through results.
Page SizeThe maximum number of results to return. Must be between 1 and 1000.20
Page TokenSpecify the pagination token that's returned by a previous request to retrieve the next page of results
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*
QueryA query string to filter results. See Google's documentation for query syntax.

List File's Export Types​

List the available export types of a file by ID.

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.

List Folders​

Lists all available directories

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".
Fetch AllWhen true, automatically fetches all pages of results using pagination.false
PaginationPage-size and page-token controls for paging through results.
Page SizeThe maximum number of results to return. Must be between 1 and 1000.20
Page TokenSpecify the pagination token that's returned by a previous request to retrieve the next page of results
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*
Folder IDA unique opaque ID for each folder.

Move File​

Move a file by file ID

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
Folder IDA unique opaque ID for each folder.

Query Drive Activity​

Query past activity in Google Drive.

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDReturn activities for this Drive item.
Folder or Drive IDReturn activities for this Drive or folder, plus all children and descendants.
Fetch AllWhen true, automatically fetches all pages of results using pagination.false
Page TokenSpecify the pagination token that's returned by a previous request to retrieve the next page of results
FilterThe filtering for items returned from this query request.
Consolidation StrategyDetails on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated.

Raw Request​

Send raw HTTP request to Google Drive

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
URLInput the path only (/files), The base URL is already included (https://www.googleapis.com/drive/v3). For example, to connect to https://www.googleapis.com/drive/v3/files, only /files is entered in this field.
MethodThe HTTP method to use.
DataThe HTTP body payload to send to the URL.
Form DataThe Form Data to be sent as a multipart form upload.
File DataFile Data to be sent as a multipart form upload.
File Data File NamesFile names to apply to the file data inputs. Keys must match the file data keys above.
Query ParameterA list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2.
HeaderA list of headers to send with the request.
Response TypeThe type of data you expect in the response. You can request json, text, or binary data.json
TimeoutThe maximum time that a client will await a response to its request
Retry Delay (ms)The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled.0
Retry On All ErrorsIf true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors.false
Max Retry CountThe maximum number of retries to attempt. Specify 0 for no retries.0
Use Exponential BackoffSpecifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored.false

Search Files​

Search for an existing file by Name

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".
FiltersOptional query controls to sort and refine the results.
SearchSearch terms to filter results.
Files Containing Search QueryWhen true, searches for files that contain the provided search query in their name.false
QueryA query string to filter results. See Google's documentation for query syntax.
Parent Folder IDA unique opaque ID for each folder.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*
Fetch AllWhen true, automatically fetches all pages of results using pagination.false
PaginationPage-size and page-token controls for paging through results.
Page SizeThe maximum number of results to return. Must be between 1 and 1000.20
Page TokenSpecify the pagination token that's returned by a previous request to retrieve the next page of results

Search Folders​

Search for an existing directory by Name

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
Drive IDThe ID of a shared drive to search for the file in. If not provided, the search will be performed across all drives. Enter 'my-drive' to search only "My Drive".
SearchSearch terms to filter results.
Parent Folder IDA unique opaque ID for each folder.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*
Fetch AllWhen true, automatically fetches all pages of results using pagination.false
PaginationPage-size and page-token controls for paging through results.
Page SizeThe maximum number of results to return. Must be between 1 and 1000.20
Page TokenSpecify the pagination token that's returned by a previous request to retrieve the next page of results

Update File​

Updates a file's content by file id

InputCommentsDefault
ConnectionThe Connection to use for Google Drive authorization.
File IDA unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes.
File ContentThe binary or text body of the file. Images, videos, text, and PDF files can be stored in Google Drive.
File NameThe name of the file.
FieldsFields to return in the response. For list operations, wrap field names in files(), e.g., files(id,name,mimeType). If unspecified, returns all fields. See Google's fields parameter documentation.*