Google Drive via Composio
Environment
COMPOSIO_API_KEY # API key
COMPOSIO_USER_ID # Entity ID (required for all requests)
COMPOSIO_CONNECTIONS # JSON with .googledrive connection ID
Core Pattern
CONNECTION_ID=$(echo $COMPOSIO_CONNECTIONS | jq -r '.googledrive')
curl -s "https://backend.composio.dev/api/v3/tools/execute/ACTION_NAME" \
-H "x-api-key: $COMPOSIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {}
}' | jq '.data'
Quick Start
# List files
curl -s "https://backend.composio.dev/api/v3/tools/execute/GOOGLEDRIVE_LIST_FILES" \
-H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {}
}' | jq
# Search files
curl -s "https://backend.composio.dev/api/v3/tools/execute/GOOGLEDRIVE_SEARCH_FILES" \
-H "x-api-key: $COMPOSIO_API_KEY" -H "Content-Type: application/json" \
-d '{
"connected_account_id": "'$CONNECTION_ID'",
"entity_id": "'$COMPOSIO_USER_ID'",
"arguments": {"query": "name contains 'report'"}
}' | jq
All Actions
See references/actions.md for complete API reference including:
- Files: list, search, get metadata, download, upload, delete
- Folders: create, list contents
- Sharing: share with users
Discover Actions
curl -s "https://backend.composio.dev/api/v2/actions?apps=googledrive" \
-H "x-api-key: $COMPOSIO_API_KEY" | jq '.items[] | {name, description}'