Skip to main content
The google-drive MCP adapter wraps the Google Drive API. Use it in workflow mcp_call steps to search and list files, upload attachments, export Google Docs as PDF, manage permissions, and move or archive content across folders — including shared drives when enabled.

Prerequisites

  • A Google account with Google Drive access
  • A Google Workspace connection in AgentRuntime (OAuth via the Google account card on Connections)
  • project_contributor access in your workspace

Connect in AgentRuntime

1

Connect Google

On Connections, use the Google account card and complete OAuth. See Google Workspace setup and Connections.
2

Enable Drive

On your Google connection, enable the Drive service so the account exposes Drive API scopes.
3

Add google-drive MCP instance

Go to MCP, click Add instance for google-drive. Open Instance config, wire your Google connection, and set the profile active.
4

Test in a workflow

Smoke-test with mcp_call in Workflow Studio. Test with list_files on a known folder ID before production workflows.

What you can build

  • Invoice archivegmail attachment webhook → upload_file to Invoices/{{year}} folder → google-sheets log file ID and vendor.
  • Client deliverable handoffgoogle-docs finished doc → save_file_as_pdfset_public_access or add_permission for client email → notify via gmail.
  • Shared drive janitor — Schedule trigger → search_files for stale MIME types → move_file to archive folder → trash_file on duplicates after human_task.
  • Backup mirrorlist_files with recursion → read_file → upload to amazon-s3 or duplicate to backup folder with duplicate_file.

Tools

Search & read

ToolDescription
search_filesSearch Google Drive files and folders by name, full text, or MIME type.
list_filesList files in a Google Drive folder, with optional recursion into subfolders.
get_file_by_idGet Google Drive file or folder metadata by file ID.
read_fileRead a Drive file and return base64 content, exporting Google Docs, Sheets, and Slides when needed.
save_file_as_pdfExport a Google document as PDF and save the PDF into Drive.

Create & upload

ToolDescription
create_folderCreate an empty folder in Google Drive.
create_text_fileCreate a text file in Google Drive from inline text content.
upload_fileUpload a base64-encoded file to Google Drive.
duplicate_fileCopy a Google Drive file into a target folder.

Permissions & sharing

ToolDescription
add_permissionGrant a Drive permission to a user on a file or folder.
delete_permissionRemove a Drive permission from a file or folder.
set_public_accessMake a Drive file or folder accessible to anyone with the link.

Organize & delete

ToolDescription
move_fileMove a Drive file from its current parent folders to a new folder.
trash_fileMove a Drive file to trash.
delete_filePermanently delete a Drive file without sending it to trash.

Example

Upload a generated report PDF to a client folder:
{
  "id": "upload-report",
  "type": "mcp_call",
  "name": "Upload report PDF",
  "tool_name": "upload_file",
  "tool_args": {
    "file_name": "Q1-report-{{input.client_slug}}.pdf",
    "file_base64": "{{steps.render-pdf.result.base64}}",
    "mime_type": "application/pdf",
    "parent_folder": "{{input.client_folder_id}}"
  },
  "depends_on": ["render-pdf"],
  "timeout_s": 90
}

Troubleshooting

IssueFix
Reconnect prompt on Google connectionRe-authorize OAuth; Drive scopes may have been revoked
File not found in shared driveSet include_team_drives: true on search, list, and move operations
read_file returns empty or wrong typeGoogle-native files are exported automatically; confirm the file ID and MIME type
Permission denied on move_fileCaller needs writer access on source and destination; use get_file_by_id to verify parents