---
title: "Connect Gmail"
description: "Connect a Gmail account to the Inbox, choose which email arrives, and review reply drafts before they send."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.aiagent.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Gmail

Connect Gmail to bring email into the **Inbox**. Matching threads arrive as Inbox items. AI Agent can also draft a reply for each one, and nothing sends until you review and send it.

> **Where to find it**
>
> Gmail connects from the **Inbox**, not from the **Connections** tab. In the
> sidebar, click **Inbox**. The button at the top of the Inbox reads **Connect
> inbox**, and reads **Gmail** once an inbox is connected.

1. **Connect your Gmail account**

   1. In the sidebar, click **Inbox**.
   2. Click **Connect inbox**.

   ![The header of the Inbox list with the Connect inbox button.](/screenshots/connections/gmail-inbox-pill.webp)

   3. In **Connect your inbox**, click **Connect Gmail**.

   ![The Connect your inbox dialog with the Connect Gmail button.](/screenshots/connections/gmail-connect-dialog.webp)

   4. In **Who should see this inbox?**, choose **Personal inbox** or **Team address**. A personal inbox is visible only to you, and only you can reply. A team address is visible to everyone, and everyone can reply. Use it for addresses such as support\@.
   5. Click **Continue to Google**, choose the Google account, and allow every permission on the Google screen. AI Agent cannot read or draft email without all of them.

   ![The Who should see this inbox? dialog with Personal inbox, Team address and Continue to Google.](/screenshots/connections/gmail-visibility.webp)

   When you return, check that the card shows the Gmail address you meant to connect. Only the person who connected the inbox can change its visibility later.
2. **Choose which email arrives**

   1. At the top of the Inbox, click **Gmail**. The button reads **Connect inbox** until a Gmail account is connected.

   ![The header of the Inbox list. The Gmail button replaces Connect inbox once Gmail is connected.](/screenshots/connections/gmail-pill-connected.webp)

   2. In the Gmail card, click **Configure**.

   ![The Connect your inbox dialog for a connected Gmail account, with the Configure button.](/screenshots/connections/gmail-card-connected.webp)

   3. In **Filter**, choose a preset or **Custom Gmail search**.
   4. In **Check frequency**, choose **Every minute**, **Every 5 minutes**, or **Every 15 minutes**.
   5. Click **Save settings**. The button stays disabled until you change a setting.

   ![The Configure Gmail dialog with the Filter presets, Check frequency and Save settings.](/screenshots/connections/gmail-configure.webp)

   The presets cover this mail:

   | Preset | Mail it includes |
   | - | - |
   | **Recommended** | Your everyday inbox. It skips Promotions, Social, Spam, and Trash. |
   | **Inbox only** | Everything in your inbox, including Promotions and Social. |
   | **Unread inbox** | Only unread inbox mail. It still skips Promotions, Social, and Spam. |
   | **Catch-all (incl. spam)** | Every folder except Trash, including Spam. It is the noisiest choice. |
   | **Custom Gmail search** | Mail that matches a query you write, in the syntax of Gmail's own search box. |

   To bring in recent mail at once, click **Import last 10 emails**.

   > **Filters bring in mail automatically**
   >
   > Review the Gmail search query before you save it. Every thread that matches
   > arrives in the Inbox at the check frequency you chose.

   The **Configure Gmail** dialog describes matching mail as tickets. Matching threads become Inbox items. They are not tickets. To make a ticket from an item, open the item and click **Create ticket** in the panel on the right. A ticket makes the message visible to the whole team. See [Turn an Inbox message into work](/guides/turn-an-inbox-message-into-work).
3. **Choose whether to draft replies**

   In **Configure Gmail**, the **Auto-draft replies** switch controls drafting. It is off for a new connection in most cases. It starts on only when the **Triage & draft emails** suggestion on the **Connections** page is already on for the project, your plan allows inbound auto-reply, and, for a personal inbox, you turned that suggestion on yourself. The card also offers **Activate Auto inbox drafting** as a shortcut.

   When the switch is on, choose **When to draft**:

   - **Always draft** drafts a reply to every incoming email.
   - **Draft when relevant** drafts only when the agent judges that a reply is worth sending. The rest are triaged without a draft.

   Auto-draft needs a plan that includes inbound auto-reply, which starts with the Start plan. See [Plans, credits, and usage](/billing/plans-credits-and-usage).
4. **Tell the assistant how to reply**

   Each inbox can carry its own drafting instructions. For a support address you might write: "This is our support inbox. Link docs.aiagent.app when it helps, and sign off as 'The AI Agent team'."

   1. In **Configure Gmail**, find **Drafting instructions**.
   2. Write how replies from this inbox should read: links to include, how to sign off, what to avoid. The limit is 2,000 characters.
   3. Click **Save instructions**. To remove them, clear the box and save.

   The instructions apply to every draft from this inbox, whether it was drafted automatically or on demand from the Inbox. They shape the wording of a draft only. They cannot make a reply send on its own, and every draft still waits for your review. Only the person who connected a personal inbox can change its instructions. Anyone on the team can change the instructions of a team address.

## Review a draft before it sends

1. **Check the draft**

   Sending changes your Gmail account, so check each part first: the connected Gmail account, every recipient including CC and BCC, the subject, the message, and the thread the reply belongs to.

   1. In the **Inbox**, click the item. The draft appears under the message as a card that shows the recipients, the subject, and the reply.
   2. To change the draft, edit the message. Click **Edit subject** or **Add Cc/Bcc** for the other fields. Then click **Save edits**. The button stays disabled until you change something.
   3. To discard the draft, click **Reject**. **Reason for rejecting** is optional.
   4. To send the reply, press and hold **Send reply**.

   ![A Gmail reply draft in the Inbox with the Reject and Send reply buttons.](/screenshots/connections/gmail-draft-card.webp)

   If undo is on in your preferences, the button then reads **Click to undo** with a countdown, and you can cancel before the reply goes out. **Send reply** stays disabled while you have edits that you have not saved.

**Before you send**

Check whether the card saves a draft or sends mail now. A correct message sent
from the wrong account or to the wrong thread is still a mistake.

## Use Gmail with an agent

An inbox that you connect as a **Team address** can be attached to an agent like any other connection. See [Control connection tool access](/connections/tool-access). You cannot attach a personal inbox to an agent as a connection.

## Check that mail is arriving

At the bottom of **Configure Gmail**, **Connection health** shows **Receiving live updates** when new mail reaches AI Agent as it arrives. If it shows another status, open it and click **Sync updates**.

## Disconnect or reconnect

The Gmail card shows one of these badges: **Connected**, **Syncing…**, **Connecting…**, **Disconnected**, **Error**, or **Token expired**. For **Error** or **Token expired**, click **Reconnect Gmail** and approve access again.

If the card reads "Google did not give AI Agent permission to read this inbox.", you left a permission unticked on the Google screen. Only a reconnect fixes this. Click **Reconnect Gmail** and allow every permission on the Google screen. To confirm the fix, check that the card no longer shows **Error** and that new mail arrives in the **Inbox**.

To stop mail from arriving, click **Disconnect**, then confirm **Disconnect Gmail?**. AI Agent stops receiving email from the account. Existing tickets, drafts, and audit history stay, and a message offers a few seconds to undo. A teammate's personal inbox shows a note instead: only that teammate can change its settings.

## Related

- [Inbox and attention](/core-concepts/inbox-and-attention)
- [Review and execute an action](/guides/review-and-execute-an-action)
- [Troubleshoot connections](/troubleshooting/connections)

Source: https://docs.aiagent.app/connections/gmail/index.mdx
