Google Drive Connector
Connect to Google Drive to index documents from personal drives and shared drives (Team Drives) in your Google Workspace.
Overview
The Google Drive connector allows you to:
- Index documents from personal My Drive
- Access shared drives (Team Drives)
- Convert Google Docs, Sheets, and Slides
- Sync permissions for access control
Prerequisites
Before connecting, ensure you have:
- A Google account or Google Workspace account
- Access to the files you want to index
- (For Workspace) Admin approval for third-party apps (if required)
Authentication
OAuth 2.0
Google Drive uses OAuth for secure authentication:
- Click Connect with Google during setup
- Sign in to your Google account
- Review requested permissions
- Click Allow to grant access
- You'll be redirected back to ZenSearch
Required Permissions
ZenSearch requests these scopes:
| Scope | Purpose |
|---|---|
drive.readonly | Read files and folders |
drive.metadata.readonly | Access file metadata |
Configuration
Basic Settings
| Setting | Description |
|---|---|
| Name | Display name for the connector |
| Include Shared Drives | Sync shared/team drives |
| Collection | Target collection for documents |
Folder Filters
Optionally limit to specific folders:
| Setting | Description |
|---|---|
| Root Folder ID | Start from a specific folder |
| Include Patterns | Folder paths to include |
| Exclude Patterns | Folder paths to exclude |
Setup Steps
1. Add Google Drive Connector
Go to Knowledge → Add Data Source → Google Drive
2. Authorize with Google
Click Connect with Google and complete the OAuth flow.
3. Configure Scope
Choose what to sync:
- My Drive: Your personal files
- Shared with Me: Files shared by others
- Shared Drives: Team drives you can access
4. Set Filters (Optional)
Limit sync to specific folders:
Root Folder ID: 1ABC123def456...
5. Select Collection
Choose or create a collection for the documents.
6. Test and Create
Test the connection, then click Create.
Supported File Types
Native Google Formats
Google Docs, Sheets, and Slides are converted automatically:
| Format | Converted To |
|---|---|
| Google Docs | Text/HTML |
| Google Sheets | CSV/Text |
| Google Slides | Text with slide content |
| Google Forms | Form questions and options |
Uploaded Files
Standard files are processed directly:
| Type | Extensions |
|---|---|
| Documents | .pdf, .docx, .doc, .txt |
| Spreadsheets | .xlsx, .xls, .csv |
| Presentations | .pptx, .ppt |
| Images | .png, .jpg (with OCR) |
| Code | .py, .js, .ts, .go, etc. |
Permission Sync
How It Works
ZenSearch syncs Google Drive sharing permissions:
- File owner and sharing settings are captured
- Permissions map to ZenSearch access control
- Search results respect user access rights
Permission Mapping
| Google Drive | ZenSearch |
|---|---|
| Owner | Full access |
| Editor | Read access |
| Commenter | Read access |
| Viewer | Read access |
| Domain sharing | Domain permission |
| Anyone with link | Public access |
Workspace Domains
For Google Workspace:
- Domain-restricted sharing is enforced
- External sharing follows Workspace policies
- Admin-controlled permissions are respected
Real-time Sync
Push Notifications
Google Drive supports push notifications for changes:
- New files are detected immediately
- Modified files trigger re-indexing
- Deleted files are removed from index
- Permission changes update access
Webhook Configuration
Webhooks are configured automatically during setup. No additional configuration required.
Folder Structure
Organizing Content
Google Drive folder structure is preserved:
My Drive/
├── Projects/
│ ├── Project A/
│ └── Project B/
├── Reports/
│ ├── 2023/
│ └── 2024/
└── Shared/
Path Filtering
Filter by folder path:
Include: /Projects/*
Exclude: /Projects/Archive/*
Best Practices
Security
- Use organization accounts when possible
- Review shared permissions regularly
- Enable permission sync for access control
- Audit connected apps in Google Admin
Performance
- Start with specific folders for large drives
- Exclude archive folders
- Remove duplicates before syncing
- Use appropriate file naming conventions
Organization
- Maintain clean folder structures
- Use consistent naming conventions
- Archive old content to excluded folders
- Keep shared drives organized
Troubleshooting
Authorization Failed
- Check Google account is active
- Verify third-party app access is enabled
- Re-authorize if permissions were revoked
- Contact Workspace admin if apps are blocked
Missing Files
- Verify you have access to the files
- Check folder filter settings
- Ensure files aren't in trash
- Wait for sync to complete
Permission Errors
- Verify sharing settings on files
- Check Workspace sharing policies
- Ensure permission sync is enabled
- Review domain restrictions
Slow Sync
- Large drives take longer initially
- Many small files increase sync time
- Consider folder filtering
- Check network connectivity
Example Configurations
Full Drive Sync
Name: Marketing Google Drive
Include Shared Drives: true
Include Shared With Me: true
Collection: Marketing Documents
Specific Folder Only
Name: Project Documentation
Root Folder ID: 1ABC123def456GHI789
Include Shared Drives: false
Collection: Project Docs
Shared Drives Only
Name: Team Shared Drives
Include My Drive: false
Include Shared Drives: true
Collection: Team Knowledge Base
Google Workspace Admin
Enabling Third-Party Access
If your organization restricts app access:
- Go to Google Admin Console
- Navigate to Security → API Controls
- Add ZenSearch to trusted apps
- Or enable access for specific organizational units
Monitoring Connected Apps
- View connected apps in Admin Console
- Review data access permissions
- Revoke access if needed