Google Drive Connector
Sync files from Google Drive including native Google Docs, Sheets, Slides, and uploaded files.
Features
- Google Docs - Exported as text with formatting preserved
- Google Sheets - Exported as CSV data
- Google Slides - Exported as text content
- PDFs, Office docs - Processed directly
- Incremental sync - Only changed files re-indexed
- Shared drives - Full support for team drives
- Folder filtering - Sync specific folders only
Prerequisites
- A Google Cloud project with Drive API enabled
- OAuth credentials configured
- Admin access (for organization-wide sync)
Setup
Step 1: Connect via OAuth
- Go to Settings > Integrations
- Find Google Drive and click Connect
- Sign in with your Google account
- Grant the requested permissions:
- drive.readonly - Read file content
- drive.metadata.readonly - Read file metadata
Step 2: Configure Sync Settings
After connecting, configure what to sync:
python
client.connectors.configure("google_drive", {
"settings": {
"folder_id": "optional-root-folder-id", # Limit to folder
"include_shared": True, # Include shared files
"file_types": ["document", "spreadsheet", "pdf", "text"]
}
})Available file types:
document- Google Docs, .docx, .docspreadsheet- Google Sheets, .xlsx, .xls, .csvpresentation- Google Slides, .pptx, .pptpdf- PDF filestext- .txt, .md, .html
Step 3: Start Initial Sync
python
# Trigger first full sync
client.connectors.sync("google_drive", mode="full")API Reference
List Files
bash
GET /api/connectors/{connector_id}/files?limit=50
# Response
{
"files": [
{
"id": "file_abc123",
"external_id": "1BxiMVs0XRA5nFMdKvBd...",
"name": "Q4 Report",
"mime_type": "application/vnd.google-apps.document",
"modified_time": "2026-01-20T10:30:00Z",
"synced": true
}
]
}Trigger Sync
bash
POST /api/connectors/{connector_id}/sync
{
"mode": "incremental"
}Supported MIME Types
| Google Type | Exported As |
|---|---|
application/vnd.google-apps.document | Plain text |
application/vnd.google-apps.spreadsheet | CSV |
application/vnd.google-apps.presentation | Plain text |
application/pdf | Extracted text |
application/vnd.openxmlformats-officedocument.* | Extracted text |
Permissions
Google Drive permissions are respected:
- Files shared with the authenticated user are accessible
- Shared drive membership determines access
- Permission changes sync within 1 hour
Sync Frequency
| Mode | Frequency | Use Case |
|---|---|---|
| Scheduled | Every 4 hours | Standard sync |
| On-demand | Manual trigger | Immediate updates |
| Webhook | Near real-time | Google Workspace Enterprise |
Troubleshooting
"Access denied" errors
- Verify the file is shared with the connected account
- Check OAuth scopes include
drive.readonly
Missing files
- Verify file type is in the configured
file_types - Check folder filter isn't excluding the file
Stale content
- Trigger manual sync:
POST /api/connectors/{id}/sync - Check sync status for errors
Next Steps
- Notion Connector - Connect Notion
- Integrations Overview - Architecture overview