Skip to main content

Gmail action pack

Gmail extension actions enable Glean to interact directly with Gmail messages, drafts, labels, threads, and contacts in supported Glean experiences.

This allows users to send and read emails, manage drafts and labels, reply to threads, and look up contacts without switching between applications.

Gmail actions are a key component of the broader Google action suite.

When building a workflow agent, the Gmail action pack is available within the Plan and Execute step. For agents with auto mode, the Gmail action pack is available for all steps. This allows the agent to dynamically determine when to send emails, create drafts, organize messages, or look up contacts to fulfill a complex user request.

Supported tools

The Gmail action pack is enabled as a unified bundle.

The following tools are included:

Email and thread management

  • Fetch emails: Retrieves Gmail messages so users can review recent emails or find specific messages.
  • Fetch message by thread ID: Retrieves all messages in a specific Gmail thread for additional context.
  • List threads: Retrieves Gmail threads to help users identify and navigate email conversations.
  • Send email: Sends an email from the signed-in user's Gmail account.
  • Reply to thread: Sends a reply within an existing Gmail thread.
  • Forward message: Forwards an existing Gmail message to one or more recipients.
  • Move to trash: Moves a Gmail message to the trash folder.

Draft management

  • Create email draft: Creates a new Gmail draft for user review before sending.
  • List drafts: Retrieves existing Gmail drafts so users can review or continue editing.
  • Send draft: Sends a previously created Gmail draft.

Label management

  • List labels: Retrieves all Gmail labels available to the signed-in user.
  • Create label: Creates a new Gmail label for organizing messages.
  • Add label to email: Applies an existing label to a Gmail message.

Contacts

  • Get contacts: Retrieves the signed-in user's Google contacts for use in composing or forwarding emails.

Example use cases

Gmail actions support several common workflow patterns:

  • Email triage workflows: An agent can fetch recent emails, summarize key messages, and draft replies for the user to review before sending.
  • Automated follow-ups: A workflow can reply to a thread or forward a message after gathering context from earlier agent steps.
  • Label-based organization: An agent can create labels and apply them to emails based on content, sender, or project, keeping inboxes organized.
  • Contact-aware messaging: A user can look up contacts, compose a new email, and send it without leaving Glean.
  • Draft review pipelines: An agent can create drafts from meeting summaries or reports, list existing drafts for review, and send approved drafts on behalf of the user.

Setup and configuration

Prerequisites

Before configuring Gmail actions, ensure you have the following:

  • You must have administrative access to the Glean Admin console.
  • Your organization must have an existing Google Drive data source configured in Glean.
  • You must have access to the Google Cloud Console to enable the required APIs and configure OAuth credentials.
  • The Gmail API and People API must be enabled in the Google Cloud project linked to your Google actions configuration.

Administrator steps

  1. Enable the pack: In Glean, go to Admin consolePlatformActions and add Gmail actions from the template library.
  2. Select the data source instance: Link the pack to your existing Google Drive data source instance.
  3. Configure authentication: Gmail actions use OAuth user authentication.
    • Central: Use the Glean-managed Google OAuth app when it is available in your environment.
    • Custom OAuth app: If using a customer-managed app, register it in the Google Cloud Console, enable the Gmail API and People API, configure the OAuth consent screen, and enter the client credentials in Glean.
  4. Save the action pack after the authentication configuration is complete.
  5. Enable the pack for users: Use Edit settings under Enable Actions to make the pack available to the relevant users and supported Glean surfaces.
note

Gmail actions use OAuth user authentication exclusively. Domain-wide Delegation is not supported for Gmail extension actions.

For detailed setup steps, see Google actions setup.

FAQ