---
title: Google Drive
description: Manage files, folders, and permissions
---

import { BlockInfoCard } from "@/components/ui/block-info-card"

<BlockInfoCard 
  type="google_drive"
  color="#FFFFFF"
/>

{/* MANUAL-CONTENT-START:intro */}
[Google Drive](https://drive.google.com) is Google’s cloud-based file storage and synchronization service, making it easy to store, manage, share, and access files securely across devices and platforms. As a core element of Google Workspace, Google Drive offers robust tools for file organization, collaboration, and seamless integration with the broader productivity suite.

Google Drive enables individuals and teams to:

- **Store files in the cloud:** Access documents, images, videos, and more from anywhere with internet connectivity.
- **Organize and manage content:** Create and arrange folders, use naming conventions, and leverage search for fast retrieval.
- **Share and collaborate:** Control file and folder permissions, share with individuals or groups, and collaborate in real time.
- **Leverage powerful search:** Quickly locate files using Google’s search technology.
- **Access across devices:** Work with your files on desktop, mobile, or web with full synchronization.
- **Integrate deeply across Google services:** Connect with Google Docs, Sheets, Slides, and partner applications in your workflows.

In Sim, the Google Drive integration allows your agents to read, upload, download, list, and organize your Drive files programmatically. Agents can automate file management, streamline content workflows, and enable no-code automation around document storage and retrieval. By connecting Sim with Google Drive, you empower your agents to incorporate cloud file operations directly into intelligent business processes.
{/* MANUAL-CONTENT-END */}


## Usage Instructions

Integrate Google Drive into the workflow. Can create, upload, download, copy, move, delete, share files and manage permissions.



## Actions

### `google_drive_list`

List files and folders in Google Drive with complete metadata

#### 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 | Token for fetching the next page of results |

### `google_drive_get_file`

Get metadata for a specific file in Google Drive by its ID

#### 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 |

### `google_drive_get_content`

Get content from a file in Google Drive with complete metadata (exports Google Workspace files automatically)

#### 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\) |

### `google_drive_create_folder`

Create a new folder in Google Drive with complete metadata returned

#### 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 |

### `google_drive_upload`

Upload a file to Google Drive with complete metadata returned

#### 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 |

### `google_drive_download`

Download a file from Google Drive with complete metadata (exports Google Workspace files automatically)

#### 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\) |

### `google_drive_copy`

Create a copy of a file in Google Drive

#### 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 |

### `google_drive_move`

Move a file or folder to a different folder in Google Drive

#### 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 file from its current parent folder \(default: true\). Set to false to add the file to the destination without removing it from the current location. |

#### 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 |

### `google_drive_search`

Search for files in Google Drive using advanced query syntax (e.g., fullText contains, mimeType, modifiedTime, etc.)

#### 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 &gt; \'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 | Token for fetching the next page of results |

### `google_drive_update`

Update file metadata in Google Drive (rename, move, star, add description)

#### 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 |

### `google_drive_trash`

Move a file to the trash in Google Drive (can be restored later)

#### 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 |

### `google_drive_untrash`

Restore a file from the trash in Google Drive

#### 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 |

### `google_drive_delete`

Permanently delete a file from Google Drive (bypasses trash)

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `fileId` | string | Yes | The ID of the file to permanently delete |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `deleted` | boolean | Whether the file was successfully deleted |
| `fileId` | string | The ID of the deleted file |

### `google_drive_share`

Share a file with a user, group, domain, or make it public

#### 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 |

### `google_drive_unshare`

Remove a permission from a file (revoke access)

#### 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 |

### `google_drive_list_permissions`

List all permissions (who has access) for a file in Google Drive

#### 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 | Token for fetching the next page of permissions |

### `google_drive_get_about`

Get information about the user and their Google Drive (storage quota, capabilities)

#### 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** is a block that starts a workflow when an event happens in this service.

These run on a schedule \(**polling-based**\) — they check for new data rather than receiving push notifications.

### 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 | file output from the tool |
|   ↳ `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 |

