Google Drive Connector
Description
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
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. Either run List Changes on a schedule with a schedule trigger (for example, check for changes every 5 minutes), or 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
key: oauth2The 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.
Configure the Connection
-
Enter the Client ID and Client Secret from the OAuth app credentials.
-
For Scopes, use the default Google Drive scopes:
https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.activity.readonly- Refer to Google's OAuth 2.0 Scopes for Google APIs for additional scope information.
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:
- In the Google Cloud Console, navigate to APIs & Services → OAuth consent screen
- 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:
- On the OAuth consent screen, click Prepare for verification
- Provide a privacy policy URL, authorized domain, and app logo
- Arrange a security assessment with a Google-approved assessor. This is required for restricted scopes.
- 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.
| 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
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'. | 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 |
| Look-back Date | The 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. | 2026-01-01 |
| Trigger Events | The event types the trigger will poll. |
The Drive Activity trigger reports activity recorded in Google Drive on a scheduled basis: uploads, edits, comments, renames, moves, permission changes and more. Load history once with a Look-back Date, check for activity on a schedule, or both. By default it yields activity on the personal "My Drive"; to follow a shared drive, supply that drive's folder under Folder or Drive ID.
How It Works
On each recurrence the trigger queries the Drive Activity API for activity recorded after its stored position, once per entry in Folder or Drive ID, and stores the time the recurrence began as its new position. Selecting Trigger Events narrows the query to those action types; leaving it empty returns every type.
Because the position stored is the time the recurrence began rather than the time it finished, activity recorded while a recurrence was running is reported again by the next one instead of being skipped.
The first recurrence
- Look-back Date empty: the window opens at the current instant, so the first recurrence reports nothing. Incremental polling begins on the next recurrence.
- Look-back Date set: the trigger begins a one-time initial sync covering every activity recorded on or after that date, seeding each one exactly once. With batching enabled the sync finishes within this recurrence; without batching it is a single wider query on this recurrence.
During an initial sync
No input is ignored. A sync is the same query the trigger always runs, with its window opened wider, so every input that shapes that query still applies: Folder or Drive ID, File ID, Trigger Events and Consolidation Strategy all scope and filter a sync exactly as they scope an ordinary recurrence.
The consequence is worth stating plainly: a sync narrowed by Trigger Events seeds only those action types. Widen the selection before the first recurrence if the starting state should cover everything.
Batching
Batching is enabled per flow on this trigger: each changed record is dispatched as its own execution, or grouped by the configured batch size. Batch size and batch concurrency can both be overridden per instance. Raising concurrency increases the request volume sent to Google Drive.
To turn it on, select the flow's trigger, open the Flow control tab, and switch on Enable Batching. Under Batch Size, keep Trigger default or choose Custom batch size. Batch Concurrency is optional; leave it blank to keep the limit this trigger ships with.
Enabling batching also changes how the trigger reads. With batching off it reads every page of every entry in Folder or Drive ID within one recurrence; with batching on it reads one page of one entry per round and drains the rest inside the same recurrence, advancing through the list in order.
Enabling batching changes the payload a downstream step receives. With batching off a step reads data as an array of activities; with batching on data is a single activity, or an array of them when the batch size is larger than 1 (see Returned Data). Any step iterating the older shape must be updated before batching is turned on. Because batching is per flow, this affects only that flow, not the component or other flows using the same trigger.
Handing off to the schedule
On deploy, the trigger performs a one-time initial sync starting from the Look-back Date. Once that sync finishes, it records the position it reached, and the first scheduled poll resumes from there instead of covering the same history again. If the sync does not finish, nothing is recorded, and the first scheduled poll covers the window again from the Look-back Date; that yields duplicates rather than a gap, which is deliberate: re-delivering an activity is recoverable, missing one is not. The sync runs once per instance rather than once per deploy, so redeploying an instance that already completed it does not repeat it. With the Look-back Date left empty there is no initial sync at all, which is the documented no-backfill behavior.
The window's upper bound is fixed when the recurrence begins and every round of a drain asks about that same window, so a drain spanning several minutes does not shift underneath itself. The trigger stores that bound as its position only once every entry in Folder or Drive ID has been exhausted, so an interrupted drain resumes its whole window rather than skipping the part it had not dispatched. No field in the payload marks the handoff.
Returned Data
What arrives in data depends on whether batching is enabled on the flow. Fields shown are representative. The full response object includes additional properties.
Each activity carries primaryActionDetail describing what happened, actors identifying who did it, actions listing the individual actions consolidated into it, targets naming the affected Drive items, and timestamp.
Without batching, data is an array of every activity found across all entries in Folder or Drive ID for this recurrence.
Example Payload: batching disabled
{
"data": [
{
"primaryActionDetail": { "create": { "upload": {} } },
"actors": [
{
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
}
],
"actions": [{ "detail": { "create": { "upload": {} } } }],
"targets": [
{
"driveItem": {
"name": "items/14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"title": "example.png"
}
}
],
"timestamp": "2025-03-11T15:58:37.276Z"
}
]
}
With batching, the array is unwrapped. data is one activity when the batch size is 1, or an array of activities when it is larger.
Example Payload: batching enabled, batch size 1
{
"data": {
"primaryActionDetail": { "create": { "upload": {} } },
"actors": [
{
"user": {
"knownUser": {
"personName": "people/114118080512406438242",
"isCurrentUser": true
}
}
}
],
"actions": [{ "detail": { "create": { "upload": {} } } }],
"targets": [
{
"driveItem": {
"name": "items/14FSE_ESVGWta4XlzWGHVm0VultNS-1uO",
"title": "example.png"
}
}
],
"timestamp": "2025-03-11T15:58:37.276Z"
}
}
Example Payload for Drive Activity⤓
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. | 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 |
| Look-back Date | The 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. | 2026-01-01 |
The New and Updated Files trigger reports files that were created or changed in a drive on a scheduled basis. Load history once with a Look-back Date, check for changes on a schedule, or both. It tracks its position with a Google-issued change token rather than a timestamp, so it reports exactly what Google recorded as changed since it last ran.
How It Works
On each recurrence the trigger asks Google for the changes recorded since its stored position, and stores the position Google returns for next time. Each change identifies one file and whether it was removed.
A backlog larger than one page is not dropped. When Google reports that more pages remain, the trigger keeps its position on the page it just read rather than jumping to the end, so nothing between the pages is skipped. With batching enabled it drains the remaining pages inside the same recurrence; without batching it continues on the next scheduled recurrence.
The first recurrence
- Look-back Date empty: the trigger records its starting position and reports nothing. Incremental polling begins on the next recurrence.
- Look-back Date set: the trigger begins a one-time initial sync covering every file modified on or after that date, seeding each one exactly once. With batching enabled the sync finishes within this recurrence; without batching it continues across following recurrences until its window is exhausted, and those recurrences are still part of the sync.
During an initial sync
No input is ignored. Google's change feed cannot be asked for history, so a sync reads the files themselves instead, over the same drive the trigger is scoped to and with the same access. There is no change feed to narrow, so there is nothing to suppress: Drive ID still scopes the sync exactly as it scopes ordinary recurrences.
A sync covers files by their modified time, so a file last modified before the Look-back Date is left out however recently it was created. Files in the trash are not seeded, and deletions are not part of a sync at all. They are reported from the first regular recurrence onward. Every file a sync seeds is reported with removed set to false.
Batching
Batching is enabled per flow on this trigger: each changed record is dispatched as its own execution, or grouped by the configured batch size. Batch size and batch concurrency can both be overridden per instance. Raising concurrency increases the request volume sent to Google Drive.
To turn it on, select the flow's trigger, open the Flow control tab, and switch on Enable Batching. Under Batch Size, keep Trigger default or choose Custom batch size. Batch Concurrency is optional; leave it blank to keep the limit this trigger ships with.
Enabling batching changes the payload a downstream step receives. With batching off a step reads data.changes; with batching on that array does not exist and data is a single change item, or an array of them (see Returned Data). Any step reading the older shape must be updated before batching is turned on. Because batching is per flow, this affects only that flow, not the component or other flows using the same trigger.
Handing off to the schedule
The starting position for incremental polling is taken before the initial sync reads its first file, not after it finishes. No field in the payload marks the handoff. Once the sync's window is exhausted the trigger stores that position, and the next recurrence resumes from exactly there. Because the position was taken first, a file changed while the sync was still draining is reported again by that first incremental recurrence rather than falling between the two.
Returned Data
What arrives in data depends on whether batching is enabled on the flow. Fields shown are representative. The full response object includes additional properties.
Each change identifies one file by fileId, carries the file's current metadata under file, and reports removed as true when the file was deleted or access to it was lost. A change produced by an initial sync always reports removed as false.
Without batching, data is the change list object Google returned, with every change for this recurrence under changes.
Example Payload: batching disabled
{
"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",
"changeType": "file"
}
]
}
}
newStartPageToken is present only on the last page of a recurrence; while more pages remain, Google returns nextPageToken in its place.
With batching, the changes array is unwrapped. data is one change when the batch size is 1, or an array of changes when it is larger.
Example Payload: batching enabled, batch size 1
{
"data": {
"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",
"changeType": "file"
}
}
Example Payload for New and Updated Files⤓
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.
Example Payload for Push Notification Webhook⤓
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 1000. | 20 |
| Query | A query string to filter results. See Google's documentation for query syntax. | name contains 'report' |
Example Payload for List Files⤓
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 |
Example Payload for List Folders⤓
Select Drive
Select a drive. | key: selectDrive | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
Example Payload for Select Drive⤓
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 |
Example Payload for Copy File⤓
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 | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| File Content | The binary or text body of the file. Images, videos, text, and PDF files can be stored in Google Drive. | 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 |
Example Payload for Create File⤓
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 |
Example Payload for Create Folder⤓
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 |
Example Payload for Create Webhook for Drive⤓
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 | The unique identifier of the file or folder to watch for changes. | ret08u3rv24htgh289g |
Example Payload for Create Webhook for File or Folder⤓
Delete File
Delete a file by file id | key: deleteFile
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. | |
| Fields | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| 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 |
Example Payload for Delete File⤓
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 | The resource ID returned when the webhook was created. | ret08u3rv24htgh289g |
| Webhook ID | The channel ID returned when the webhook was created. | 00000000-0000-0000-0000-000000000000 |
Example Payload for Delete Webhook⤓
Empty Trash
Empty the trash of deleted files | key: emptyTrash
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
Example Payload for Empty Trash⤓
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 | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
Example Payload for Get About⤓
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. |
Example Payload for Get Current User⤓
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 |
Example Payload for Get File⤓
Get File Metadata
Gets a file's metadata 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 |
Example Payload for Get File Metadata⤓
List Changes
List changes made to files in 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.
Example Payload for List Changes⤓
List Drives
List all drives | key: listDrives
| Input | Notes | Example |
|---|---|---|
| Connection | The Connection to use for Google Drive authorization. |
Example Payload for List Drives⤓
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 |
Example Payload for List File's Export Types⤓
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, automatically fetches all pages of results using pagination. | false |
| Fields | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| Pagination | Page-size and page-token controls for paging through results. | |
| Query | A query string to filter results. See Google's documentation for query syntax. | name contains 'report' |
Example Payload for List Files⤓
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, automatically fetches all pages of results using pagination. | false |
| Fields | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Pagination | Page-size and page-token controls for paging through results. |
Example Payload for List Folders⤓
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 |
Example Payload for Move File⤓
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, automatically 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 |
Example Payload for Query Drive Activity⤓
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 |
Example Payload for Raw Request⤓
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, automatically fetches all pages of results using pagination. | false |
| Fields | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| Filters | Optional query controls to sort and refine the results. | |
| Parent Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Pagination | Page-size and page-token controls for paging through results. |
Example Payload for Search Files⤓
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, automatically fetches all pages of results using pagination. | false |
| Fields | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| Parent Folder ID | A unique opaque ID for each folder. | 1xYz2AbC3DeF4GhI5JkL |
| Pagination | Page-size and page-token controls for paging through results. | |
| Search | Search terms to filter results. | quarterly report 2024 |
Example Payload for Search Folders⤓
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 | Fields 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. | files(id,name,mimeType,size,modifiedTime) |
| File Content | The binary or text body of the file. Images, videos, text, and PDF files can be stored in Google Drive. | 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 |
Example Payload for Update File⤓
Changelog
2026-09-17
- Added opt-in batching to the New and Updated Files and Drive Activity triggers, dispatching each changed record individually or in configured batches so large backlogs drain in one recurrence; enabling it changes the shape a downstream step receives
- Added an optional Look-back Date input for performing an initial sync of records on the New and Updated Files and Drive Activity triggers. The initial sync begins when the instance is deployed and backfills every record modified on or after the specified date, seeding each once; the triggers' own filters continue to apply throughout. Leave it empty to start from the first recurrence with no backfill
- Added output schemas to 16 actions for improved field mapping during configuration
- Added inline action calling support to 22 actions for improved example output during configuration
- Updated List Files, Search Files, List Folders, and Search Folders to group their page-size and page-token inputs into Pagination, and Search Files to group its query controls into Filters; Fetch All stays a top-level toggle
- Updated Page Size so that leaving it empty uses the Google Drive default page size rather than 20, and a non-numeric value is rejected instead of being silently treated as 20
- Updated the OAuth2 connection setup guidance to include the Drive Activity scope that the Drive Activity trigger requires
- Fixed the New and Updated Files trigger dropping every change past the first page whenever more than one page had accumulated, and resetting to the present instead of resuming from where it left off
- Fixed the Drive Activity trigger returning activity outside the configured Trigger Events, File ID, Folder or Drive ID, and Consolidation Strategy selections, and re-reporting activity it had already delivered on every recurrence
- Fixed the Query Drive Activity action ignoring its File ID, Folder or Drive ID, Filter, Consolidation Strategy, and Page Token inputs on the first page of results, and failing outright with Fetch All enabled whenever a page carried no activity
- Fixed Search Files, Search Folders, and List Folders failing or matching the wrong files when a Search, Parent Folder ID, or Folder ID value contained an apostrophe or a backslash
- Fixed the List Files and List Folders dropdowns showing two identical, indistinguishable rows when two items shared a name
- Fixed the List Files dropdown erroring when "My Drive" was selected
- Fixed the Select Drive dropdown failing when a page of results contained no drives
2026-05-18
List Changes (and the New and Updated Files polling trigger that wraps it) now persists its Google Drive page token in crossFlowState keyed by context.flow.stableId and context.stepId so it survives deployments while keeping per-step page tokens when a flow contains multiple List Changes steps. Existing instance-state page tokens are migrated transparently on the next run, with no re-baseline
2026-04-30
Updated spectral version
2026-03-31
Various modernizations and documentation updates
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