Google Drive
Google Drive
Section titled “Google Drive”Access and manage Google Drive files.
API Reference
Section titled “API Reference”This source provides a single flexible api_google-drive tool that accepts:
path: API endpoint (e.g., “/drive/v3/files”)method: HTTP method (GET, POST, PATCH, DELETE)params: Request body or query parameters
Common Endpoints
Section titled “Common Endpoints”| Endpoint | Method | Description |
|---|---|---|
| /drive/v3/files | GET | List files |
| /drive/v3/files/{id} | GET | Get file metadata |
| /drive/v3/files/{id}?alt=media | GET | Download file content |
| /drive/v3/files | POST | Create file (metadata) |
| /drive/v3/files/{id} | PATCH | Update file metadata |
| /drive/v3/files/{id} | DELETE | Delete file |
Search Syntax
Section titled “Search Syntax”Use the q parameter:
name contains 'keyword'- Name contains keywordmimeType = 'application/pdf'- File type filter'folderId' in parents- Files in foldermodifiedTime > '2024-01-01'- Modified after date
Guidelines
Section titled “Guidelines”- Privacy: This source accesses Google Drive files.
- File content: Use
alt=mediaquery param to download actual file content.
Setup Guide
Section titled “Setup Guide”Configuration
Section titled “Configuration”Required config.json:
{ "name": "Google Drive", "slug": "google-drive", "enabled": true, "provider": "google", "type": "api", "api": { "baseUrl": "https://www.googleapis.com/drive/v3/", "authType": "bearer", "googleService": "drive", "googleOAuthClientId": "your-client-id.apps.googleusercontent.com", "googleOAuthClientSecret": "your-client-secret" }, "iconUrl": "https://drive.google.com"}Authentication
Section titled “Authentication”See Google OAuth Setup for instructions on creating OAuth credentials, then use source_google_oauth_trigger to start the OAuth flow.