Google Drive Integration
Index and search files from your Google Drive.
Supported Sources
- Google Drive - Folders, shared drives, and individual files
> Note: Native Google Docs, Sheets, Slides, and Gmail integrations are on our roadmap. Currently, only Google Drive file sync is supported. Google Docs/Sheets/Slides stored in Drive are exported and indexed as their content.
Setup
1. Google Cloud Setup
- Go to Google Cloud Console
- Create or select a project
- Enable the Google Drive API
- Create OAuth credentials
- Configure consent screen
2. Configure in LH42
- Go to Settings > Integrations > Google
- Upload credentials JSON
- Authorize access
- Select domain (for Workspace admins)
3. Select Drive Sources
python
client.integrations.google.configure({
"sources": [
{"type": "drive_folder", "id": "folder-id"},
{"type": "shared_drive", "id": "drive-id"},
{"type": "user_drive", "email": "user@company.com"}
]
})Sync Configuration
python
client.integrations.google.sync({
"mode": "incremental",
"include_trashed": False,
"schedule": "0 2 * * *" # Daily at 2 AM
})File Handling
Files in Google Drive are processed based on type:
- Google Docs - Exported as plain text
- Google Sheets - Exported as CSV data
- Google Slides - Exported as text content
- PDFs, Office docs, etc. - Processed directly
Permissions
LH42 respects Google Drive permissions:
- Individual file permissions
- Shared drive memberships
- Folder-level inheritance
Monitoring
python
status = client.integrations.google.status()
print(f"Synced: {status.document_count} documents")
print(f"Pending: {status.pending_count}")Roadmap
The following Google Workspace integrations are planned for future releases:
- Google Docs API - Direct document access with formatting
- Google Sheets API - Structured spreadsheet data
- Google Slides API - Presentation content with speaker notes
- Gmail - Email indexing