Google Drive

Data & APIs

Google Drive API integration with managed OAuth. Search Drive files, manage permissions, organize folders, upload and download files, and handle sharing changes. Use this skill when users want to find, organize, share, or move files in Google Drive.

Install

openclaw skills install google-drive-files

Google Drive

Google Drive

Access Google Drive via the Google Drive API with managed OAuth authentication. Search files, manage permissions, organize folders, upload and download, and handle sharing changes.

This skill uses ClawLink for hosted connection flows and credentials so you do not need to configure Google Drive API access yourself.

Setup in 3 Steps

Step 1: InstallStep 2: Pair AccountStep 3: Connect Google Drive
InstallPairApp-specific connection GIF coming soon
Run the install command in OpenClawSign in and approve the deviceOpen the dashboard and connect Google Drive

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│   Google Drive   │
│   (User Chat)   │     │   (OAuth)    │     │   (Drive API)    │
└─────────────────┘     └──────────────┘     └──────────────────┘
         │                       │                       │
         │  1. Install Plugin    │                       │
         │  2. Pair Device       │                       │
         │  3. Connect Drive     │                       │
         │                       │  4. Secure Token       │
         │                       │  5. Proxy Requests    │
         │                       │                       │
         ▼                       ▼                       ▼
   ┌──────────┐           ┌──────────┐           ┌──────────┐
   │  SKILL   │           │ Dashboard│           │  Google  │
   │  File    │           │ Auth     │           │  Drive   │
   └──────────┘           └──────────┘           └──────────┘

Install

Install the verified ClawLink plugin from ClawHub. After the user confirms, complete the full setup so ClawLink tools are visible in the next OpenClaw chat.

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Then tell the user: "OpenClaw has been restarted. Send /new as a standalone message to start a fresh chat, then ask for Google Drive again."

Quick Start

# Find a file by name
clawlink_call_tool --tool "googledrive_find_file" --params '{"query": "report.xlsx"}'

# Get file metadata
clawlink_call_tool --tool "googledrive_get_file_metadata" --params '{"file_id": "YOUR_FILE_ID"}'

# List permissions
clawlink_call_tool --tool "googledrive_list_permissions" --params '{"file_id": "YOUR_FILE_ID"}'

Authentication

All Google Drive tool calls are authenticated automatically by ClawLink using the user's connected Google account.

No API key is required in chat. ClawLink stores the OAuth token securely and injects it into every Google Drive API request on the user's behalf.

Getting Connected

  1. Install the ClawLink plugin (see Install above).
  2. Pair the plugin with clawlink_begin_pairing if it is not configured yet.
  3. Open https://claw-link.dev/dashboard?add=google-drive and connect Google Drive.
  4. Call clawlink_list_integrations to verify the connection is active.

Connection Management

List Connections

clawlink_list_integrations

Response: Returns all connected integrations. Look for google-drive in the list.

Verify Connection

clawlink_list_tools --integration google-drive

Response: Returns the live tool catalog for Google Drive.

Reconnect

If Google Drive tools are missing or the connection shows an error:

  1. Direct the user to https://claw-link.dev/dashboard?add=google-drive
  2. After they confirm, call clawlink_list_integrations to verify
  3. Then call clawlink_list_tools --integration google-drive

Security & Permissions

  • Access is scoped to files and folders within the connected Google account (My Drive and shared drives).
  • All write operations require explicit user confirmation. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
  • Destructive actions (delete, empty trash, delete permission) are marked as high-impact and must be confirmed.
  • Permission changes may have a brief propagation delay before appearing in results.

Tool Reference

File & Folder Discovery

ToolDescriptionMode
googledrive_find_fileSearch files by name, MIME type, date, query string, and moreRead
googledrive_find_folderFind a folder by name and optional parent folderRead
googledrive_list_children_v2List immediate children of a folderRead
googledrive_get_file_metadataGet file metadata (MIME type, parents, trashed status)Read
googledrive_list_shared_drivesList all accessible shared drivesRead
googledrive_get_driveGet a specific shared drive's metadataRead
googledrive_get_aboutGet user info, storage quota, and Drive capabilitiesRead

File Creation & Upload

ToolDescriptionMode
googledrive_create_fileCreate an empty file or folder (content added separately)Write
googledrive_create_file_from_textCreate a file from text content (up to 10MB) with optional format conversionWrite
googledrive_create_folderCreate a new folder (parent must already exist)Write
googledrive_upload_fileUpload a binary file up to 5MB to a folderWrite
googledrive_upload_from_urlFetch a file from a URL and upload to Drive server-sideWrite
googledrive_resumable_uploadStart and complete a resumable upload session for large filesWrite
googledrive_upload_update_fileReplace contents of an existing fileWrite
googledrive_edit_fileOverwrite binary file content (not for Google Workspace files)Write

