Skip to main content

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:

  1. Click Connect with Google during setup
  2. Sign in to your Google account
  3. Review requested permissions
  4. Click Allow to grant access
  5. You'll be redirected back to ZenSearch

Required Permissions

ZenSearch requests these scopes:

ScopePurpose
drive.readonlyRead files and folders
drive.metadata.readonlyAccess file metadata

Configuration

Basic Settings

SettingDescription
NameDisplay name for the connector
Include Shared DrivesSync shared/team drives
CollectionTarget collection for documents

Folder Filters

Optionally limit to specific folders:

SettingDescription
Root Folder IDStart from a specific folder
Include PatternsFolder paths to include
Exclude PatternsFolder paths to exclude

Setup Steps

1. Add Google Drive Connector

Go to KnowledgeAdd Data SourceGoogle 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:

FormatConverted To
Google DocsText/HTML
Google SheetsCSV/Text
Google SlidesText with slide content
Google FormsForm questions and options

Uploaded Files

Standard files are processed directly:

TypeExtensions
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:

  1. File owner and sharing settings are captured
  2. Permissions map to ZenSearch access control
  3. Search results respect user access rights

Permission Mapping

Google DriveZenSearch
OwnerFull access
EditorRead access
CommenterRead access
ViewerRead access
Domain sharingDomain permission
Anyone with linkPublic 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:

  1. New files are detected immediately
  2. Modified files trigger re-indexing
  3. Deleted files are removed from index
  4. 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

  1. Use organization accounts when possible
  2. Review shared permissions regularly
  3. Enable permission sync for access control
  4. Audit connected apps in Google Admin

Performance

  1. Start with specific folders for large drives
  2. Exclude archive folders
  3. Remove duplicates before syncing
  4. Use appropriate file naming conventions

Organization

  1. Maintain clean folder structures
  2. Use consistent naming conventions
  3. Archive old content to excluded folders
  4. Keep shared drives organized

Troubleshooting

Authorization Failed

  1. Check Google account is active
  2. Verify third-party app access is enabled
  3. Re-authorize if permissions were revoked
  4. Contact Workspace admin if apps are blocked

Missing Files

  1. Verify you have access to the files
  2. Check folder filter settings
  3. Ensure files aren't in trash
  4. Wait for sync to complete

Permission Errors

  1. Verify sharing settings on files
  2. Check Workspace sharing policies
  3. Ensure permission sync is enabled
  4. Review domain restrictions

Slow Sync

  1. Large drives take longer initially
  2. Many small files increase sync time
  3. Consider folder filtering
  4. 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:

  1. Go to Google Admin Console
  2. Navigate to SecurityAPI Controls
  3. Add ZenSearch to trusted apps
  4. Or enable access for specific organizational units

Monitoring Connected Apps

  1. View connected apps in Admin Console
  2. Review data access permissions
  3. Revoke access if needed