Skip to content

Gmail

The Gmail connector indexes mail from the firm's Google Workspace accounts.

These connectors link the firm's own cloud account. They appear in the catalogue only after an administrator turns on Firm cloud connectors on Admin → Connectors. The switch is off by default. Cloud connectors must be private and shared with one or more groups.

Create the Google credential

Gmail and Google Drive use the same two kinds of credential. Create them in the Google Cloud Console for the firm's Google Workspace.

Option 1: OAuth app. Indexes what one Google account can see.

  1. Create a Google Cloud project and enable the API for the service: the Gmail API, the Google Drive API, or both.
  2. Configure the OAuth consent screen for your organization.
  3. Create an OAuth client ID of type Web application. Add these authorized redirect URIs, starting with the address you open NorthLock Chat at: - <NorthLock address>/admin/connectors/gmail/auth/callback - <NorthLock address>/admin/connectors/google-drive/auth/callback
  4. Download the client's JSON file.
  5. In NorthLock, upload or paste the JSON, then choose Authenticate and sign in with the Google account whose data you want to index.

Option 2: Service account. Indexes across the organization.

  1. Create a service account in the Google Cloud project and download a JSON key.
  2. In the Google Workspace Admin console, give the service account domain-wide delegation for the scopes listed below.
  3. In NorthLock, upload or paste the JSON key, and enter the Primary Admin Email: an admin or owner of the Google organization.

Scopes

  • https://www.googleapis.com/auth/gmail.readonly
  • https://www.googleapis.com/auth/admin.directory.user.readonly
  • https://www.googleapis.com/auth/admin.directory.group.readonly

Google asks for the Gmail and Google Drive scopes together on an OAuth credential. See Using one credential for Gmail and Google Drive.

Set it up

  1. Go to Admin → Connectors and choose Gmail.
  2. Create or pick a credential (see above).
  3. Save. Indexing starts on the box.