← All Skills
G

Storage & files

Google Drive

Read, upload, and share Drive files.

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

Triggers7

Things that can wake up your Google Drive coworker.

  • Comment Added (Docs/Sheets/Slides)

    Triggers when a new comment is added to Google Docs, Sheets, or Slides.

    GOOGLEDRIVE_COMMENT_ADDED_TRIGGER
  • File Created

    Triggers when a new file is created in Google Drive.

    GOOGLEDRIVE_FILE_CREATED_TRIGGER
  • File Deleted or Trashed

    Triggers when a file is moved to trash or permanently deleted in Drive.

    GOOGLEDRIVE_FILE_DELETED_OR_TRASHED_TRIGGER
  • File Shared (Permissions Added)

    Triggers when new sharing permissions are granted to a file or folder. Uses Drive's `changes.list` endpoint with inline `permissions` in the `fields` mask so each change carries the file's current permission set provider-atomically. We diff that against `seen_permission_keys` to identify newly added grants. Drive page tokens are the primary cursor; if Drive rejects a stored token, the trigger raises `PollingTriggerError` without clearing state rather than silently re-baselining and dropping events. Limitation: truly ephemeral permissions (added and revoked between two polls without any other file modification in between) are not detected. Drive Activity API would catch those but requires an additional OAuth scope and a different payload contract.

    GOOGLEDRIVE_FILE_SHARED_PERMISSIONS_ADDED
  • File Updated

    Triggers when a file's metadata or content changes in Google Drive.

    GOOGLEDRIVE_FILE_UPDATED_TRIGGER
  • Google Drive Changes

    Triggers when changes are detected in a Google Drive.

    GOOGLEDRIVE_GOOGLE_DRIVE_CHANGES
  • New File Matching Query

    Triggers when a new Google Drive file matches a provided query. This is the legacy query-centric trigger: it preserves Drive API query config such as ``corpora`` / ``driveId`` aliases and emits the historical ``file_matching_query`` event type. ``FileCreatedTrigger`` covers the broader "new file" case and emits ``file_created``.

    GOOGLEDRIVE_NEW_FILE_MATCHING_QUERY_TRIGGER

Actions20

