Overview
What Gets Indexed
| Source | Content |
|---|---|
| Google Drive | Files, folders, and metadata |
| Google Docs | Full document text and comments |
| Google Sheets | Sheet names, cell content, and formulas |
| Google Slides | Slide text and speaker notes |
| Gmail (optional) | Email subjects, bodies, and attachments |
How It Works
- A service account with domain-wide delegation accesses Google Workspace APIs
- The connector syncs content based on user permissions
- Permission inheritance ensures users only see content they have access to in Google Workspace
The connector uses read-only access. Omni cannot modify any content in your Google Workspace.
Prerequisites
Before setting up the Google Workspace connector, ensure you have:- Google Cloud Platform account with billing enabled
- Google Workspace admin access (Super Admin or delegated admin)
- Terraform (version >= 1.0) for automated setup, OR willingness to configure manually
- Google Cloud CLI (
gcloud) installed and authenticated
Setup Options
Automated Setup (Recommended)
Use Terraform to automate 80% of the setup process
Manual Setup
Step-by-step manual configuration
Automated Setup with Terraform
This Terraform configuration automates the Google Cloud setup, reducing setup time drastically.Step 1: Authenticate with Google Cloud
Step 2: Download the Terraform Configuration
Download the Google Workspace Terraform configuration from the Omni releases page:Step 3: Configure Variables
Copy and edit the configuration file:terraform.tfvars with your organization’s details:
Optional Configuration
Step 4: Run Terraform
What Terraform Creates
| Resource | Description |
|---|---|
| Google Cloud Project | New project with billing enabled |
| Service Account | With domain-wide delegation capability |
| APIs | Admin SDK, Drive, Gmail, Docs, Sheets, Slides enabled |
| Service Account Key | Saved locally for Omni configuration |
| Organization Tags | For project identification |
| Organization Policy | Restricts key creation to tagged projects |
Step 5: Complete Manual Steps
After Terraform completes, you’ll need to complete two manual steps that cannot be automated due to Google’s security model.5a. Configure Domain-Wide Delegation
- Open the Google Workspace Admin Console
- Navigate to Security → Access and data control → API controls
- Click Manage Domain Wide Delegation
- Click Add new
- Enter the Client ID from Terraform output
- Add the OAuth scopes from Terraform output:
- Click Authorize
5b. Configure Omni
- Navigate to Settings → Integrations in Omni
- Find Google Workspace and click Connect
- Paste the contents of the service account key file (
omni-service-account-key.json) - Enter your Google Workspace domain
- Enter the admin email address
- Click Connect, and click Configure against either the Drive or Gmail source
- Choose which sources you want enabled, select any specific users to include/exclude, and click Save Configuration
- Wait for the initial sync to complete
Your Google Workspace connector is now configured. Initial indexing may take a while, depending on the amount of content in your Google account.
Manual Setup
If you prefer not to use Terraform, follow these steps to configure the Google Workspace connector manually.Step 1: Create a Google Cloud Project
- Go to the Google Cloud Console
- Click Select a project → New Project
- Enter project name:
omni-workspace-integration - Select your organization
- Click Create
Step 2: Enable Required APIs
In your new project, enable these APIs:Step 3: Create Service Account
- Go to IAM & Admin → Service Accounts
- Click Create Service Account
- Name:
omni-workspace-connector - Description:
Service account for Omni Google Workspace integration - Click Create and Continue
- Skip the optional steps and click Done
Step 4: Enable Domain-Wide Delegation
- Click on the newly created service account
- Go to Details tab
- Under Advanced settings, click Domain-wide Delegation
- Check Enable G Suite Domain-wide Delegation
- Click Save
- Note the Client ID displayed
Step 5: Create Service Account Key
- Go to the Keys tab
- Click Add Key → Create new key
- Select JSON format
- Click Create
- Save the downloaded key file securely
Step 6: Configure Domain-Wide Delegation in Admin Console
Follow the same steps as 5a in the automated setup.Step 7: Configure Omni
Follow the same steps as 5b in the automated setup.Managing the Integration
Viewing Sync Status
Navigate to Settings → Integrations → Google Workspace to view:- Last sync time
- Number of indexed documents
- Any sync errors
Rotating Service Account Keys
It’s recommended to rotate service account keys every 90 days. Using Terraform:- Create a new key in Google Cloud Console
- Update the key in Omni settings
- Delete the old key
Removing the Integration
Using Terraform:- Remove the connector in Omni settings
- Delete the service account in Google Cloud
- Remove the domain-wide delegation entry in Admin Console
Troubleshooting
Billing account not found
Billing account not found
List available billing accounts and update your configuration:Ensure you have the Billing Account Administrator role on the billing account.
Organization not found
Organization not found
Verify your authentication:You need Organization Administrator role for Terraform setup.
Insufficient permissions
Insufficient permissions
The setup requires these roles:
- Organization Administrator - for org policies and tags
- Project Creator - to create the GCP project
- Billing Account User - to link billing
- Google Workspace Super Admin - for domain-wide delegation
API not enabled error
API not enabled error
APIs are enabled automatically but may take a few minutes to propagate. Check status:
Domain-wide delegation not working
Domain-wide delegation not working
Common causes:
- Client ID mismatch - verify the ID in Admin Console matches the service account
- Missing scopes - ensure all required scopes are added
- Propagation delay - wait 5-10 minutes for changes to take effect
- Wrong admin email - ensure the admin email has Google Workspace admin privileges
Sync taking too long
Sync taking too long
Initial sync duration depends on:
- Number of users in your organization
- Amount of content in Drive and Gmail
- API quota limits
Security Considerations
- Read-only access: The service account only has read permissions
- Permission inheritance: Users only see content they can access in Google Workspace
- Key security: Service account keys should be treated like passwords
- Audit logging: Enable Cloud Audit Logs to monitor API access
- Key rotation: Rotate service account keys every 90 days
What’s Next
Search Your Data
Learn how to search across Google Workspace content
AI Assistant
Ask questions about your documents and emails
Add More Connectors
Connect additional data sources