Google Drive API integration with managed OAuth. List, search, create, and manage files and folders. Use this skill when users want to interact with Google Drive files. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Google Drive API integration with managed OAuth. List, search, create, and manage files and folders. Use this skill when users want to interact with Google Drive files. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
If you have multiple connections, always include this header to ensure requests go to the intended account.
Security & Permissions
Access is scoped to files, folders, permissions, and sharing within the connected Google Drive account.
All write operations require explicit user approval. Before executing any create, update, or delete call, confirm the target resource and intended effect with the user.
API Reference
List Files
GET /google-drive/drive/v3/files?pageSize=10
With query:
GET /google-drive/drive/v3/files?q=name%20contains%20'report'&pageSize=10
Only folders:
GET /google-drive/drive/v3/files?q=mimeType='application/vnd.google-apps.folder'
Files in specific folder:
GET /google-drive/drive/v3/files?q='FOLDER_ID'+in+parents
With fields:
GET /google-drive/drive/v3/files?fields=files(id,name,mimeType,createdTime,modifiedTime,size)
Get File Metadata
GET /google-drive/drive/v3/files/{fileId}?fields=id,name,mimeType,size,createdTime
Download File Content
GET /google-drive/drive/v3/files/{fileId}?alt=media
Export Google Docs
GET /google-drive/drive/v3/files/{fileId}/export?mimeType=application/pdf
Create File (metadata only)
POST /google-drive/drive/v3/files
Content-Type: application/json
{
"name": "New Document",
"mimeType": "application/vnd.google-apps.document"
}
Create Folder
POST /google-drive/drive/v3/files
Content-Type: application/json
{
"name": "New Folder",
"mimeType": "application/vnd.google-apps.folder"
}
If an upload is interrupted, query the upload URI to get current status:
req = urllib.request.Request(upload_uri, method='PUT')
req.add_header('Content-Length', '0')
req.add_header('Content-Range', 'bytes */*')
response = urllib.request.urlopen(req)
# Check Range header in response to get current offset
Pagination uses pageToken from previous response's nextPageToken
Export is for Google Workspace files only
Upload Types: Use uploadType=media for simple uploads (up to 5MB), uploadType=multipart for uploads with metadata (up to 5MB), uploadType=resumable for large files (recommended for > 5MB)
Upload Endpoint: File uploads use /upload/drive/v3/files (note the /upload prefix)
Resumable Uploads: For large files, use resumable uploads with chunked transfer (256KB minimum chunk size, 5MB recommended)
Max File Size: Google Drive supports files up to 5TB
IMPORTANT: When using curl commands, use curl -g when URLs contain brackets (fields[], sort[], records[]) to disable glob parsing
IMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments. You may get "Invalid API key" errors when piping.
Error Handling
Status
Meaning
400
Missing Google Drive connection
401
Invalid or missing Maton API key
429
Rate limited (10 req/sec per account)
4xx/5xx
Passthrough error from Google Drive API
Troubleshooting: API Key Issues
Check that the MATON_API_KEY environment variable is set:
echo$MATON_API_KEY
Verify the API key is valid by listing connections: