Gmail setup
Prerequisites
Successful setup requires administrative access to both Glean and Google Workspace, along with an operational Google Drive connector.
| Requirement | Details |
|---|---|
| Admin access | Glean 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 account | The service account must have Domain-wide Delegation enabled and provide a Directory admin email. |
| Required scopes | The 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
- Go to the Domain-wide Delegation section in the Google Admin Console.
- Click Add new. If you have already connected Google Drive with the same Client ID, click Edit on the existing client instead.
- Paste the 21-digit Unique ID (Client ID) into the Client ID field.
- Copy and paste the following into the OAuth scopes (comma-delimited) field:
https://www.googleapis.com/auth/gmail.readonly
- Click Authorize.
Step 2: Configure and connect in Glean
- In the Glean Admin Console, navigate to Connectors and select the Gmail connector.
- Enter a Name and icon for your connector.
- 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.
- 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.
- Save: Click Save to complete the connection.