Google Drive connector

Search, upload, read, share, and organize Google Drive files and shared drives from AgentRuntime workflows.

On this page

The google-drive connector uses the Google Drive API. Workflows can search and list files, upload and read content, create folders, share files, move and copy items, export Google documents as PDF, and manage shared drives.

Prerequisites

  • A Google account that can use Google Drive.
  • A Google account connection in AgentRuntime with the Google Drive service ticked. See Google Workspace.
  • The project_contributor role or higher in your workspace, which lets you manage connections and MCP instances. See Roles and permissions.

Connect in AgentRuntime

  1. Sign in with Google

    Go to Connections. In the Accounts section, click Sign in with Google. Enter a display name, tick Google Drive (and any other Google services you plan to use), click Continue to Google, and approve the permissions. If you already connected a Google account with this service ticked, skip this step. If Sign in with Google is missing or Continue to Google is disabled, Google sign-in is not set up for your workspace: contact support. See Connections.

  2. Add the connector to your workspace

    Click MCP in the sidebar, then Add connectors. Find Google Drive in the App catalog, select it, and click Add to workspace. The instance now appears on the MCP connectors page. See MCP instances.

  3. Attach your Google account to a profile

    Open the new instance to reach Instance config. Under Profiles for this connector, click New profile, enter a Display name, and on the Use a saved connection tab choose your Google account under Which connection?. Set Status to Active — can be used in workflows, click Save, then click Use this profile for workflows. You do not enter tokens yourself.

  4. Test it

    In Workflow Studio, add the google_drive_search_files tool from your Google Drive instance (use Browse platform MCP if it is not listed), fill in its arguments, and run the workflow. A successful step means the connection works. Set query to part of a file name.

What you can build

  • File intake. An email or webhook delivers an attachment and google_drive_upload_file stores it in the right folder.
  • Client handoff. google_drive_save_file_as_pdf exports a finished doc, then google_drive_add_permission shares it with the client.
  • Cleanup. A scheduled run uses google_drive_search_files to find old files, google_drive_move_file archives them, and google_drive_trash_file removes duplicates after a Human approval.
  • Backups. google_drive_list_files and google_drive_read_file copy files elsewhere.

Tools

The Required arguments column lists the fields the tool's input schema marks as required. Some of them are optional in practice; if you have nothing to set, pass an empty value such as "", [], {}, or false.

Tools marked Delete remove data. google_drive_delete_file skips the trash, so it cannot be undone. Use google_drive_trash_file if you want a way back.

Search and read

ToolAccessWhat it doesRequired arguments
google_drive_get_file_by_idReadGet Google Drive file or folder metadata by file ID.file_id
google_drive_get_shared_driveReadGet a Google shared drive by ID.drive_id
google_drive_list_filesReadList files in a Google Drive folder, with optional recursion into subfolders.folder_id
google_drive_list_shared_drivesReadList Google shared drives visible to the authenticated user.—
google_drive_read_fileReadRead a Drive file and return base64 content, exporting Google Docs, Sheets, and Slides when needed.file_id
google_drive_search_filesReadSearch Google Drive files and folders by name, full text, or MIME type.query

Create and upload

ToolAccessWhat it doesRequired arguments
google_drive_create_folderWriteCreate an empty folder in Google Drive.folder_name
google_drive_create_shared_driveWriteCreate a new Google shared drive.name
google_drive_create_shortcutWriteCreate a Google Drive shortcut to an existing file or folder.target_id, name
google_drive_create_text_fileWriteCreate a text file in Google Drive from inline text content.file_name, text
google_drive_duplicate_fileWriteCopy a Google Drive file into a target folder.file_id, name, folder_id
google_drive_save_file_as_pdfWriteExport a Google document as PDF and save the PDF into Drive.document_id, folder_id, name
google_drive_upload_fileWriteUpload a base64-encoded file to Google Drive.file_name, file_base64

Sharing

ToolAccessWhat it doesRequired arguments
google_drive_add_permissionWriteGrant a Drive permission to a user on a file or folder.file_id, user_email, role, send_invitation_email
google_drive_delete_permissionDeleteRemove a Drive permission from a file or folder.file_id, user_email, role
google_drive_set_public_accessWriteMake a Drive file or folder accessible to anyone with the link.file_id

Organize, update, and delete

ToolAccessWhat it doesRequired arguments
google_drive_delete_fileDeletePermanently delete a Drive file without sending it to trash.file_id
google_drive_delete_file_revisionDeletePermanently delete a specific revision of a Drive file.file_id, revision_id
google_drive_delete_shared_driveDeleteDelete an empty Google shared drive.drive_id
google_drive_move_fileWriteMove a Drive file from its current parent folders to a new folder.file_id, folder_id
google_drive_trash_fileDeleteMove a Drive file to trash.file_id
google_drive_update_fileWriteUpdate Google Drive file metadata such as name or description.file_id
google_drive_update_shared_driveWriteUpdate Google shared drive metadata such as name.drive_id

Example

Upload a generated PDF to a client folder. file_base64 is the file content as base64 text.

{
  "id": "upload-report",
  "type": "mcp",
  "name": "Upload report PDF",
  "tool_name": "google_drive_upload_file",
  "tool_args": {
    "file_name": "Q1-report-{{input.client_slug}}.pdf",
    "file_base64": "{{steps.render-pdf.result.pdf_base64}}",
    "mime_type": "application/pdf",
    "parent_folder": "{{input.client_folder_id}}"
  },
  "depends_on": [
    "render-pdf"
  ],
  "timeout_s": 90
}

Configuration

Google connectors take no keys from you: the permissions come from your Google account connection.

Google permissions (scopes) requested when you tick this service:

  • https://www.googleapis.com/auth/drive

Signing in also requests openid and https://www.googleapis.com/auth/userinfo.email so AgentRuntime can tell which Google account signed in.

Troubleshooting

ProblemWhat to do
A file in a shared drive is not foundSet include_team_drives to true on search, list, and move calls.
google_drive_read_file returns unexpected contentIt returns base64 content, and exports Google Docs, Sheets, and Slides when needed. Check the file ID.
Permission denied on a moveThe account needs edit access to both the source and the destination folder.
Google access stopped workingOpen Connections, open the Google account, and click Reconnect. If you removed a permission, click Update permissions and tick the service again.
Edit this pageagentruntime-io/agentruntime-docs