Download & Export

ToolDescriptionMode
googledrive_download_fileDownload a file by ID, optionally export Google Workspace filesRead
googledrive_download_file_operationDownload via long-running operation (for Google Vids, large files)Read
googledrive_export_google_workspace_fileExport a Google Doc/Sheet/Slide to a specified MIME typeRead

File Organization

ToolDescriptionMode
googledrive_move_fileMove a file between folders (supply both add_parents and remove_parents)Write
googledrive_copy_file_advancedCopy a file with advanced options (labels, visibility, metadata)Write
googledrive_add_parentAdd a parent folder to a fileWrite
googledrive_delete_parentRemove a file from a folderWrite
googledrive_insert_childAdd an existing file to a folderWrite
googledrive_delete_childRemove a file from a specific folderWrite
googledrive_create_shortcut_to_fileCreate a shortcut to an existing Drive itemWrite

File Metadata & Properties

ToolDescriptionMode
googledrive_update_file_metadata_patchUpdate file metadata (name, description, labels) using PATCHWrite
googledrive_update_file_putUpdate file metadata using PUT semantics (partial update)Write
googledrive_add_propertyAdd or update a custom key-value property on a fileWrite
googledrive_patch_propertyPartially update a file propertyWrite
googledrive_update_file_propertyUpdate an existing file propertyWrite
googledrive_get_file_propertyGet a specific custom property from a fileRead
googledrive_list_file_propertiesList all custom properties on a fileRead
googledrive_delete_propertyDelete a property from a fileWrite
googledrive_modify_file_labelsAdd, update, or remove labels on a fileWrite
googledrive_list_file_labelsList labels applied to a fileRead

Permissions & Sharing

ToolDescriptionMode
googledrive_create_permissionShare a file or folder with users, groups, domains, or publiclyWrite
googledrive_update_permissionUpdate an existing permissionWrite
googledrive_patch_permissionPartially update a permissionWrite
googledrive_delete_permissionRevoke access from a file (including link-sharing)Write
googledrive_list_permissionsList all permissions on a file or shared driveRead
googledrive_get_permissionGet a specific permission by IDRead
googledrive_get_permission_id_for_emailConvert an email address to a permission IDRead
googledrive_list_access_proposalsList pending access proposals on a fileRead
googledrive_list_approvalsList approval workflow approvals on a fileRead

Comments & Replies

ToolDescriptionMode
googledrive_create_commentCreate a comment on a fileWrite
googledrive_list_commentsList all comments on a fileRead
googledrive_get_commentGet a specific comment by IDRead
googledrive_update_commentUpdate a comment's contentWrite
googledrive_delete_commentPermanently delete a comment thread and all repliesWrite
googledrive_create_replyReply to an existing commentWrite
googledrive_list_repliesList replies to a commentRead
googledrive_get_replyGet a specific replyRead
googledrive_update_replyUpdate a replyWrite
googledrive_delete_replyDelete a specific replyWrite

Shared Drives

ToolDescriptionMode
googledrive_create_driveCreate a new shared driveWrite
googledrive_update_driveUpdate shared drive metadata (name, theme, restrictions)Write
googledrive_delete_drivePermanently delete a shared driveWrite
googledrive_hide_driveHide a shared drive from the default viewWrite
googledrive_unhide_driveRestore a shared drive to the default viewWrite

Revision Management

ToolDescriptionMode
googledrive_list_revisionsList a file's revision metadataRead
googledrive_get_revisionGet a specific revision's metadataRead
googledrive_update_file_revision_metadataUpdate revision metadata (keepForever, published)Write
googledrive_delete_revisionPermanently delete a file revisionWrite

Trash & Deletion

ToolDescriptionMode
googledrive_trash_fileMove a file to trash (soft delete, recoverable)Write
googledrive_untrash_fileRestore a file from trashWrite
googledrive_google_drive_delete_folder_or_file_actionPermanently delete a file or folderWrite
googledrive_empty_trashPermanently delete ALL trashed files (irreversible)Write

Change Tracking

ToolDescriptionMode
googledrive_get_changes_start_page_tokenGet the starting token for listing future changesRead
googledrive_list_changesList file changes since a page tokenRead
googledrive_watch_changesSubscribe to push notifications for Drive changesWrite
googledrive_watch_fileSubscribe to push notifications for a specific fileWrite
googledrive_stop_watch_channelStop an active watch channelWrite

Utility

ToolDescriptionMode
googledrive_generate_idsPre-allocate file IDs for new files or copiesRead
googledrive_get_appGet information about a Drive app by IDRead
googledrive_get_childVerify a specific child exists in a folderRead
googledrive_get_parentGet a specific parent reference for a fileRead

