Gmail

Connect Gmail to Dust agents to read messages, create drafts, and send emails using user credentials.

📘

Personal credentials required

The Gmail tool interacts with Gmail using each user's account, adapting to individual access permissions.


Admin: Setup in Dust


Navigate to Spaces > Tools in your Dust workspace, click Add Tools, and select Gmail.

The setup redirects you to an OAuth flow to connect an admin Gmail account. Dust uses the admin account only during setup. Users cannot query Gmail from the admin account.

The Gmail tool is added to the Company data Space, making it accessible across the entire workspace.


Usage


In the @Agent Builder, click Add Tool and select Gmail.


When users first use an agent with the Gmail tool, a connection error appears:

Click the Connect button.

⚠️ Note: Gmail tools with High or Medium stake levels require user approval. See the "Tool Control & Automation" section below for more information on managing approvals.

List of tools

The Gmail tool provides the following capabilities:

ToolDescriptionStake Level
get_messagesRetrieves messages from Gmail inbox with support for Gmail search queriesNever ask
get_attachmentRetrieves the content of a specific attachment from a Gmail messageNever ask
get_draftsRetrieves all drafts from GmailNever ask
create_draftCreates a new email draft in GmailMedium
create_reply_draftCreates a reply draft to an existing email thread in GmailMedium
delete_draftDeletes a draft email from GmailLow
send_mailSends an email directly from Gmail (new)High*

⚠️ Note:send_mail is disabled by default on existing workspaces. Admins must manually enable it in Spaces > Tools > Gmail. It is enabled by default on new Gmail tool installations.

Tool Control & Automation

Gmail tools use specific approval levels ("stakes") to control automation:

  • High stake (e.g., send_mail): Requires explicit user approval every time the tool is used
  • Medium stake (e.g., create_draft, create_reply_draft): Requires approval once per agent + recipient combination. Once approved, the agent can repeat the action without interruption for that specific combination
  • Low stake (e.g., delete_draft): Users can disable confirmations
  • Never ask (e.g., get_messages, get_drafts): Executes automatically without confirmation

Admins can modify the stake level of each tool in Spaces > Tools > Gmail to match their team's workflows and risk tolerance.

Learn more about tool management and stake levels in the Tools Management documentation.

⚠️ Email Reputation Warning: Dust is not designed for bulk email campaigns. Using it for mass outreach can harm your domain's email reputation, affecting deliverability across your entire organization. Keep automation targeted and workflow-driven for best results.