Google Drive Component
Manage files in Google Drive
Component key: google-drive
Description
Google Drive is Google's cloud storage for work and home. This component allows you to create, copy, download, update, list, and delete files stored in a Google Drive Account.
API Documentation
This component was built using the Google Drive API v3
Documentation for the Node.js client used in this component can be found at https://developers.google.com/drive/api/v3/quickstart/nodejs.
A common integration pattern involves listing files in a file store, and performing a series of actions on the array of files that are returned. See our looping over files quickstart for information about how to create a loop over an array of files.
Tracking Changes in Google Drive
To track changes within Google Drive, use the List Changes action. You can either run List Changes on a schedule with a schedule trigger (for example, check for changes every 5 minutes), or you can use Google Drive's change API to receive notifications in real time when changes occur.
For an example of how to use webhooks with Google Drive, import this example integration available on GitHub.
Connections
OAuth2
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
- A Google Developer account (sign up at https://console.cloud.google.com/)
Setup Steps
To create a Google Drive OAuth 2.0 app:
- Open the Google Drive API console at https://console.cloud.google.com/apis/api/drive.googleapis.com
- Click CREATE PROJECT to create a new GCP project, or select an existing project.
- Enable the Google Drive API for the project by clicking ENABLE.
- On the sidebar, select Credentials.
- 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.
- Choose a User Type of External so the app will be available to customers.
- Fill out the OAuth consent screen with an app name (company or product name), support email, app logo, domain, etc.
- Domains can be ignored for now.
- On the next page, add the scope
https://www.googleapis.com/auth/drive. - 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.
- Once the "Consent Screen" is configured, open the Credentials page from the sidebar again.
- Click +CREATE CREDENTIALS and select OAuth client ID.
- Under Application type select Web application.
- Under Authorized redirect URIs enter the OAuth 2.0 callback URL:
https://oauth2.prismatic.io/callback - Click CREATE.
- Copy the Client ID and Client Secret that are generated.
Make sure to publish the OAuth 2.0 app after testing so users outside of the test users can authorize the integration to interact with Google Drive on their behalf.
Configure the Connection
-
Enter the Client ID and Client Secret from the OAuth app credentials.
-
For Scopes, use the default Google Drive scope:
https://www.googleapis.com/auth/drive- Refer to Google's OAuth 2.0 Scopes for Google APIs for additional scope information.
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The Authorization URL for Google Drive. | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent |
| Client ID | The Client ID from the Google Cloud Console. Navigate to APIs & Services > Credentials to find this value. | 123456789012-abcdefghijklmnopqrstuvwxyz123456.apps.googleusercontent.com |
| Client Secret | The Client Secret from the Google Cloud Console. This value is shown when creating OAuth 2.0 credentials. | |
| Scopes | Space delimited listing of scopes. https://developers.google.com/identity/protocols/oauth2/scopes#drive | https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.activity.readonly |
| Token URL | The Token URL for Google Drive. | https://oauth2.googleapis.com/token |
Triggers
Drive Activity
Checks for Google Drive activity on a configured schedule. By default yields activity on personal 'My Drive'. For activity on a shared drive, specify a shared drive's folder's 'Folder ID'. | key: driveActivityPollingTrigger
| Input | Notes | Example |
|---|---|---|
| Folder or Drive ID | Return activities for this Drive or folder, plus all children and descendants. You may supply an array of drive or folder IDs. | 0ALiN8fRST0gxUk9PVA |
| Connection | The Connection to use for Google Drive authorization. | |
| Consolidation Strategy | Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated. | |
| File ID | Return activities for this Drive item. | 1a2b3c4d5e6f7g8h9i0j |
| Trigger Events | The event types the trigger will poll. |
{
"response": {
"statusCode": 200,
"contentType": "application/json"
},
"payload": {
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Host": "hooks.example.io",
"User-Agent": "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)",
"X-Amz-Cf-Id": "_K9KZtNN78sy1aygl3nJuQ4OoMh65STAsLFsPGENcnm_l68C112345==",
"X-Amzn-Trace-Id": "Root=1-64931762-5665c8324c471b204f212345",
"X-Goog-Channel-Expiration": "Wed, 21 Jun 2023 16:28:01 GMT",
"X-Goog-Channel-ID": "7f0419cf-5477-4bd5-bc86-2aa36af12345",
"X-Goog-Message-Number": "96035",
"X-Goog-Resource-ID": "jkkJZYhd8PPV6-Xto6QIo112345",
"X-Goog-Resource-State": "change",
"X-Goog-Resource-URI": "https://www.googleapis.com/drive/v3/changes?alt=json&pageToken=430&supportsAllDrives=true"
},
"queryParameters": null,
"rawBody": {
"data": null
},
"body": {
"data": [
{
"primaryActionDetail": {
"create": {
"upload": {}
}
},
"actors": [
{
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
}
],
"actions": [
{
"detail": {
"create": {
"upload": {}
}
}
}
],
"targets": [
{
"driveItem": {
"name": "items/1fs5xXnjTgQP6-p9LMXYX3_i9hjXl2Ump",
"title": "untitled text 3.csv",
"file": {},
"mimeType": "text/csv",
"owner": {
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
},
"driveFile": {}
}
}
],
"timestamp": "2025-03-11T15:58:37.276Z"
}
]
},
"pathFragment": "",
"webhookUrls": {
"Flow 1": "https://hooks.example.io/trigger/WEBHOOK_ID"
},
"webhookApiKeys": {
"Flow 1": [
"sample-api-key"
]
},
"invokeUrl": "https://hooks.example.io/trigger/WEBHOOK_ID",
"executionId": "SW5zdGFuY2VFeGVjdXRpb25SZXN1bHQ6MGRlZjk2ZjYtYzhhOS00MDgzLWJlOTUtZmIwZDMzNDQ12345",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "testInstanceId",
"name": "Test Instance"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "testIntegrationId",
"name": "Test Integration",
"versionSequenceId": "testVersionSequenceId",
"externalVersion": "testExternalVersion"
},
"flow": {
"id": "testFlowId",
"name": "Test Flow Name"
},
"startedAt": "yyyy-mm-dd",
"globalDebug": false
},
"polledNoChanges": false
}
New and Updated Files
Checks for new and updated files in a specified drive (or all drives, if omitted) on a configured schedule. | key: pollChangesTrigger
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
{
"response": {
"statusCode": 200,
"contentType": "application/json"
},
"payload": {
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Host": "hooks.example.io",
"User-Agent": "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)",
"X-Amz-Cf-Id": "_K9KZtNN78sy1aygl3nJuQ4OoMh65STAsLFsPGENcnm_l68C112345==",
"X-Amzn-Trace-Id": "Root=1-64931762-5665c8324c471b204f212345",
"X-Goog-Channel-Expiration": "Wed, 21 Jun 2023 16:28:01 GMT",
"X-Goog-Channel-ID": "7f0419cf-5477-4bd5-bc86-2aa36af12345",
"X-Goog-Message-Number": "96035",
"X-Goog-Resource-ID": "jkkJZYhd8PPV6-Xto6QIo112345",
"X-Goog-Resource-State": "change",
"X-Goog-Resource-URI": "https://www.googleapis.com/drive/v3/changes?alt=json&pageToken=430&supportsAllDrives=true"
},
"queryParameters": null,
"rawBody": {
"data": null
},
"body": {
"data": {
"kind": "drive#changeList",
"newStartPageToken": "247040",
"changes": [
{
"kind": "drive#change",
"removed": false,
"file": {
"kind": "drive#file",
"mimeType": "image/png",
"id": "14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"name": "example.png"
},
"fileId": "14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"time": "2022-09-20T21:36:23.687Z",
"type": "file",
"changeType": "file"
}
]
}
},
"pathFragment": "",
"webhookUrls": {
"Flow 1": "https://hooks.example.io/trigger/WEBHOOK_ID"
},
"webhookApiKeys": {
"Flow 1": [
"sample-api-key"
]
},
"invokeUrl": "https://hooks.example.io/trigger/WEBHOOK_ID",
"executionId": "SW5zdGFuY2VFeGVjdXRpb25SZXN1bHQ6MGRlZjk2ZjYtYzhhOS00MDgzLWJlOTUtZmIwZDMzNDQ12345",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "testInstanceId",
"name": "Test Instance"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "testIntegrationId",
"name": "Test Integration",
"versionSequenceId": "testVersionSequenceId",
"externalVersion": "testExternalVersion"
},
"flow": {
"id": "testFlowId",
"name": "Test Flow Name"
},
"startedAt": "yyyy-mm-dd",
"globalDebug": false
},
"instanceState": {
"testStepId": "testCursor"
},
"polledNoChanges": false
}
Push Notification Webhook
Receive and validate webhook requests from Google Drive for webhooks you configure. | key: pushNotificationWebhook
A Google Drive push notification can be configured to send information to a flow's webhook URL when changes occur to files and folders (file created, updated, deleted, etc.).
Google Drive push notifications allow applications to watch for changes to resources. When a watched resource changes, Google Drive sends a notification to the configured webhook endpoint.
To configure push notifications:
- Use a Google Drive action or the Google Drive API to create a watch request for a specific file or changes endpoint.
- Provide the webhook URL from the trigger as the notification address.
- Google Drive will send POST requests to the webhook URL when changes occur to the watched resources.
For a full list of notification types and watch options, refer to the Google Drive Push Notifications documentation.
{
"response": {
"statusCode": 200,
"contentType": "application/json"
},
"payload": {
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Host": "hooks.example.io",
"User-Agent": "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)",
"X-Amz-Cf-Id": "_K9KZtNN78sy1aygl3nJuQ4OoMh65STAsLFsPGENcnm_l68C112345==",
"X-Amzn-Trace-Id": "Root=1-64931762-5665c8324c471b204f212345",
"X-Goog-Channel-Expiration": "Wed, 21 Jun 2023 16:28:01 GMT",
"X-Goog-Channel-ID": "7f0419cf-5477-4bd5-bc86-2aa36af12345",
"X-Goog-Message-Number": "96035",
"X-Goog-Resource-ID": "jkkJZYhd8PPV6-Xto6QIo112345",
"X-Goog-Resource-State": "change",
"X-Goog-Resource-URI": "https://www.googleapis.com/drive/v3/changes?alt=json&pageToken=430&supportsAllDrives=true"
},
"queryParameters": null,
"rawBody": {
"data": null,
"contentType": "application/octet-stream"
},
"body": {
"data": null,
"contentType": "application/octet-stream"
},
"pathFragment": "",
"webhookUrls": {
"Flow 1": "https://hooks.example.io/trigger/WEBHOOK_ID"
},
"webhookApiKeys": {
"Flow 1": [
"sample-api-key"
]
},
"invokeUrl": "https://hooks.example.io/trigger/WEBHOOK_ID",
"executionId": "SW5zdGFuY2VFeGVjdXRpb25SZXN1bHQ6MGRlZjk2ZjYtYzhhOS00MDgzLWJlOTUtZmIwZDMzNDQ12345",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "testInstanceId",
"name": "Test Instance"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "testIntegrationId",
"name": "Test Integration",
"versionSequenceId": "testVersionSequenceId",
"externalVersion": "testExternalVersion"
},
"flow": {
"id": "testFlowId",
"name": "Test Flow Name"
},
"startedAt": "yyyy-mm-dd",
"globalDebug": false
}
}
Data Sources
List Files
Lists all available files | key: selectFiles | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Page Size | The maximum number of results to return. Must be between 1 and 50. | 20 |
| Query | A query string to filter results. See Google's documentation for query syntax. | name contains 'report' |
List Folders
Lists all available directories | key: selectFolder | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
Select Drive
Select a drive | key: selectDrive | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
Actions
Copy File
Copy a file by file id | key: copyFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
| File Name | The name of the file. | My Document.pdf |
| Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
{
"data": {
"name": "example",
"description": "example"
}
}
Create File
Create a new file with content and metadata | key: createFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| File Content | The binary or text body of the file. Some content examples you can store in Google Drive are images, videos, text, and PDF. | My Example File Contents |
| File Name | The name of the file. | My Document.pdf |
| Parent Folder Id | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
{
"data": {
"kind": "drive#file",
"id": "id_example",
"name": "example",
"mimeType": "example",
"description": "example"
}
}
Create Folder
Create a directory file | key: createFolder
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Folder Name | The name of the folder. | Pictures |
| Parent Folder Id | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
{
"data": {
"name": "example",
"description": "example"
}
}
Create Webhook for Drive
Create a webhook to receive notifications of changes with a Google Drive | key: createDriveWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Endpoint | The URL where webhook notifications will be sent. | https://your-webhook-endpoint.com/webhook/abc123 |
| Expiration Time | The 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. | 1426325213000 |
Create Webhook for File or Folder
Create a webhook to receive notifications of changes for a file or folder | key: createFileWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Endpoint | The URL where webhook notifications will be sent. | https://your-webhook-endpoint.com/webhook/abc123 |
| Expiration Time | The 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. | 1426325213000 |
| File or Folder ID | ret08u3rv24htgh289g |
Delete File
Delete a file by file id | key: deleteFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
Delete Webhook
Stop a webhook channel from sending notifications | key: deleteWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Resource ID | Returned when you create a webhook | ret08u3rv24htgh289g |
| Webhook ID | Returned when you create a webhook | 00000000-0000-0000-0000-000000000000 |
Empty Trash
Empty the trash of deleted files | key: emptyTrash
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
Get About
Gets information about the user's Drive, and system capabilities | key: getAbout
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
{
"data": {
"user": {
"displayName": "example",
"emailAddress": "example@email.com",
"kind": "example"
}
}
}
Get Current User
Get the information and metadata of the user that is currently logged in | key: getCurrentUser
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
{
"data": {
"kind": "drive#user",
"displayName": "Example User",
"photoLink": "https://lh3.googleusercontent.com/a/Example",
"me": true,
"permissionId": "12345678901234567890",
"emailAddress": "example@gmail.com"
}
}
Get File
Gets a file's metadata and content by ID. | key: getFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Preferred Export Type | The MIME type to export the file as. If not compatible, the first available export type will be used. Only required for non-binary files. | application/pdf |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
{
"data": {
"type": "Buffer",
"data": [
101,
120,
97,
109,
112,
108,
101
]
},
"contentType": "application/octet"
}
Get File Metadata
Gets a file's metadata and content by ID. | key: getFileMetadata
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType,thumbnailLink |
{
"data": {
"id": "1t_RTuXpBgBEEC1TfZILWJJSBr2gilSFTyhDO_6RwSBs",
"name": "Fountain AX <> ADP WFN Marketplace Mapping",
"mimeType": "application/vnd.google-apps.spreadsheet",
"thumbnailLink": "https://lh3.googleusercontent.com/drive-storage/AJQWtBNQ460KV9YNsFDL_x3WQq6D019SkKdIUuWzGO2YKBSiLOfmFtlunKSyC02yi7bycbMN_n2DB1k7OJ5akXI6ZrQ0s0y6qHOaaTrOJyis6EeSsEnJMrFOeNzzn3jo0kg=s220"
}
}
List Changes
List changes made to files in your Google Drive since the last time this step ran (up to 1000) | key: listChanges
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
The first time this action runs, it takes note of the current pageToken returned by Google, and returns no changes.
Subsequent runs of this step use that pageToken to determine what has changed since the last time this step ran.
{
"data": {
"kind": "drive#changeList",
"newStartPageToken": "247040",
"changes": [
{
"kind": "drive#change",
"removed": false,
"file": {
"kind": "drive#file",
"mimeType": "image/png",
"id": "14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"name": "example.png"
},
"fileId": "14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"time": "2022-09-20T21:36:23.687Z",
"type": "file",
"changeType": "file"
}
]
},
"instanceState": {
"example-step-id": "example-new-page-token"
}
}
List Drives
List all drives | key: listDrives
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
List File's Export Types
List the available export types of a file by ID. | key: listExportTypes
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
{
"data": [
"application/x-vnd.oasis.opendocument.spreadsheet",
"text/tab-separated-values",
"application/pdf",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"text/csv",
"application/zip",
"application/vnd.oasis.opendocument.spreadsheet"
]
}
List Files
Lists all available files and directories | key: listFiles
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| Page Size | The maximum number of results to return. Must be between 1 and 50. | 20 |
| Page Token | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
| Query | A query string to filter results. See Google's documentation for query syntax. | name contains 'report' |
{
"data": {
"files": [
{
"name": "example",
"description": "example"
}
]
}
}
List Folders
Lists all available directories | key: listFolders
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Page Size | The maximum number of results to return. Must be between 1 and 50. | 20 |
| Page Token | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
{
"data": {
"files": [
{
"name": "example",
"description": "example"
}
]
}
}
Move File
Move a file by file ID | key: moveFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
| Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
{
"data": {
"name": "example",
"description": "example"
}
}
Query Drive Activity
Query past activity in Google Drive. | key: queryDriveActivity
| Input | Notes | Example |
|---|---|---|
| Folder or Drive ID | Return activities for this Drive or folder, plus all children and descendants. | 0ALiN8fRST0gxUk9PVA |
| Connection | The Connection to use for Google Drive authorization. | |
| Consolidation Strategy | Details on how to consolidate related actions that make up the activity. If not set, then related actions aren't consolidated. | |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Filter | The filtering for items returned from this query request. | time > 1452409200000 AND time <= 1492812924310 |
| File ID | Return activities for this Drive item. | 1a2b3c4d5e6f7g8h9i0j |
| Page Token | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
{
"data": {
"activities": [
{
"primaryActionDetail": {
"create": {
"upload": {}
}
},
"actors": [
{
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
}
],
"actions": [
{
"detail": {
"create": {
"upload": {}
}
}
}
],
"targets": [
{
"driveItem": {
"name": "items/1fs5xXnjTgQP6-p9LMXYX3_i9hjXl2Ump",
"title": "untitled text 3.csv",
"file": {},
"mimeType": "text/csv",
"owner": {
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
},
"driveFile": {}
}
}
],
"timestamp": "2025-03-11T15:58:37.276Z"
}
],
"nextPageToken": "CoUBADFn3tFqHUj7yCuV1klvj0yytkQy7+pfLdrj1eepGfjkD3FB5tGKr3KfLViTU1NXF2EPzJADxALt8O7M1rC98LjHnv9YG6Sl5sxU8F7UOYI1nzzpXhFNaxmAnNmlzBbdRHKt33n2KeX/wKd8uvLETNydZ/9SEYYRlB2aIqzTf41Cp2CUvxIMEgppdGVtcy9yb290GoUBADFn3tFN3fZknT3aMUZoAhEoqOy0S2eimkjEsCV1+t01uERxyQKMsgS5Zn9cSJOzDIj2BR7jkbfIQeDbBLgMhjrtaVaAMppVhBOdQKtn9+u5CKE1JNIuVXREsrEago3Bbd77pDvQJNYTIeW0P+NYbPPP7oRCWTbBZ9soopmJnkyjUX/m5A=="
}
}
Raw Request
Send raw HTTP request to Google Drive | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A 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. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If 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 |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input 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. | /files |
| Use Exponential Backoff | Specifies 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 | key: searchFiles
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| Files Containing Search Query | When true, searches for files that contain the provided search query in their name. | false |
| Parent Folder Id | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Page Size | The maximum number of results to return. Must be between 1 and 50. | 20 |
| Page Token | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
| Query | A query string to filter results. See Google's documentation for query syntax. | name contains 'report' |
| Search | Search terms to filter results. | quarterly report 2024 |
Search Folders
Search for an existing directory by Name | key: searchFolders
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Drive ID | The 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". | 0AAvGyortvuqEXAMPLE |
| Fetch All | When true, fetches all pages of results using pagination. | false |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| Parent Folder Id | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Page Size | The maximum number of results to return. Must be between 1 and 50. | 20 |
| Page Token | Specify the pagination token that's returned by a previous request to retrieve the next page of results | lslTXFcbLQKkb0vP9Kgh5hy0Y0OnC7Z9ZPHPwPmMnxSk3eiDRMkct7D8E |
| Search | Search terms to filter results. | quarterly report 2024 |
{
"data": {
"files": [
{
"name": "example",
"description": "example"
}
]
}
}
Update File
Updates a file's content by file id | key: updateFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Fields | A comma separated list of fields to return in the response. | id,name,mimeType |
| File Content | The binary or text body of the file. Some content examples you can store in Google Drive are images, videos, text, and PDF. | My Example File Contents |
| File ID | A unique opaque ID for each file. File IDs are stable throughout the life of the file, even if the file name changes. | 1a2b3c4d5e6f7g8h9i0j |
| File Name | The name of the file. | My Document.pdf |
{
"data": {
"kind": "drive#file",
"id": "id_example",
"name": "example",
"mimeType": "example",
"description": "example"
}
}
Changelog
2025-11-19
Enhanced Search Files and Search Folders actions with shared drive support and improved query handling
2025-11-17
Enhanced list and search capabilities with automatic pagination:
- Added Fetch All option to List Files, List Folders, Search Files, Search Folders, and List Drives actions to automatically retrieve all results across multiple pages
- Improved Raw Request action to respect global debug settings for enhanced troubleshooting
2025-09-19
Enhanced Get File action to better handle larger file downloads with improved performance and memory optimization
2025-05-05
Enhanced Drive Activity trigger to watch multiple folders for improved monitoring capabilities