Code Examples

Search for files by name

clawlink_call_tool --tool "googledrive_find_file" \
  --params '{
    "query": "name contains '\''report'\''"
  }'

Create a folder

clawlink_call_tool --tool "googledrive_create_folder" \
  --params '{
    "name": "Project Files",
    "parent_folder_id": "YOUR_FOLDER_ID"
  }'

Share a file with someone

clawlink_call_tool --tool "googledrive_create_permission" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "type": "user",
    "email": "colleague@example.com",
    "role": "writer",
    "pending_owner": false
  }'

Move a file to a folder

clawlink_call_tool --tool "googledrive_move_file" \
  --params '{
    "file_id": "YOUR_FILE_ID",
    "add_parents": ["DESTINATION_FOLDER_ID"],
    "remove_parents": ["SOURCE_FOLDER_ID"]
  }'

Download and export a Google Sheet as CSV

clawlink_call_tool --tool "googledrive_download_file" \
  --params '{
    "file_id": "YOUR_SHEET_ID",
    "mime_type": "text/csv"
  }'

Trash a file

clawlink_call_tool --tool "googledrive_trash_file" \
  --params '{
    "file_id": "YOUR_FILE_ID"
  }'

Discovery Workflow

  1. Call clawlink_list_integrations to confirm Google Drive is connected.
  2. Call clawlink_list_tools --integration google-drive to see the live catalog.
  3. Treat the returned list as the source of truth. Do not guess or assume what tools exist.
  4. If the user describes a capability but the exact tool is unclear, call clawlink_search_tools with a short query and integration google-drive.
  5. If no Google Drive tools appear, direct the user to https://claw-link.dev/dashboard?add=google-drive.

Execution Workflow

┌─────────────────────────────────────────────────────────────┐
│  READ OPERATIONS (Safe)                                     │
│  find → list → get → describe → call                        │
│                                                             │
│  Example: Find file → Get metadata → Show results           │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│  WRITE OPERATIONS (Require Confirmation)                    │
│  describe → preview → confirm → call                        │
│                                                             │
│  Example: Describe tool → Preview changes → User approves    │
│           → Execute update                                   │
└─────────────────────────────────────────────────────────────┘
  1. For unfamiliar tools, ambiguous requests, or any write action, call clawlink_describe_tool first.
  2. Use the returned guidance, schema, whenToUse, askBefore, safeDefaults, examples, and followups to shape the call.
  3. Prefer search, list, and metadata reads before writes.
  4. For uploads, sharing updates, folder changes, or other high-impact actions, call clawlink_preview_tool first.
  5. Execute with clawlink_call_tool. Pass confirmation only after the preview matches the user's intent.
  6. If the tool call fails, report the real error. Do not invent results or restate the failure as a missing capability unless the live catalog supports that conclusion.

Notes

  • File IDs are stable across moves — capture from list/search responses for subsequent operations.
  • storageQuota in get_about reflects My Drive only, not shared drives.
  • Concurrent permission operations on the same file are not supported — only the last update is applied.
  • For Google Workspace native files (Docs, Sheets, Slides), use the dedicated API tools (googledocs_, googlesheets_) rather than GOOGLEDRIVE_EDIT_FILE.
  • Empty trash is irreversible — always confirm with the user first.
  • Newly created files are private by default — set sharing permissions afterward.

Error Handling

Status / ErrorMeaning
Tool not foundThe tool name does not exist in the current catalog. Verify with clawlink_list_tools --integration google-drive.
Missing connectionGoogle Drive is not connected. Direct the user to https://claw-link.dev/dashboard?add=google-drive.
RESOURCE_NOT_FOUNDFile or folder does not exist. Check the file_id or path.
PERMISSION_DENIEDNo access to the file. Check sharing permissions.
INVALID_ARGUMENTInvalid parameter or missing required field. Review the tool schema with clawlink_describe_tool.
Write rejectedUser did not confirm a write action. Always confirm before executing writes.

Troubleshooting: Tools Not Visible

  1. Check that the ClawLink plugin is installed:
    openclaw plugins list
    
  2. If the plugin is installed but tools are missing, tell the user to send /new as a standalone message to reload the catalog.
  3. If a fresh chat does not help, run:
    openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
    openclaw gateway restart
    
  4. After restart, tell the user to send /new again and retry.

Troubleshooting: Invalid Tool Call

  1. Ensure the integration slug is exactly google-drive.
  2. Use clawlink_describe_tool to verify parameter names and types before calling.
  3. For write operations, always call clawlink_preview_tool first.

Resources

Related Skills


Powered by ClawLink — an integration hub for OpenClaw

ClawLink Logo