Use Google Drive to manage files, folders, metadata, and permissions. Download and content actions export Google Workspace files; the Export action lets you choose a supported output format.
OAuth scopes
Sim requests these scopes when someone connects a Google Drive account. For a self-hosted deployment, register your own app with the provider using the settings below. See Integrations and OAuth for setup.
| Setting | Value |
|---|---|
| Redirect URI | <NEXT_PUBLIC_APP_URL>/api/auth/oauth2/callback/google-drive |
| Environment variables | GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET |
| Scope | Description |
|---|---|
https://www.googleapis.com/auth/userinfo.email | View email address |
https://www.googleapis.com/auth/userinfo.profile | View basic profile info |
https://www.googleapis.com/auth/drive.file | View and manage Google Drive files you open or create with Sim |
https://www.googleapis.com/auth/drive | View, edit, create, and delete all Google Drive files |
Use the block
Create, upload, download, export, copy, move, delete, or share files and folders, and manage their metadata and permissions.
Actions
List Google Drive Files
List files and folders in Google Drive with complete metadata
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
folderSelector | string | No | Google Drive folder ID to list files from (e.g., 1ABCxyz...) |
folderId | string | No | The ID of the folder to list files from (internal use) |
query | string | No | Search term to filter files by name (e.g. "budget" finds files with "budget" in the name). Do NOT use Google Drive query syntax here - just provide a plain search term. |
pageSize | number | No | The maximum number of files to return (default: 100) |
pageToken | string | No | The page token to use for pagination |
Output
| Parameter | Type | Description |
|---|---|---|
files | array | Array of file metadata objects from Google Drive |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ originalFilename | string | Original uploaded filename |
↳ fullFileExtension | string | Full file extension |
↳ fileExtension | string | File extension |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ permissionIds | json | Permission IDs |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ writersCanShare | boolean | Whether writers can share |
↳ viewersCanCopyContent | boolean | Whether viewers can copy |
↳ copyRequiresWriterPermission | boolean | Whether copy requires writer permission |
↳ sharingUser | json | User who shared the file |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ explicitlyTrashed | boolean | Whether explicitly trashed |
↳ appProperties | json | App-specific properties |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ modifiedByMeTime | string | When modified by current user |
↳ viewedByMeTime | string | When last viewed by current user |
↳ sharedWithMeTime | string | When shared with current user |
↳ lastModifyingUser | json | User who last modified the file |
↳ viewedByMe | boolean | Whether viewed by current user |
↳ modifiedByMe | boolean | Whether modified by current user |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ exportLinks | json | Export format links |
↳ size | string | File size in bytes |
↳ quotaBytesUsed | string | Storage quota used |
↳ md5Checksum | string | MD5 hash |
↳ sha1Checksum | string | SHA-1 hash |
↳ sha256Checksum | string | SHA-256 hash |
↳ parents | json | Parent folder IDs |
↳ spaces | json | Spaces containing file |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on file |
↳ version | string | Version number |
↳ headRevisionId | string | Head revision ID |
↳ hasThumbnail | boolean | Whether has thumbnail |
↳ thumbnailVersion | string | Thumbnail version |
↳ imageMediaMetadata | json | Image-specific metadata |
↳ videoMediaMetadata | json | Video-specific metadata |
↳ isAppAuthorized | boolean | Whether created by requesting app |
↳ contentRestrictions | json | Content restrictions |
↳ linkShareMetadata | json | Link share metadata |
nextPageToken | string | Page token for the next page of files; absent from the response when the end of the files list has been reached |
Get Google Drive File
Get metadata for a specific file in Google Drive by its ID
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to retrieve |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The file metadata |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ size | string | File size in bytes |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ parents | json | Parent folder IDs |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ lastModifyingUser | json | User who last modified the file |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ capabilities | json | User capabilities on file |
↳ md5Checksum | string | MD5 hash |
↳ version | string | Version number |
Get Content from Google Drive
Get content from a file in Google Drive with complete metadata (exports Google Workspace files automatically)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to get content from |
mimeType | string | No | The MIME type to export Google Workspace files to (optional) |
includeRevisions | boolean | No | Whether to include revision history in the metadata (default: true, returns first 100 revisions) |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | File content as text (Google Workspace files are exported) |
metadata | object | Complete file metadata from Google Drive |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ originalFilename | string | Original uploaded filename |
↳ fullFileExtension | string | Full file extension |
↳ fileExtension | string | File extension |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ permissionIds | json | Permission IDs |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ writersCanShare | boolean | Whether writers can share |
↳ viewersCanCopyContent | boolean | Whether viewers can copy |
↳ copyRequiresWriterPermission | boolean | Whether copy requires writer permission |
↳ sharingUser | json | User who shared the file |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ explicitlyTrashed | boolean | Whether explicitly trashed |
↳ appProperties | json | App-specific properties |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ modifiedByMeTime | string | When modified by current user |
↳ viewedByMeTime | string | When last viewed by current user |
↳ sharedWithMeTime | string | When shared with current user |
↳ lastModifyingUser | json | User who last modified the file |
↳ viewedByMe | boolean | Whether viewed by current user |
↳ modifiedByMe | boolean | Whether modified by current user |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ exportLinks | json | Export format links |
↳ size | string | File size in bytes |
↳ quotaBytesUsed | string | Storage quota used |
↳ md5Checksum | string | MD5 hash |
↳ sha1Checksum | string | SHA-1 hash |
↳ sha256Checksum | string | SHA-256 hash |
↳ parents | json | Parent folder IDs |
↳ spaces | json | Spaces containing file |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on file |
↳ version | string | Version number |
↳ headRevisionId | string | Head revision ID |
↳ hasThumbnail | boolean | Whether has thumbnail |
↳ thumbnailVersion | string | Thumbnail version |
↳ imageMediaMetadata | json | Image-specific metadata |
↳ videoMediaMetadata | json | Video-specific metadata |
↳ isAppAuthorized | boolean | Whether created by requesting app |
↳ contentRestrictions | json | Content restrictions |
↳ linkShareMetadata | json | Link share metadata |
↳ revisions | json | File revision history (first 100 revisions only) |
Create Folder in Google Drive
Create a new folder in Google Drive with complete metadata returned
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileName | string | Yes | Name of the folder to create |
folderSelector | string | No | Google Drive parent folder ID to create the folder in (e.g., 1ABCxyz...) |
folderId | string | No | ID of the parent folder (internal use) |
Output
| Parameter | Type | Description |
|---|---|---|
file | object | Complete created folder metadata from Google Drive |
↳ id | string | Google Drive folder ID |
↳ kind | string | Resource type identifier |
↳ name | string | Folder name |
↳ mimeType | string | MIME type (application/vnd.google-apps.folder) |
↳ description | string | Folder description |
↳ owners | json | List of folder owners |
↳ permissions | json | Folder permissions |
↳ permissionIds | json | Permission IDs |
↳ shared | boolean | Whether folder is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ writersCanShare | boolean | Whether writers can share |
↳ viewersCanCopyContent | boolean | Whether viewers can copy |
↳ copyRequiresWriterPermission | boolean | Whether copy requires writer permission |
↳ sharingUser | json | User who shared the folder |
↳ starred | boolean | Whether folder is starred |
↳ trashed | boolean | Whether folder is in trash |
↳ explicitlyTrashed | boolean | Whether explicitly trashed |
↳ appProperties | json | App-specific properties |
↳ folderColorRgb | string | Folder color |
↳ createdTime | string | Folder creation time |
↳ modifiedTime | string | Last modification time |
↳ modifiedByMeTime | string | When modified by current user |
↳ viewedByMeTime | string | When last viewed by current user |
↳ sharedWithMeTime | string | When shared with current user |
↳ lastModifyingUser | json | User who last modified the folder |
↳ viewedByMe | boolean | Whether viewed by current user |
↳ modifiedByMe | boolean | Whether modified by current user |
↳ webViewLink | string | URL to view in browser |
↳ iconLink | string | URL to folder icon |
↳ parents | json | Parent folder IDs |
↳ spaces | json | Spaces containing folder |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on folder |
↳ version | string | Version number |
↳ isAppAuthorized | boolean | Whether created by requesting app |
↳ contentRestrictions | json | Content restrictions |
↳ linkShareMetadata | json | Link share metadata |
Upload to Google Drive
Upload a file to Google Drive with complete metadata returned
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileName | string | Yes | The name of the file to upload |
file | file | No | Binary file to upload (UserFile object) |
content | string | No | Text content to upload (use this OR file, not both) |
mimeType | string | No | The MIME type of the file to upload (auto-detected from file if not provided) |
folderSelector | string | No | Google Drive folder ID to upload the file to (e.g., 1ABCxyz...) |
folderId | string | No | The ID of the folder to upload the file to (internal use) |
Output
| Parameter | Type | Description |
|---|---|---|
file | object | Complete uploaded file metadata from Google Drive |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ originalFilename | string | Original uploaded filename |
↳ fullFileExtension | string | Full file extension |
↳ fileExtension | string | File extension |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ permissionIds | json | Permission IDs |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ writersCanShare | boolean | Whether writers can share |
↳ viewersCanCopyContent | boolean | Whether viewers can copy |
↳ copyRequiresWriterPermission | boolean | Whether copy requires writer permission |
↳ sharingUser | json | User who shared the file |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ explicitlyTrashed | boolean | Whether explicitly trashed |
↳ appProperties | json | App-specific properties |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ modifiedByMeTime | string | When modified by current user |
↳ viewedByMeTime | string | When last viewed by current user |
↳ sharedWithMeTime | string | When shared with current user |
↳ lastModifyingUser | json | User who last modified the file |
↳ viewedByMe | boolean | Whether viewed by current user |
↳ modifiedByMe | boolean | Whether modified by current user |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ exportLinks | json | Export format links |
↳ size | string | File size in bytes |
↳ quotaBytesUsed | string | Storage quota used |
↳ md5Checksum | string | MD5 hash |
↳ sha1Checksum | string | SHA-1 hash |
↳ sha256Checksum | string | SHA-256 hash |
↳ parents | json | Parent folder IDs |
↳ spaces | json | Spaces containing file |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on file |
↳ version | string | Version number |
↳ headRevisionId | string | Head revision ID |
↳ hasThumbnail | boolean | Whether has thumbnail |
↳ thumbnailVersion | string | Thumbnail version |
↳ imageMediaMetadata | json | Image-specific metadata |
↳ videoMediaMetadata | json | Video-specific metadata |
↳ isAppAuthorized | boolean | Whether created by requesting app |
↳ contentRestrictions | json | Content restrictions |
↳ linkShareMetadata | json | Link share metadata |
Download File from Google Drive
Download a file from Google Drive with complete metadata (exports Google Workspace files automatically)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to download |
mimeType | string | No | The MIME type to export Google Workspace files to (optional) |
fileName | string | No | Optional filename override |
includeRevisions | boolean | No | Whether to include revision history in the metadata (default: true, returns first 100 revisions) |
Output
| Parameter | Type | Description |
|---|---|---|
file | file | Downloaded file stored in execution files |
metadata | object | Complete file metadata from Google Drive |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ originalFilename | string | Original uploaded filename |
↳ fullFileExtension | string | Full file extension |
↳ fileExtension | string | File extension |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ permissionIds | json | Permission IDs |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ writersCanShare | boolean | Whether writers can share |
↳ viewersCanCopyContent | boolean | Whether viewers can copy |
↳ copyRequiresWriterPermission | boolean | Whether copy requires writer permission |
↳ sharingUser | json | User who shared the file |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ explicitlyTrashed | boolean | Whether explicitly trashed |
↳ appProperties | json | App-specific properties |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ modifiedByMeTime | string | When modified by current user |
↳ viewedByMeTime | string | When last viewed by current user |
↳ sharedWithMeTime | string | When shared with current user |
↳ lastModifyingUser | json | User who last modified the file |
↳ viewedByMe | boolean | Whether viewed by current user |
↳ modifiedByMe | boolean | Whether modified by current user |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ exportLinks | json | Export format links |
↳ size | string | File size in bytes |
↳ quotaBytesUsed | string | Storage quota used |
↳ md5Checksum | string | MD5 hash |
↳ sha1Checksum | string | SHA-1 hash |
↳ sha256Checksum | string | SHA-256 hash |
↳ parents | json | Parent folder IDs |
↳ spaces | json | Spaces containing file |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on file |
↳ version | string | Version number |
↳ headRevisionId | string | Head revision ID |
↳ hasThumbnail | boolean | Whether has thumbnail |
↳ thumbnailVersion | string | Thumbnail version |
↳ imageMediaMetadata | json | Image-specific metadata |
↳ videoMediaMetadata | json | Video-specific metadata |
↳ isAppAuthorized | boolean | Whether created by requesting app |
↳ contentRestrictions | json | Content restrictions |
↳ linkShareMetadata | json | Link share metadata |
↳ revisions | json | File revision history (first 100 revisions only) |
Copy Google Drive File
Create a copy of a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to copy |
newName | string | No | Name for the copied file (defaults to "Copy of [original name]") |
destinationFolderId | string | No | ID of the folder to place the copy in (defaults to same location as original) |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The copied file metadata |
↳ id | string | Google Drive file ID of the copy |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ webViewLink | string | URL to view in browser |
↳ parents | json | Parent folder IDs |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ owners | json | List of file owners |
↳ size | string | File size in bytes |
Move Google Drive File
Move a file or folder to a different folder in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file or folder to move |
destinationFolderId | string | Yes | The ID of the destination folder |
removeFromCurrent | boolean | No | Whether to remove the current parent when adding the destination (default: true). Google Drive supports one parent folder, so false can be rejected when the file already has a different parent. |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The moved file metadata |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ webViewLink | string | URL to view in browser |
↳ parents | json | Parent folder IDs |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ owners | json | List of file owners |
↳ size | string | File size in bytes |
Search Google Drive Files
Search for files in Google Drive using advanced query syntax (e.g., fullText contains, mimeType, modifiedTime, etc.)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | Google Drive query string using advanced search syntax (e.g., "fullText contains 'budget'", "mimeType = 'application/pdf'", "modifiedTime > '2024-01-01'") |
pageSize | number | No | Maximum number of files to return (default: 100) |
pageToken | string | No | Token for fetching the next page of results |
Output
| Parameter | Type | Description |
|---|---|---|
files | array | Array of file metadata objects matching the search query |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ originalFilename | string | Original uploaded filename |
↳ fullFileExtension | string | Full file extension |
↳ fileExtension | string | File extension |
↳ owners | json | List of file owners |
↳ permissions | json | File permissions |
↳ shared | boolean | Whether file is shared |
↳ ownedByMe | boolean | Whether owned by current user |
↳ starred | boolean | Whether file is starred |
↳ trashed | boolean | Whether file is in trash |
↳ createdTime | string | File creation time |
↳ modifiedTime | string | Last modification time |
↳ lastModifyingUser | json | User who last modified the file |
↳ webViewLink | string | URL to view in browser |
↳ webContentLink | string | Direct download URL |
↳ iconLink | string | URL to file icon |
↳ thumbnailLink | string | URL to thumbnail |
↳ size | string | File size in bytes |
↳ parents | json | Parent folder IDs |
↳ driveId | string | Shared drive ID |
↳ capabilities | json | User capabilities on file |
↳ version | string | Version number |
nextPageToken | string | Page token for the next page of files; absent from the response when the end of the files list has been reached |
Update Google Drive File
Update file metadata in Google Drive (rename, move, star, add description)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to update |
name | string | No | New name for the file |
description | string | No | New description for the file |
addParents | string | No | Comma-separated list of parent folder IDs to add (moves file to these folders) |
removeParents | string | No | Comma-separated list of parent folder IDs to remove |
starred | boolean | No | Whether to star or unstar the file |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The updated file metadata |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ description | string | File description |
↳ starred | boolean | Whether file is starred |
↳ webViewLink | string | URL to view in browser |
↳ parents | json | Parent folder IDs |
↳ modifiedTime | string | Last modification time |
Trash Google Drive File
Move a file to the trash in Google Drive (can be restored later)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to move to trash |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The trashed file metadata |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ trashed | boolean | Whether file is in trash (should be true) |
↳ trashedTime | string | When file was trashed |
↳ webViewLink | string | URL to view in browser |
Restore Google Drive File
Restore a file from the trash in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to restore from trash |
Output
| Parameter | Type | Description |
|---|---|---|
file | json | The restored file metadata |
↳ id | string | Google Drive file ID |
↳ kind | string | Resource type identifier |
↳ name | string | File name |
↳ mimeType | string | MIME type |
↳ trashed | boolean | Whether file is in trash (should be false) |
↳ webViewLink | string | URL to view in browser |
↳ parents | json | Parent folder IDs |
Delete Google Drive File
Permanently delete a file from Google Drive (bypasses trash)
Inputs and outputs
Share Google Drive File
Share a file with a user, group, domain, or make it public
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to share |
type | string | Yes | Type of grantee: user, group, domain, or anyone |
role | string | Yes | Permission role: owner (transfer ownership), organizer (shared drive only), fileOrganizer (shared drive only), writer (edit), commenter (view and comment), reader (view only) |
email | string | No | Email address of the user or group (required for type=user or type=group) |
domain | string | No | Domain to share with (required for type=domain) |
transferOwnership | boolean | No | Required when role is owner. Transfers ownership to the specified user. |
moveToNewOwnersRoot | boolean | No | When transferring ownership, move the file to the new owner's My Drive root folder. |
sendNotification | boolean | No | Whether to send an email notification (default: true) |
emailMessage | string | No | Custom message to include in the notification email |
Output
| Parameter | Type | Description |
|---|---|---|
permission | json | The created permission details |
↳ id | string | Permission ID |
↳ type | string | Grantee type (user, group, domain, anyone) |
↳ role | string | Permission role |
↳ emailAddress | string | Email of the grantee |
↳ displayName | string | Display name of the grantee |
↳ domain | string | Domain of the grantee |
↳ expirationTime | string | Expiration time |
↳ deleted | boolean | Whether grantee is deleted |
Unshare Google Drive File
Remove a permission from a file (revoke access)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to modify permissions on |
permissionId | string | Yes | The ID of the permission to remove (use list_permissions to find this) |
Output
| Parameter | Type | Description |
|---|---|---|
removed | boolean | Whether the permission was successfully removed |
fileId | string | The ID of the file |
permissionId | string | The ID of the removed permission |
List Google Drive Permissions
List all permissions (who has access) for a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to list permissions for |
pageToken | string | No | The page token to use for pagination |
Output
| Parameter | Type | Description |
|---|---|---|
permissions | array | List of permissions on the file |
↳ id | string | Permission ID (use to remove permission) |
↳ type | string | Grantee type (user, group, domain, anyone) |
↳ role | string | Permission role (owner, organizer, fileOrganizer, writer, commenter, reader) |
↳ emailAddress | string | Email of the grantee |
↳ displayName | string | Display name of the grantee |
↳ photoLink | string | Photo URL of the grantee |
↳ domain | string | Domain of the grantee |
↳ expirationTime | string | When permission expires |
↳ deleted | boolean | Whether grantee account is deleted |
↳ allowFileDiscovery | boolean | Whether file is discoverable by grantee |
↳ pendingOwner | boolean | Whether ownership transfer is pending |
↳ permissionDetails | json | Details about inherited permissions |
nextPageToken | string | Page token for the next page of permissions; absent from the response when the end of the permissions list has been reached |
Export Google Drive File
Export a Google Workspace file (Docs, Sheets, Slides, Drawings) to a chosen format such as PDF, DOCX, XLSX, or CSV
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the Google Workspace file to export |
mimeType | string | Yes | The target MIME type to export to (e.g. application/pdf, text/csv) |
fileName | string | No | Optional filename override for the exported file |
Output
| Parameter | Type | Description |
|---|---|---|
file | file | Exported file stored in execution files |
exportedMimeType | string | The MIME type the file was exported to |
List Google Drive Revisions
List the revision history of a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to list revisions for |
pageSize | number | No | Maximum number of revisions to return (1-1000, default 200) |
pageToken | string | No | The page token to use for pagination |
Output
| Parameter | Type | Description |
|---|---|---|
revisions | array | List of revisions for the file (most recent last) |
↳ id | string | Revision ID |
↳ mimeType | string | MIME type of the revision |
↳ modifiedTime | string | When this revision was created |
↳ keepForever | boolean | Whether this revision is preserved forever |
↳ published | boolean | Whether this revision is published |
↳ publishedLink | string | Public link to the published revision |
↳ lastModifyingUser | json | User who created this revision |
↳ originalFilename | string | Original filename for binary revisions |
↳ md5Checksum | string | MD5 checksum for binary revisions |
↳ size | string | Size of the revision in bytes |
↳ exportLinks | json | Export format links for the revision |
nextPageToken | string | Page token for the next page of revisions; absent from the response when the end of the revisions list has been reached |
Get Google Drive Revision
Get metadata for a specific revision of a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file the revision belongs to |
revisionId | string | Yes | The ID of the revision to retrieve |
Output
| Parameter | Type | Description |
|---|---|---|
revision | json | The revision metadata |
↳ id | string | Revision ID |
↳ mimeType | string | MIME type of the revision |
↳ modifiedTime | string | When this revision was created |
↳ keepForever | boolean | Whether this revision is preserved forever |
↳ published | boolean | Whether this revision is published |
↳ publishedLink | string | Public link to the published revision |
↳ lastModifyingUser | json | User who created this revision |
↳ originalFilename | string | Original filename for binary revisions |
↳ md5Checksum | string | MD5 checksum for binary revisions |
↳ size | string | Size of the revision in bytes |
↳ exportLinks | json | Export format links for the revision |
List Google Drive Comments
List comments on a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to list comments for |
includeDeleted | boolean | No | Whether to include deleted comments (their content is stripped) |
pageSize | number | No | Maximum number of comments to return (1-100, default 20) |
startModifiedTime | string | No | Only return comments modified after this RFC 3339 timestamp |
pageToken | string | No | The page token to use for pagination |
Output
| Parameter | Type | Description |
|---|---|---|
comments | array | List of comments on the file |
↳ id | string | Comment ID |
↳ content | string | Plain text content of the comment |
↳ htmlContent | string | HTML-formatted content of the comment |
↳ author | json | User who authored the comment |
↳ createdTime | string | When the comment was created |
↳ modifiedTime | string | When the comment was last modified |
↳ resolved | boolean | Whether the comment has been resolved |
↳ deleted | boolean | Whether the comment has been deleted |
↳ anchor | string | Region of the document the comment refers to |
↳ quotedFileContent | json | The file content the comment quotes |
↳ replies | json | Threaded replies to the comment |
nextPageToken | string | Page token for the next page of comments; absent from the response when the end of the comments list has been reached |
Create Google Drive Comment
Add a comment to a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to comment on |
content | string | Yes | The plain text content of the comment |
anchor | string | No | A region of the document the comment refers to (JSON anchor string) |
Output
| Parameter | Type | Description |
|---|---|---|
comment | json | The created comment |
↳ id | string | Comment ID |
↳ content | string | Plain text content of the comment |
↳ htmlContent | string | HTML-formatted content of the comment |
↳ author | json | User who authored the comment |
↳ createdTime | string | When the comment was created |
↳ modifiedTime | string | When the comment was last modified |
↳ resolved | boolean | Whether the comment has been resolved |
↳ deleted | boolean | Whether the comment has been deleted |
↳ anchor | string | Region of the document the comment refers to |
↳ quotedFileContent | json | The file content the comment quotes |
↳ replies | json | Threaded replies to the comment |
Delete Google Drive Comment
Delete a comment from a file in Google Drive
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file the comment belongs to |
commentId | string | Yes | The ID of the comment to delete |
Output
| Parameter | Type | Description |
|---|---|---|
deleted | boolean | Whether the comment was successfully deleted |
fileId | string | The ID of the file |
commentId | string | The ID of the deleted comment |
Get Google Drive Info
Get information about the user and their Google Drive (storage quota, capabilities)
Inputs and outputs
Input
| Parameter | Type | Required | Description |
|---|
Output
| Parameter | Type | Description |
|---|---|---|
user | json | Information about the authenticated user |
↳ displayName | string | User display name |
↳ emailAddress | string | User email address |
↳ photoLink | string | URL to user profile photo |
↳ permissionId | string | User permission ID |
↳ me | boolean | Whether this is the authenticated user |
storageQuota | json | Storage quota information in bytes |
↳ limit | string | Total storage limit in bytes (null for unlimited) |
↳ usage | string | Total storage used in bytes |
↳ usageInDrive | string | Storage used by Drive files in bytes |
↳ usageInDriveTrash | string | Storage used by trashed files in bytes |
canCreateDrives | boolean | Whether user can create shared drives |
importFormats | json | Map of MIME types that can be imported and their target formats |
exportFormats | json | Map of Google Workspace MIME types and their exportable formats |
maxUploadSize | string | Maximum upload size in bytes |
Triggers
A trigger starts a workflow when a supported event occurs in this service.
These triggers poll for new data on a schedule.
Google Drive File Trigger
Triggers when files are created, modified, or deleted in Google Drive
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
triggerCredentials | string | Yes | Connect your Google account to access Google Drive. |
folderId | file-selector | No | Optional: The folder to monitor. Leave empty to monitor all files in Drive. |
manualFolderId | string | No | Optional: The folder ID from the Google Drive URL to monitor. Leave empty to monitor all files. |
mimeTypeFilter | string | No | Optional: Only trigger for specific file types. |
eventTypeFilter | string | No | Only trigger for specific change types. Defaults to all changes. |
includeSharedDrives | boolean | No | Include files from shared (team) drives. |
Output
| Parameter | Type | Description |
|---|---|---|
file | object | |
↳ id | string | Google Drive file ID |
↳ name | string | File name |
↳ mimeType | string | File MIME type |
↳ modifiedTime | string | Last modified time (ISO) |
↳ createdTime | string | File creation time (ISO) |
↳ size | string | File size in bytes |
↳ webViewLink | string | URL to view file in browser |
↳ parents | json | Parent folder IDs |
↳ lastModifyingUser | json | User who last modified the file |
↳ shared | boolean | Whether file is shared |
↳ starred | boolean | Whether file is starred |
eventType | string | Change type: "created", "modified", or "deleted" |
timestamp | string | Event timestamp in ISO format |