Google Drive
Overview
Section titled “Overview”Google Drive is a cloud storage solution for uploading, sharing, and collaborating on files across devices, with robust search and offline access. With the Google Drive integration in SquadOS, your agents can create documents and folders, upload files from URLs or text content, move and copy items, manage sharing permissions, and export Google Workspace documents to standard formats — all programmatically within automation flows.
- Official website: https://drive.google.com/
- Composio documentation: docs.composio.dev/toolkits/googledrive
Authentication
Section titled “Authentication”This tool uses OAuth 2.0 (OAUTH2) to connect.
Authentication is managed by Composio via the standard Google OAuth flow. When connecting, you authorize access to your Google Drive account; no manual key or password is required.
How to connect in SquadOS
Section titled “How to connect in SquadOS”- Go to Tools in the side menu (
/admin/tools). - Open the Available tab and search for
Google Drive. - Click the card to open the details modal and hit Connect.
- You’re taken to the secure connection page hosted by Composio, where you authorize access via OAuth with your Google account.
- Once done, you’re sent back to SquadOS with the account connected and the tool available for your agents. (Connection-flow details in Organization Tools.)
How do I set up custom Google OAuth credentials for Google Drive?
Section titled “How do I set up custom Google OAuth credentials for Google Drive?”For a step-by-step guide on creating and configuring your own Google OAuth credentials with Composio, see How to create OAuth2 credentials for Google Apps.
Why am I seeing “App is blocked” when connecting Google Drive?
Section titled “Why am I seeing “App is blocked” when connecting Google Drive?”The OAuth client is requesting scopes that Google hasn’t verified for that client. This usually happens when you add extra scopes beyond the defaults. Remove the additional scopes from your auth config, or create your own OAuth app and submit the scopes for verification.
Why am I getting “Google Drive API has not been used in project” error?
Section titled “Why am I getting “Google Drive API has not been used in project” error?”When using custom OAuth credentials, the Google Drive API must be enabled in the Google Cloud project that owns those credentials. Enable it in Google Cloud Console under APIs & Services, wait a few minutes, and retry.
Why am I getting “Error 400: invalid_scope”?
Section titled “Why am I getting “Error 400: invalid_scope”?”The requested scopes are invalid or incorrectly formatted in the authorization URL. Verify your scope values against the Google OAuth scopes docs.
Why does the OAuth consent screen show “Composio” instead of my app?
Section titled “Why does the OAuth consent screen show “Composio” instead of my app?”By default, the consent screen uses Composio’s OAuth app. To show your own app name and logo, create your own OAuth app and set a custom redirect URL.
Why am I getting 401 errors on tool calls?
Section titled “Why am I getting 401 errors on tool calls?”The user’s access token is no longer valid. Common causes: the user revoked access, changed their password or 2FA, a Workspace admin policy changed, or Google’s refresh token limit (~50 per account) was exceeded. Re-authenticating the user typically resolves this.
Available actions
Section titled “Available actions”Create File or Folder
Section titled “Create File or Folder”GOOGLEDRIVE_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. 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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The name of the file. While optional, providing a meaningful name is strongly recommended. If not specified, Google Drive will create the file with name ‘Untitled’. |
fields | string | No | A comma-separated list of fields to include in the response. |
parents | array | No | Google Drive folder ID (not folder name) where the file will be created. Must be a list with exactly one folder ID. If omitted, the file is created in My Drive root. |
starred | boolean | No | Whether the user has starred the file. |
mimeType | string | No | Common MIME types for Google Drive file creation. |
description | string | No | A short description of the file. |
file_to_upload | object | No | Optional file content to upload. FileUploadable object where name is the filename. If provided, the file will be created with the actual content from this upload. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create a File from Text
Section titled “Create a File from Text”GOOGLEDRIVE_CREATE_FILE_FROM_TEXT
Creates a new file in Google Drive from provided text content (up to 10 MB), supporting various formats including automatic conversion to Google Workspace types. Created files are private by default; use a sharing tool afterward for collaborative access.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file_name | string | Yes | Desired name for the new file on Google Drive. |
mime_type | string | No | MIME type for the new file, determining how Google Drive interprets its content. |
parent_id | string | No | ID of the parent folder in Google Drive. If omitted, the file is created in the root of My Drive. Do NOT pass folder names — only folder IDs work. |
text_content | string | Yes | Plain text content to be written into the new file. Must be UTF-8 encoded. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create a folder
Section titled “Create a folder”GOOGLEDRIVE_CREATE_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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the new folder. |
parent_id | string | No | ID or exact name of an EXISTING parent folder. If omitted, the folder is created in the Drive root. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Upload File
Section titled “Upload File”GOOGLEDRIVE_UPLOAD_FILE
Uploads a file (max 5 MB) to Google Drive, placing it in the specified folder or root if no valid folder ID is provided. Always creates a new file (never updates existing); use GOOGLEDRIVE_EDIT_FILE to update with a stable file_id. Uploaded files are private by default.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file_to_upload | object | Yes | File to upload to Google Drive (max 5 MB). Must be a dict with fields: name (filename), mimetype (accurate MIME type), and s3key (path from a previously staged Composio object). |
folder_to_upload_to | string | No | Optional ID of the target Google Drive folder. Invalid or missing IDs silently fall back to Drive root with no error. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Upload File from URL to Drive
Section titled “Upload File from URL to Drive”GOOGLEDRIVE_UPLOAD_FROM_URL
Tool to fetch a file from a provided URL server-side and upload it into Google Drive. Use when you need to reliably persist externally hosted files into Drive without client-side downloads.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the file in Google Drive, including extension (e.g., ‘report.pdf’, ‘image.png’). |
mime_type | string | No | Target MIME type for the file in Google Drive. If not specified, Drive auto-detects from content. |
source_url | string | Yes | URL of the file to download and upload to Google Drive. Must be a publicly accessible URL. |
verify_ssl | boolean | No | Whether to verify SSL certificates when downloading from HTTPS URLs. |
source_headers | object | No | Optional HTTP headers to include when downloading from source_url. Use for authentication tokens or CDN-specific headers. |
parent_folder_id | string | No | ID of the parent folder in Google Drive. If not specified, the file will be uploaded to the root of My Drive. |
supports_all_drives | boolean | No | Whether the request supports both My Drives and shared drives. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Upload/Update File Content
Section titled “Upload/Update File Content”GOOGLEDRIVE_UPLOAD_UPDATE_FILE
Tool to update file content in Google Drive by uploading new binary content. Use when you need to replace the contents of an existing file with new file data.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to update with new content. |
addParents | string | No | Comma-separated list of parent folder IDs to add. |
uploadType | string | No | The type of upload request: media for simple upload (content only), multipart for metadata + content, resumable for large files. |
ocrLanguage | string | No | Language hint for OCR processing (ISO 639-1 code, e.g., ‘en’). |
removeParents | string | No | Comma-separated list of parent folder IDs to remove. |
file_to_upload | object | Yes | The file content to upload. |
supportsAllDrives | boolean | No | Whether the app supports both My Drives and shared drives. |
keepRevisionForever | boolean | No | Whether to set the ‘keepForever’ field in the new head revision. |
useContentAsIndexableText | boolean | No | Whether to use the uploaded content as indexable text for search. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Download a file from Google Drive
Section titled “Download a file from Google Drive”GOOGLEDRIVE_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. For other file types, downloads in their native format regardless of mime_type.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The unique identifier of the file to be downloaded from Google Drive. Must be a valid Google Drive file ID containing only alphanumeric characters, hyphens, and underscores. |
mime_type | string | No | ONLY for Google Workspace documents (Docs, Sheets, Slides, Drawings). Specifies the export format. Has NO effect on regular files — they are always downloaded in their native format. If omitted for Google Workspace files, defaults to PDF. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Find file
Section titled “Find file”GOOGLEDRIVE_FIND_FILE
The comprehensive Google Drive search tool that handles all file and folder discovery needs. Use 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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | Query string to filter file results. Accepts both simple text searches and full Google Drive query syntax (e.g., name contains 'report', mimeType = 'application/pdf', modifiedTime > '2024-01-01T00:00:00'). |
fields | string | No | Selector specifying which fields to include in a partial response. Use * for all fields. |
spaces | string | No | A comma-separated list of spaces to query. Supported values: drive, appDataFolder, photos. |
corpora | string | No | Specifies which collections of files to search: user, domain, drive, or allDrives (default). |
driveId | string | No | ID of the shared drive to search. Required if corpora is drive. |
orderBy | string | No | Comma-separated sort keys. Ascending by default; add desc for descending. |
pageSize | integer | No | The maximum number of files to return per page. |
folder_id | string | No | ID of a specific folder to search within. Use root to search within the user’s root folder (My Drive). |
pageToken | string | No | The token for continuing a previous list request on the next page. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Find folder
Section titled “Find folder”GOOGLEDRIVE_FIND_FOLDER
Tool to find a folder in Google Drive by its name and optionally a parent folder. Use when you need to locate a specific folder to perform further actions like creating files in it or listing its contents.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
starred | boolean | No | Set to true to search for starred folders, or false for non-starred ones. |
name_exact | string | No | The exact name of the folder to search for. This search is case-sensitive. |
name_contains | string | No | A substring to search for within folder names. This search is case-insensitive. |
modified_after | string | No | Search for folders modified after a specific date and time (RFC 3339 format). |
parent_folder_id | string | No | The ID of the parent folder to search within. Only folders directly inside this parent will be returned. |
name_not_contains | string | No | A substring to exclude from folder names. |
full_text_contains | string | No | A string to search for within the folder’s name or description. |
full_text_not_contains | string | No | A string to exclude from the folder’s name or description. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Get File Metadata
Section titled “Get File Metadata”GOOGLEDRIVE_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 to confirm mimeType='application/vnd.google-apps.document' before calling Google Docs tools.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fields | string | No | Comma-separated list of fields to include in the response. Use * to return all available fields. |
fileId | string | Yes | The Google Drive file ID (an opaque alphanumeric string), NOT a file name. If you only have a file name, use GOOGLEDRIVE_FIND_FILE to get the file ID first. |
includeLabels | string | No | A comma-separated list of IDs of labels to include in the labelInfo part of the response. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Edit File
Section titled “Edit File”GOOGLEDRIVE_EDIT_FILE
Updates an existing Google Drive file with binary content by overwriting its entire content with new text (max 10 MB). IMPORTANT: This action only works with files that have binary content (text files, PDFs, images, etc.). It does NOT support editing Google Workspace native files (Google Docs, Sheets, Slides, etc.). Preserves the original file_id (unlike GOOGLEDRIVE_UPLOAD_FILE which creates a new ID).
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
content | string | Yes | New textual content to overwrite the existing file; will be UTF-8 encoded for upload. Overwrites the entire file body — partial edits are not possible. |
file_id | string | Yes | ID of the Google Drive file to update. Only works with files that have binary content (e.g., .txt, .json, .pdf, .jpg). Does NOT support Google Workspace native files. |
mime_type | string | No | MIME type of the content being uploaded. Must match the actual format of the content. Cannot be a Google Workspace MIME type. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Move File
Section titled “Move File”GOOGLEDRIVE_MOVE_FILE
Tool to move a file from one folder to another in Google Drive. To truly move (not just copy the parent), always provide both add_parents (destination folder ID) and remove_parents (source folder ID); omitting remove_parents leaves the file in multiple folders. Useful for reorganizing files, including newly created Google Docs/Sheets that default to Drive root.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | The ID of the file to move. |
add_parents | string | No | The ID of the single destination folder. Folder names are not accepted. |
ocr_language | string | No | A language hint for OCR processing during image import (ISO 639-1 code). |
include_labels | string | No | A comma-separated list of IDs of labels to include in the labelInfo part of the response. |
remove_parents | string | No | A comma-separated list of parent folder IDs to remove the file from. Use this to specify the source folder. |
supports_all_drives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
keep_revision_forever | boolean | No | Whether to set the ‘keepForever’ field in the new head revision. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete file
Section titled “Delete file”GOOGLEDRIVE_DELETE_FILE
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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to delete. This permanently removes the file without moving it to trash. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
enforceSingleParent | boolean | No | Deprecated parameter. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Copy file with advanced options
Section titled “Copy file with advanced options”GOOGLEDRIVE_COPY_FILE_ADVANCED
Creates a copy of a file and applies any requested updates with patch semantics. Use when you need to duplicate a file with advanced options like label inclusion, visibility settings, or custom metadata.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file to copy. |
name | string | No | The name of the copied file. If not provided, the copied file will have the same name as the original, prefixed with ‘Copy of ’. |
fields | string | No | Selector specifying which fields to include in a partial response. |
parents | array | No | The IDs of the parent folders which will contain the file. |
starred | boolean | No | Whether the user has starred the file. |
mimeType | string | No | The MIME type of the file. |
description | string | No | A short description of the copied file. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
keepRevisionForever | boolean | No | Whether to set the ‘keepForever’ field in the new head revision. |
ignoreDefaultVisibility | boolean | No | Whether to ignore the domain’s default visibility settings for the created file. |
copyRequiresWriterPermission | boolean | No | Whether the options to copy, print, or download this file should be disabled for readers and commenters. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Trash File
Section titled “Trash File”GOOGLEDRIVE_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 GOOGLEDRIVE_UNTRASH_FILE. This action is distinct from permanent deletion and provides a safer cleanup workflow.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fields | string | No | Comma-separated list of fields to include in the response. |
file_id | string | Yes | The ID of the file to trash. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Empty Trash
Section titled “Empty Trash”GOOGLEDRIVE_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. Affects every item in trash across the entire account or shared drive, not just files from the current workflow. Provide driveId to target a specific shared drive’s trash; omit to empty the user’s root trash.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
driveId | string | No | If set, empties the trash of the provided shared drive. This parameter is ignored if the item is not in a shared drive. |
enforceSingleParent | boolean | No | Deprecated parameter. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Export Google Workspace file
Section titled “Export Google Workspace file”GOOGLEDRIVE_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 10 MB by Google Drive API.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the Google Workspace file to export. Must be a valid file ID for a Google Docs, Sheets, Slides, Drawings, or Apps Script file. |
mimeType | string | Yes | The MIME type of the format requested for this export. Supported formats depend on the source file type: Google Docs → DOCX, ODT, RTF, PDF, TXT, ZIP (HTML), EPUB, Markdown; Google Sheets → XLSX, ODS, PDF, CSV, TSV, ZIP (HTML); Google Slides → PPTX, ODP, PDF, TXT, JPG, PNG, SVG; Google Drawings → PDF, JPG, PNG, SVG; Apps Script → JSON. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Export or download a file (deprecated)
Section titled “Export or download a file (deprecated)”GOOGLEDRIVE_PARSE_FILE
DEPRECATED: Exports Google Workspace files (max 10 MB) to a specified format using mime_type, or downloads other file types; use GOOGLEDRIVE_DOWNLOAD_FILE instead.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | The unique ID of the file stored in Google Drive that you want to export or download. |
mime_type | string | No | Target MIME type for exporting Google Workspace files only. For non-Workspace files, this parameter is ignored and the file is downloaded in its native format. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Permission
Section titled “Create Permission”GOOGLEDRIVE_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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
role | string | Yes | The role granted by this permission. Valid values: owner, organizer, fileOrganizer, writer, commenter, reader. |
type | string | Yes | The type of the grantee: user, group, domain, or anyone. When type is user or group, you must provide an email_address. |
domain | string | No | The domain to which this permission refers. Required when type is domain. |
file_id | string | Yes | The ID of the file or shared drive. |
email_address | string | No | The email address of the user or group to which this permission refers. Required when type is user or group. |
email_message | string | No | A plain text custom message to include in the notification email. |
expiration_time | string | No | The time at which this permission will expire (RFC 3339 date-time). Only for user and group permissions. |
transfer_ownership | boolean | No | Whether to transfer ownership to the specified user and downgrade the current owner to a writer. |
allow_file_discovery | boolean | No | Whether the permission allows the file to be discovered through search. Only applicable for domain or anyone type permissions. |
send_notification_email | boolean | No | Whether to send a notification email when sharing to users or groups. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Permissions
Section titled “List Permissions”GOOGLEDRIVE_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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file or shared drive. |
pageSize | integer | No | The maximum number of permissions to return per page. |
pageToken | string | No | The token for continuing a previous list request on the next page. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
useDomainAdminAccess | boolean | No | Issue the request as a domain administrator. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Delete Permission
Section titled “Delete Permission”GOOGLEDRIVE_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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file_id | string | Yes | The ID of the file or shared drive. |
permission_id | string | Yes | The unique ID of the permission to delete. IMPORTANT: You MUST first call GOOGLEDRIVE_LIST_PERMISSIONS with the file_id to retrieve valid permission IDs. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
useDomainAdminAccess | boolean | No | Issue the request as a domain administrator. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Update Permission
Section titled “Update Permission”GOOGLEDRIVE_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. Inherited or domain-managed permissions may not be editable; verify editability with GOOGLEDRIVE_LIST_PERMISSIONS before updating.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fileId | string | Yes | The ID of the file or shared drive. |
permission | object | Yes | The permission resource to update. Only role and expirationTime can be updated. |
permissionId | string | Yes | The ID of the permission. For anyone-type permissions, use 'anyone' as the permission ID. |
removeExpiration | boolean | No | Whether to remove the expiration date. |
supportsAllDrives | boolean | No | Whether the requesting application supports both My Drives and shared drives. |
transferOwnership | boolean | No | Whether to transfer ownership to the specified user. |
useDomainAdminAccess | boolean | No | Issue the request as a domain administrator. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Shared Drives
Section titled “List Shared Drives”GOOGLEDRIVE_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. Results may differ from the web UI due to admin policies; listing a drive does not guarantee access to its contents.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
q | string | No | Query string for searching shared drives using Google Drive query syntax (e.g., name contains 'ProjectX'). |
pageSize | integer | No | Maximum number of shared drives to return per page. Maximum allowed value is 1000. |
pageToken | string | No | Page token for shared drives. |
useDomainAdminAccess | boolean | No | Issue the request as a domain administrator. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Shared Drive
Section titled “Create Shared Drive”GOOGLEDRIVE_CREATE_DRIVE
Tool to create a new shared drive. Use when you need to programmatically create a new shared drive for collaboration or storage.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The name of this shared drive. |
hidden | boolean | No | Whether the shared drive is hidden from default view. |
themeId | string | No | The ID of the theme from which the background image and color will be set. |
colorRgb | string | No | The color of this shared drive as an RGB hex string. |
requestId | string | No | Optional. An ID for idempotent creation of a shared drive. |
backgroundImageFile | object | No | An image file and cropping parameters for setting a background image for this shared drive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
List Comments
Section titled “List Comments”GOOGLEDRIVE_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. Filtering by author, content, or other criteria must be done client-side.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
fields | string | No | A comma-separated list of fields to include in the response. Use * to include all fields. |
fileId | string | Yes | The ID of the file. |
pageSize | integer | No | The maximum number of comments to return per page. |
pageToken | string | No | The token for continuing a previous list request on the next page. |
includeDeleted | boolean | No | Whether to include deleted comments. Deleted comments will not include their original content. |
startModifiedTime | string | No | The minimum value of modifiedTime for the result comments (RFC 3339 date-time). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |
Create Comment
Section titled “Create Comment”GOOGLEDRIVE_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.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
anchor | string | No | A JSON string defining the region of the document to which the comment is anchored. |
content | string | Yes | The plain text content of the comment. |
file_id | string | Yes | The ID of the file. |
quoted_file_content_value | string | No | The quoted content itself. |
quoted_file_content_mime_type | string | No | The MIME type of the quoted content. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution. |
error | string | No | Error if any occurred during the execution of the action. |
successful | boolean | Yes | Whether or not the action execution was successful. |