Overview
What Gets Indexed
How It Works
- Organization-wide sources use a service account with domain-wide delegation; a plain service account can sync selected shared drives directly (see Service Account Direct (Shared Drives)). Personal connections use the user’s Google OAuth authorization.
- The connector syncs content within the configured Drive scope and source permissions
- Permission inheritance ensures users only see content they have access to in Google Workspace
Google Workspace syncing uses read-only access. Some agent actions can request separate user OAuth authorization for write-capable Google APIs; see User OAuth for Tools.
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.
Personal Google OAuth
After an admin configures the Google OAuth client under Settings → Integrations → OAuth Apps, users can connect their own Google account from My Integrations → Connect your Google account. OAuth can create personal Google Drive and Gmail sources using read-only Google scopes; it does not require domain-wide delegation or Google Workspace admin scopes. A personal Drive source starts in a pending state until its owner chooses either Entire Drive or Selected folders. Folder discovery can include the user’s My Drive, accessible shared drives, and folders beneath them. Sync runs with that user’s credential and indexes only content the account can access.Service Account Direct (Shared Drives, no Domain-Wide Delegation)
The setup dialog has two tabs: Domain-wide delegation (the flow above) and Shared drive (no DWD). The second tab is Drive-only and uses a plain service account to sync selected shared drives with their effective permissions. It needs no domain-wide delegation orsub impersonation, but it does require the Admin Directory group-read scope for group membership sync.
Google-Side Setup
- Create a service account key (IAM & Admin → Service Accounts → Keys)
- Ensure the service account itself can list Workspace groups and group members through the Admin SDK without impersonation, for example through an appropriate customer-level admin role. Omni validates this access before creating the source
- In each shared drive → Manage members, add the service account email (
<name>@<project>.iam.gserviceaccount.com) as Content manager (fileOrganizer) or Manager (organizer). Without one of these roles the service account cannot read the drive’s ACLs, and the connector will not sync the drive - Verify your Workspace external-sharing policy permits adding
*.iam.gserviceaccount.comto shared drives. The service account is an external principal, so a scoped OU / trust-rule exception may be needed. If the policy cannot allow the service account at all, use OAuth or domain-wide delegation instead
Behavior
drive.readonlyandadmin.directory.group.readonlyare required; the source config selects this mode withauth_mode: "service_account_direct", a Workspacedomain, and one or morefolder_path_filtersentries of kindshared_drive_root- The drive member list supplies each document’s baseline
public/users/groupspermissions; the service account’s own email is excluded - Effective permissions mirror Google’s shared-drive model: direct grants on ancestor folders and files are added, and a limited-access folder boundary replaces inherited access with drive organizers plus direct grants at that boundary
- Drive and relevant folder ACLs are fingerprinted; a change triggers a full drive re-traversal so existing documents get the new permissions
- Polling only; no webhook registration. Google Groups on the drive map to
groups. Setup verifies that the service account can list Workspace groups and members, and the connector emits group-membership events during sync. If group sync later fails, group-granted documents are visible only to users whose memberships are supplied by another source - Switching an existing domain-wide-delegation source to service-account-direct is not supported; create a new source instead
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
Drive indexing scope depends on how the source is authenticated:- Domain-wide delegation: Admins can select shared drives or folders within them. If no folders are selected, all content available through the source is indexed. Personal My Drive folder scopes are not supported for service-account sources; use personal OAuth instead.
- Personal Google OAuth: The account owner can choose Entire Drive or selected folders from My Drive and accessible shared drives. The owner manages this scope from My Integrations.
- Service-account direct: The source must select at least one whole shared drive. Folder-level restrictions are not supported in this mode.
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