Things your coworker can do in Google Drive.

  • Add file sharing preference (Deprecated)

    DEPRECATED: Use GOOGLEDRIVE_CREATE_PERMISSION instead; use GOOGLEDRIVE_UPDATE_PERMISSION to modify existing permissions (avoids duplicate entries). Modifies sharing permissions for an existing Google Drive file, granting a specified role to a user, group, domain, or 'anyone'. Bulk calls may trigger 403 rateLimitExceeded (~100 req/100s/user); use jittered exponential backoff.

    GOOGLEDRIVE_ADD_FILE_SHARING_PREFERENCE
  • 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. Omit `anchor` and `quoted_file_content_*` for general file-level comments.

    GOOGLEDRIVE_CREATE_COMMENT
  • Create Shared Drive

    Tool to create a new shared drive. Use when you need to programmatically create a new shared drive for collaboration or storage.

    GOOGLEDRIVE_CREATE_DRIVE
  • Create File or Folder

    Creates a new file or folder in Google Drive. Supports both metadata-only creation (for folders and empty documents) and file upload with content. When file_to_upload is provided, uploads the actual file bytes; otherwise creates an empty file. Native Google file types (Docs, Sheets, Forms, etc.) and folders are created as empty shells when no content is provided; content must be added manually afterward. Newly created files are private by default — set sharing permissions afterward for collaboration. For shared-drive folders, use this tool with the target folder ID in `parents` rather than GOOGLEDRIVE_CREATE_FOLDER.

    GOOGLEDRIVE_CREATE_FILE
  • Create a folder

    Creates a new folder in Google Drive, optionally within an EXISTING parent folder specified by its ID or name. The parent folder MUST already exist - use GOOGLEDRIVE_FIND_FOLDER first to verify the parent exists or find its ID. Google Drive permits duplicate folder names, so always store and reuse the folder ID returned by this action rather than relying on names for future lookups.

    GOOGLEDRIVE_CREATE_FOLDER
  • 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 accessible. **Warning:** Concurrent permissions operations on the same file are not supported; only the last update is applied.

    GOOGLEDRIVE_CREATE_PERMISSION
  • 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.

    GOOGLEDRIVE_CREATE_REPLY
  • Create Shortcut to File/Folder

    Tool to create a shortcut to a file or folder in Google Drive. Use when you need to link to an existing Drive item from another location without duplicating it. The shortcut receives its own distinct file ID (capture from response). No parent folder parameter exists; use GOOGLEDRIVE_MOVE_FILE after creation to place the shortcut in the desired location.

    GOOGLEDRIVE_CREATE_SHORTCUT_TO_FILE
  • Delete Comment

    Permanently deletes a comment thread (and all its replies) from a Google Drive file — this action is irreversible. To remove only a single reply within a thread, use GOOGLEDRIVE_DELETE_REPLY instead. Verify the exact comment content and comment_id before calling.

    GOOGLEDRIVE_DELETE_COMMENT
  • Delete Shared Drive

    Tool to permanently delete a shared drive. Use when you need to remove a shared drive and its contents (if specified).

    GOOGLEDRIVE_DELETE_DRIVE
  • Delete file

    DEPRECATED: Use GOOGLEDRIVE_GOOGLE_DRIVE_DELETE_FOLDER_OR_FILE_ACTION instead. Tool to permanently delete a file owned by the user without moving it to trash. Use when permanent deletion is required. If the file belongs to a shared drive, the user must be an organizer on the parent folder.

    GOOGLEDRIVE_DELETE_FILE
  • Delete Permission

    Deletes a permission from a file by permission ID. Deletion is irreversible — confirm the target user, group, or permission type before executing. IMPORTANT: You must first call GOOGLEDRIVE_LIST_PERMISSIONS to get valid permission IDs. To fully revoke public access, the type='anyone' (link-sharing) permission must be explicitly deleted; revoking other permissions leaves the file publicly accessible via link. Use when you need to revoke access for a specific user or group from a file.

    GOOGLEDRIVE_DELETE_PERMISSION
  • Delete Reply

    Tool to delete a specific reply by reply ID. Deletion is irreversible; obtain explicit user confirmation before calling. Removes only the targeted reply, not the full comment thread — use GOOGLEDRIVE_DELETE_COMMENT to remove the entire thread.

    GOOGLEDRIVE_DELETE_REPLY
  • Download a file from Google Drive

    Downloads a file from Google Drive by its ID. For Google Workspace documents (Docs, Sheets, Slides), optionally exports to a specified `mime_type`. For other file types, downloads in their native format regardless of mime_type. Examples: Export a Google Doc to plain text: {"file_id": "1N2o5xQWmAbCdEfGhIJKlmnOPq", "mime_type": "text/plain"} Download a Google Sheet as CSV: {"file_id": "1ZyXwVuTsRqPoNmLkJiHgFeDcB", "mime_type": "text/csv"}

    GOOGLEDRIVE_DOWNLOAD_FILE
  • Download file content (Deprecated)

    DEPRECATED: Use GOOGLEDRIVE_DOWNLOAD_FILE_OPERATION instead. Tool to download file content as a long-running operation. Use when you need to download files from Google Drive. Operations are valid for 24 hours from the time of creation.

    GOOGLEDRIVE_DOWNLOAD_FILE2
  • Download file via operation

    Tool to download file content using long-running operations. Use when you need to download Google Vids files or export Google Workspace documents as part of a long-running operation. Operations are valid for 24 hours from creation. Returns a response containing `downloaded_file_content.s3url` — a short-lived S3 URL; fetch the actual file bytes from that URL promptly after the call.

    GOOGLEDRIVE_DOWNLOAD_FILE_OPERATION
  • Empty Trash

    Tool to permanently and irreversibly delete ALL trashed files in the user's Google Drive or a specified shared drive. Recovery is impossible after execution — no Drive tool can restore items once trash is emptied. Affects every item in trash across the entire account or shared drive, not just files from the current workflow. Always obtain explicit user confirmation and clarify that recovery is impossible before executing. Provide driveId to target a specific shared drive's trash; omit to empty the user's root trash.

    GOOGLEDRIVE_EMPTY_TRASH
  • Export Google Workspace file

    Exports a Google Workspace document to the requested MIME type and returns exported file content. Use when you need to export Google Docs, Sheets, Slides, Drawings, or Apps Script files to a specific format. Note: The exported content is limited to 10MB by Google Drive API.

    GOOGLEDRIVE_EXPORT_GOOGLE_WORKSPACE_FILE
  • Find file

    The comprehensive Google Drive search tool that handles all file and folder discovery needs. Use this for any file finding task - from simple name searches to complex queries with date filters, MIME types, permissions, custom properties, folder scoping, and more. Searches across My Drive and shared drives with full metadata support. Examples: - Find PDFs: q="mimeType = 'application/pdf'" - Find recent files: q="modifiedTime > '2024-01-01T00:00:00'" - Search by name: q="name contains 'report'" - Files in folder: folderId="abc123" or q="'FOLDER_ID' in parents"

    GOOGLEDRIVE_FIND_FILE
  • Generate File IDs

    Generates a set of file IDs which can be provided in create or copy requests. Use when you need to pre-allocate IDs for new files or copies.

    GOOGLEDRIVE_GENERATE_IDS