> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Google Drive

> Google Drive is a cloud storage solution for uploading, sharing, and collaborating on files across devices, with robust search and offline access

Google Drive is a cloud storage solution for uploading, sharing, and collaborating on files across devices, with robust search and offline access

`googledrive` · **90 tools** · **7 triggers**

## Connect it

```bash
run auth googledrive
run auth googledrive --scope team    # shared with the organization
```

Or from the [Integrations page](https://app.boxd.sh/integrations) in the console. See [Connections](/guides/integrations/connections.md) for personal versus shared, and who may remove one.

## Use it

```bash
run googledrive          # common commands
run googledrive --all    # every command
```

```ts
import { googledrive } from "@boxd/run";
```

## Common tools

| Tool | What it does |
| - | - |
| `add-file-sharing-preference` | DEPRECATED: Use GOOGLEDRIVE\_CREATE\_PERMISSION instead; use GOOGLEDRIVE\_UPDATE\_PERMISSION to modify existing permissions (avoids duplicate entries). |
| `create-comment` | Tool to create a comment on a file in Google Drive. Returns a nested `data` object; extract `data.id` for the resulting comment identifier. |
| `create-drive` | Tool to create a new shared drive. Use when you need to programmatically create a new shared drive for collaboration or storage. |
| `create-file` | Creates a new file or folder in Google Drive. Supports both metadata-only creation (for folders and empty documents) and file upload with content. |
| `create-folder` | Creates a new folder in Google Drive, optionally within an EXISTING parent folder specified by its ID or name. |
| `create-permission` | Tool to create a permission for a file or shared drive. Use when you need to share a file or folder with users, groups, domains, or make it publicly... |
| `create-permissions-batch` | Creates multiple permissions for files or shared drives in a single batch request. |
| `create-reply` | Tool to create a reply to a comment in Google Drive. Use when you need to respond to an existing comment on a file. |
| `create-shortcut-to-file` | Tool to create a shortcut to a file or folder in Google Drive. |
| `delete-comment` | Permanently deletes a comment thread (and all its replies) from a Google Drive file - this action is irreversible. |
| `delete-drive` | Tool to permanently delete a shared drive. Use when you need to remove a shared drive and its contents (if specified). |
| `delete-file` | DEPRECATED: Use GOOGLEDRIVE\_GOOGLE\_DRIVE\_DELETE\_FOLDER\_OR\_FILE\_ACTION instead. |
| `delete-permission` | Deletes a permission from a file by permission ID. Deletion is irreversible - confirm the target user, group, or permission type before executing. |
| `delete-reply` | Tool to delete a specific reply by reply ID. Deletion is irreversible; obtain explicit user confirmation before calling. |
| `download-file` | Downloads a file from Google Drive by its ID. For Google Workspace documents (Docs, Sheets, Slides), optionally exports to a specified `mime_type`. |
| `download-file2` | DEPRECATED: Use GOOGLEDRIVE\_DOWNLOAD\_FILE\_OPERATION instead. |
| `download-file-operation` | Tool to download file content using long-running operations. |
| `empty-trash` | Tool to permanently and irreversibly delete ALL trashed files in the user's Google Drive or a specified shared drive. |
| `export-google-workspace-file` | Exports a Google Workspace document to the requested MIME type and returns exported file content. |
| `find-file` | The comprehensive Google Drive search tool that handles all file and folder discovery needs. |
| `generate-ids` | Generates a set of file IDs which can be provided in create or copy requests. |
| `get-about` | Tool to retrieve information about the user, the user's Drive, and system capabilities. |
| `get-changes-start-page-token` | Tool to get the starting pageToken for listing future changes in Google Drive. |
| `get-comment` | Tool to get a comment by ID. Use when you need to retrieve a specific comment from a Google Drive file and have both the file ID and comment ID. |
| `get-drive` | Tool to get a shared drive by ID. Use when you need to retrieve information about a specific shared drive. |

> [accordion] All 90 tools
>
> | Tool | What it does |
> | - | - |
> | `add-file-sharing-preference` | DEPRECATED: Use GOOGLEDRIVE\_CREATE\_PERMISSION instead; use GOOGLEDRIVE\_UPDATE\_PERMISSION to modify existing permissions (avoids duplicate entries). |
> | `add-parent` | Tool to add a parent folder for a file using Google Drive API v2. |
> | `add-property` | Tool to add a property to a file, or update it if it already exists (v2 API). |
> | `copy-file` | DEPRECATED: Use GOOGLEDRIVE\_COPY\_FILE\_ADVANCED instead. Duplicates an existing file (not folders) in Google Drive by `file_id`; copy lands in same... |
> | `copy-file-advanced` | Creates a copy of a file and applies any requested updates with patch semantics. |
> | `create-comment` | Tool to create a comment on a file in Google Drive. Returns a nested `data` object; extract `data.id` for the resulting comment identifier. |
> | `create-drive` | Tool to create a new shared drive. Use when you need to programmatically create a new shared drive for collaboration or storage. |
> | `create-file` | Creates a new file or folder in Google Drive. Supports both metadata-only creation (for folders and empty documents) and file upload with content. |
> | `create-file-from-text` | Creates a new file in Google Drive from provided text content (up to 10MB), supporting various formats including automatic conversion to Google Workspace types. |
> | `create-folder` | Creates a new folder in Google Drive, optionally within an EXISTING parent folder specified by its ID or name. |
> | `create-permission` | Tool to create a permission for a file or shared drive. Use when you need to share a file or folder with users, groups, domains, or make it publicly... |
> | `create-permissions-batch` | Creates multiple permissions for files or shared drives in a single batch request. |
> | `create-reply` | Tool to create a reply to a comment in Google Drive. Use when you need to respond to an existing comment on a file. |
> | `create-shortcut-to-file` | Tool to create a shortcut to a file or folder in Google Drive. |
> | `create-team-drive` | Tool to create a Team Drive. Deprecated: Use drives.create instead. |
> | `delete-child` | Tool to remove a child from a folder using Google Drive API v2. |
> | `delete-comment` | Permanently deletes a comment thread (and all its replies) from a Google Drive file - this action is irreversible. |
> | `delete-drive` | Tool to permanently delete a shared drive. Use when you need to remove a shared drive and its contents (if specified). |
> | `delete-file` | DEPRECATED: Use GOOGLEDRIVE\_GOOGLE\_DRIVE\_DELETE\_FOLDER\_OR\_FILE\_ACTION instead. |
> | `delete-parent` | Tool to remove a parent from a file using Google Drive API v2. |
> | `delete-permission` | Deletes a permission from a file by permission ID. Deletion is irreversible - confirm the target user, group, or permission type before executing. |
> | `delete-property` | Tool to delete a property from a file using Google Drive API v2. |
> | `delete-reply` | Tool to delete a specific reply by reply ID. Deletion is irreversible; obtain explicit user confirmation before calling. |
> | `delete-revision` | Tool to permanently delete a file revision. Use when you need to remove a specific version of a binary file (images, videos, etc.). |
> | `delete-team-drive` | Tool to permanently delete a Team Drive. Deprecated: Use drives.delete instead. |
> | `download-file` | Downloads a file from Google Drive by its ID. For Google Workspace documents (Docs, Sheets, Slides), optionally exports to a specified `mime_type`. |
> | `download-file2` | DEPRECATED: Use GOOGLEDRIVE\_DOWNLOAD\_FILE\_OPERATION instead. |
> | `download-file-operation` | Tool to download file content using long-running operations. |
> | `edit-file` | Updates an existing Google Drive file with binary content by overwriting its entire content with new text (max 10MB). |
> | `empty-trash` | Tool to permanently and irreversibly delete ALL trashed files in the user's Google Drive or a specified shared drive. |
> | `export-google-workspace-file` | Exports a Google Workspace document to the requested MIME type and returns exported file content. |
> | `find-file` | The comprehensive Google Drive search tool that handles all file and folder discovery needs. |
> | `find-folder` | Finds one page of Google Drive folders by name and optional parent. |
> | `generate-ids` | Generates a set of file IDs which can be provided in create or copy requests. |
> | `get-about` | Tool to retrieve information about the user, the user's Drive, and system capabilities. |
> | `get-app` | Tool to get information about a specific Drive app by ID. Use 'self' as the app ID to get information about the calling app. |
> | `get-change` | Tool to get a specific change by ID from Google Drive v2 API. |
> | `get-changes-start-page-token` | Tool to get the starting pageToken for listing future changes in Google Drive. |
> | `get-child` | Tool to get a specific child reference for a folder using Drive API v2. |
> | `get-comment` | Tool to get a comment by ID. Use when you need to retrieve a specific comment from a Google Drive file and have both the file ID and comment ID. |
> | `get-drive` | Tool to get a shared drive by ID. Use when you need to retrieve information about a specific shared drive. |
> | `get-file-metadata` | Tool to get a file's metadata by ID. Use to verify `mimeType`, `parents`, and `trashed` status before destructive operations (delete/move/export), or... |
> | `get-file-property` | Tool to get a property by its key using Google Drive API v2. |
> | `get-file-v2` | DEPRECATED: Use GetFileMetadata instead. Tool to get a file's metadata or content by ID from Google Drive API v2. |
> | `get-parent` | Tool to get a specific parent reference for a file using Drive API v2. |
> | `get-permission` | Gets a permission by ID. Use this tool to retrieve a specific permission for a file or shared drive. |
> | `get-permission-id-for-email` | Tool to get the permission ID for an email address using the Drive API v2. |
> | `get-reply` | Tool to get a specific reply to a comment on a file. Use when you need to retrieve the details of a particular reply. |
> | `get-revision` | Tool to get a specific revision's metadata (name, modifiedTime, keepForever, etc.) by revision ID. |
> | `get-team-drive` | Tool to get metadata about a Team Drive by ID. Deprecated: Use the drives.get endpoint instead. |
> | `google-drive-delete-folder-or-file-action` | Tool to delete a file or folder in Google Drive. Use when you need to permanently remove a specific file or folder using its ID. |
> | `hide-drive` | Tool to hide a shared drive from the default view. Use when you want to remove a shared drive from the user's main Google Drive interface without deleting it. |
> | `insert-child` | Tool to insert a file into a folder using Drive API v2. Use when you need to add an existing file to a folder. |
> | `list-access-proposals` | Tool to list pending access proposals on a file. Use when you need to retrieve access proposals for a specific file. |
> | `list-approvals` | Tool to list approvals on a file for workflow-based access control. |
> | `list-changes` | Tool to list the changes for a user or shared drive. Use when a full incremental change feed is needed (for simple recent-file lookups, prefer... |
> | `list-children-v2` | Tool to list a folder's children using Google Drive API v2. Use when you need to retrieve all files and folders within a specific folder. |
> | `list-comments` | Tool to list all comments for a file in Google Drive. Results are paginated; iterate using nextPageToken until absent to retrieve all comments. |
> | `list-file-labels` | Tool to list the labels already applied to a file in Google Drive. |
> | `list-file-properties` | Tool to list a file's properties in Google Drive API v2. Use when you need to retrieve custom properties (key-value pairs) attached to a file. |
> | `list-files` | DEPRECATED: Use GOOGLEDRIVE\_FIND\_FILE instead. Tool to list a user's files and folders in Google Drive. |
> | `list-permissions` | Tool to list a file's permissions. Use when you need to retrieve all permissions associated with a specific file or shared drive. |
> | `list-replies` | Tool to list replies to a comment in Google Drive. Use this when you need to retrieve all replies associated with a specific comment on a file. |
> | `list-revisions` | Tool to list a file's revision metadata (not content) in Google Drive. |
> | `list-shared-drives` | Tool to list the user's shared drives. Use when you need to get a list of all shared drives accessible to the authenticated user. |
> | `list-team-drives` | Tool to list Team Drives (deprecated, use List Shared Drives instead). |
> | `modify-file-labels` | Modifies the set of labels applied to a file. Returns a list of the labels that were added or modified. |
> | `move-file` | Tool to move a file from one folder to another in Google Drive. |
> | `parse-file` | DEPRECATED: Exports Google Workspace files (max 10MB) to a specified format using `mime_type`, or downloads other file types; use `GOOGLEDRIVE_DOWNLOAD_FILE` instead. |
> | `patch-permission` | Tool to update a permission using patch semantics. Use when you need to modify specific fields of an existing permission without affecting other... |
> | `patch-property` | Tool to update a property on a file using PATCH semantics (v2 API). |
> | `resumable-upload` | Tool to start and complete a Google Drive resumable upload session. |
> | `stop-watch-channel` | Tool to stop watching resources through a specified channel. |
> | `trash-file` | Tool to move a file or folder to trash (soft delete). Use when you need to delete a file but want to allow recovery via UNTRASH\_FILE. |
> | `unhide-drive` | Tool to unhide a shared drive. Use when you need to restore a shared drive to the default view. |
> | `untrash-file` | Tool to restore a file from the trash. Use when you need to recover a deleted file. |
> | `update-comment` | Tool to update an existing comment on a Google Drive file. Use when you need to change the content of a comment. |
> | `update-drive` | Tool to update the metadata for a shared drive. Use when you need to modify properties like the name, theme, background image, or restrictions of a shared drive. |
> | `update-file-metadata-patch` | Tool to update file metadata using the Drive API v2 PATCH method. |
> | `update-file-property` | Tool to update a property on a file using Google Drive API v2. |
> | `update-file-put` | Updates file metadata. Uses PATCH semantics (partial update) as per Google Drive API v3 - only explicitly provided fields are updated, so omit fields... |
> | `update-file-revision-metadata` | Updates ONLY the metadata properties of a specific file revision (keepForever, published, publishAuto, publishedOutsideDomain). |
> | `update-permission` | Tool to update a permission with patch semantics. Use when you need to modify an existing permission for a file or shared drive. |
> | `update-reply` | Tool to update a reply to a comment on a Google Drive file. Use when you need to modify the content of an existing reply. |
> | `update-team-drive` | Tool to update a Team Drive's metadata. Deprecated: Use the drives.update endpoint instead. |
> | `upload-file` | Uploads a file (max 5MB) to Google Drive, placing it in the specified folder or root if no valid folder ID is provided. |
> | `upload-from-url` | Tool to fetch a file from a provided URL server-side and upload it into Google Drive. |
> | `upload-update-file` | Tool to update file content in Google Drive by uploading new binary content. |
> | `watch-changes` | Tool to subscribe to changes for a user or shared drive in Google Drive. |
> | `watch-file` | Tool to subscribe to push notifications for changes to a specific file. |

## Triggers (7)

Subscribe with `.on(...)` in a script. A trigger with required configuration takes it as the second argument.

| Trigger | Needs | What fires it |
| - | - | - |
| Comment Added (Docs/Sheets/Slides) | nothing | Triggers when a new comment is added to Google Docs, Sheets, or Slides. |
| File Created | nothing | Triggers when a new file is created in Google Drive. |
| File Deleted or Trashed | nothing | Triggers when a file is moved to trash or permanently deleted in Drive. |
| File Shared (Permissions Added) | nothing | Triggers when new sharing permissions are granted to a file or folder. |
| File Updated | nothing | Triggers when a file's metadata or content changes in Google Drive. |
| Google Drive Changes | nothing | Triggers when changes are detected in a Google Drive. |
| New File Matching Query | nothing | Triggers when a new Google Drive file matches a provided query. |

[Open Google Drive in the console →](https://app.boxd.sh/integrations/detail/googledrive)
