Skip to main content

Gmail setup

Connecting Gmail takes one authorization. Authorize Google Tools and your setup gives you two things.

  • Read and write tools work right away. Glean and Glean agents can search email threads, read messages, and draft emails and manage labels. Every tool runs as the person asking, using their own Google authorization, so it respects that user's Gmail permissions.
  • Permission-aware search is available when you turn on data crawling and indexing. Glean builds a search index of your email that respects Gmail's permission model, so each person searches their own mailbox content.
  1. Connect and authorizetodaycurrent step
  2. Use read and write toolstodaycurrent step
  3. Indexing runs in the backgroundtodayhappens automatically
  4. Permission-aware search switches ontomorrowhappens automatically

Feature availability after setup

Read and write tools work as soon as you authorize the MCP connection. Search switches on once you begin indexing and the first crawl completes.

CapabilityWhen it becomes availableWhose permissions apply
Read and write toolsImmediately after you authorize the MCP connectionEach user's own Google permissions, through their own Google authorization
Permission-aware searchOnce you begin indexing and the first crawl completesGmail's permission model, so each person searches their own mailbox content

Connector setup

Prerequisites

Confirm the following before you begin.

RequirementWhy it is needed
A Glean admin who can add and configure connectorsAdds the Gmail connector and authorizes it in the Admin console
A Google admin who can authorize the connectionAuthorizes the MCP connection and, for indexing, sets up domain-wide delegation

Step 1. Connect

In the Glean Admin console, go to Connectors and add the Gmail connector. This step authorizes Gmail's tools.

  1. Enter a Name for the connector. This is the name your organization members see.

  2. Under Select an authorization method, pick one option.

    • Central (recommended). Use Glean's managed OAuth app, which needs no configuration.
    • Custom. Use your own Google OAuth app. You provide a Client ID and Client secret.

    See Google tools setup for the full instructions.

  3. Select Continue. You return to Glean to set up indexing.

Step 2. Set up indexing

To add permission-aware search, set up data crawling and indexing. Set up domain-wide delegation and the required scopes. Choose the indexing scope, which is the users, groups, or domains whose email you want indexed. By default, indexing covers approximately 6 months of history and up to 5,000 Inbox threads per user. Limits can vary by deployment, and the full content crawl runs about monthly.

Step 3. Review and begin

Review who can use the connector and any data access rules, then finish setup. Choose whether the connector is available to all users or a test group, set inclusion and exclusion rules, and begin indexing or skip it for later.

Manage tools

Connecting Gmail makes its tools available. You can see all available tools on the Tools tab of your connector and edit permissions through Advanced settings. Gmail's write tools create drafts and manage labels — there is no tool that sends email on a user's behalf.

Tool settings you can change afterwards

For the full guide, see Tools overview.

Per-user authorization

Setup authorizes Glean to Gmail at the connector level. From there, two identities decide what each person sees.

CapabilityRuns asWhat it enforces
Indexed searchThe connector's indexing identity, through domain-wide delegationGmail's permission model, so each person searches their own mailbox content
Read and write toolsEach user's own Google accountThat user's own Gmail permissions, checked by Google on every call

Each teammate authorizes their own Google account over OAuth the first time they use a tool.

After setup

  • Refine what is indexed with indexing scope and inclusion and exclusion rules.
  • Check progress any time from the Gmail connector page in the Admin console.

See also