Skip to main content

Gmail setup

Prerequisites

Successful setup requires administrative access to both Glean and Google Workspace, along with an operational Google Drive connector.

RequirementDetails
Admin accessGlean Administrator and Google Workspace Administrator access is required.
Google Drive Connector (Not required if only Data_fetching is used)The Google Drive connector must be installed and operational to index Gmail content. For more information, see Google Drive authentication mechanisms.
Service accountThe service account must have Domain-wide Delegation enabled and provide a Directory admin email.
Required scopesThe service account must be granted the following OAuth scope: https://www.googleapis.com/auth/gmail.readonly (read-only access to Gmail).

Setup

Follow these steps to configure the Gmail connector, starting in the Google Admin Console.

Step 1: Add OAuth scopes in Google Admin console

  1. Go to the Domain-wide Delegation section in the Google Admin Console.
  2. Click Add new. If you have already connected Google Drive with the same Client ID, click Edit on the existing client instead.
  3. Paste the 21-digit Unique ID (Client ID) into the Client ID field.
  4. Copy and paste the following into the OAuth scopes (comma-delimited) field:
https://www.googleapis.com/auth/gmail.readonly
  1. Click Authorize.

Step 2: Configure and connect in Glean

  1. In the Glean Admin Console, navigate to Connectors and select the Gmail connector.
  2. Enter a Name and icon for your connector.
  3. Select data retrieval methods: Allow Glean to access data by checking both methods (recommended):
    • Data crawling and indexing: Gathers and organizes data for fast access.
    • Live mode: Retrieves live data on a per-query basis.
  4. Associate Google Drive instance: Select the corresponding Google Drive instance to associate with this Gmail connection.

This option is visible if Data crawling and indexing method is selected.

  1. Save: Click Save to complete the connection.