Overview
What Gets Indexed
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)
- Google Cloud CLI (
gcloud) installed and authenticated (optional, for enabling APIs via CLI)
Setup
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: Get the Client ID
- Click on the newly created service account
- Go to the Details tab
- Under Advanced settings, copy the Client ID (also shown as the service account’s Unique ID) — you’ll need this in Step 6 to authorize domain-wide delegation
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
- 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 Step 4
- Add the following OAuth scopes:
- Click Authorize
Step 7: Configure Omni
- Navigate to Settings → Integrations in Omni
- Find Google Workspace and click Connect
- Choose whether to create Google Drive, Gmail, Google Chat, or any combination of those sources
- Paste the contents of the service account key file from Step 5
- Enter your Google Workspace domain
- Enter the admin email address
- Click Connect
- Use Settings on each created source to adjust source settings, then click Sync to start the initial sync
Your Google Workspace connector is now configured. Initial indexing may take a while, depending on the amount of content in your Google account.
Managing the Integration
Gmail Attachments
When Gmail is enabled, Omni indexes supported message attachments in addition to message bodies. Supported attachment formats include PDFs, DOCX, XLSX, PPTX, XLS, text, HTML, CSV, and Markdown. Unsupported binary formats are skipped.Google Chat
When Google Chat is enabled, Omni indexes accessible spaces and messages as a separate Google Chat source. Chat messages retain space/thread context and permission metadata from Chat memberships. Linked Drive attachments are indexed through the same Drive access path when available.Drive Folder Filtering
For domain-wide delegated Google Drive sources, admins can restrict indexing to specific shared drives or top-level folders. This lets you exclude personal drives or focus on team drives without indexing everything. During setup, after entering your service account credentials, the setup dialog shows a folder selector where you can choose the shared drives or folders to include. If no folders are selected, all accessible content is indexed. For existing sources, navigate to Settings → Integrations, find the Drive source, and click Settings. The folder selector is available in the source configuration.Folder filtering requires domain-wide delegation. OAuth-authenticated Drive sources index all accessible content and cannot be scoped by folder.
User OAuth for Tools
The service account handles org-wide indexing. Some Omni agent tools require a user’s own Google authorization instead of the service account. Configure the Google client from Settings → Integrations → OAuth Apps, then use the shared redirect URI shown there when creating the OAuth client in Google Cloud. When a tool needs user authorization, the chat UI prompts the user to connect their Google account.AI Tools and Skills
The Google connector exposes the entire Google Workspace API surface as MCP tools for Omni through two actions:google_workspace_schema— fetches API method schemas so the assistant can discover available operations and their parametersgoogle_workspace_call— executes API calls against Drive, Docs, Sheets, Slides, and Gmail
- Google Drive skill — search and read files, manage permissions, create and update Docs/Sheets/Slides via the API
- Gmail skill — search, read, and manage messages and threads with Gmail query syntax
Viewing Sync Status
Navigate to Settings → Integrations to view the sync status for each source directly on the list, including last sync time, number of indexed items, and any errors. Click Settings on a source for more details and sync history.Rotating Service Account Keys
It’s recommended to rotate service account keys every 90 days.- Create a new key in Google Cloud Console
- Update the key in Omni settings
- Delete the old key
Removing the Integration
- Navigate to Settings → Integrations
- Click Settings against the Google Workspace source
- Click Delete Permanently
- Optionally, delete the service account in Google Cloud and remove the domain-wide delegation entry in Admin Console
Troubleshooting
Insufficient permissions
Insufficient permissions
The setup requires:
- Project Creator - to create the GCP project
- Google Workspace Super Admin - for domain-wide delegation
API not enabled error
API not enabled error
APIs may take a few minutes to propagate after enabling. 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
Omni Agent
Ask questions about your documents and emails
Add More Connectors
Connect additional data sources