> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 Pro (current TTS) and Pulse (current
> multilingual STT) — or Pulse 2.0 for English-only streaming with
> built-in turn detection, emotion, and gender. Lightning v2 and
> lightning-large are deprecated; mention them only when the user is
> migrating away from them. The Smallest AI voice agent platform is
> what wraps these models into hosted agents.

# Gmail

> Connect Gmail to your Smallest AI voice agents with Google sign-in. Send email, create drafts, search and read messages, and pin the recipient so the agent only ever emails your team.

Connect **Gmail** so your agent can email a booking confirmation while the caller is still on the line, hand a summary to your team, or find the invoice a caller is asking about.

## At a glance

|                      |                                         |
| -------------------- | --------------------------------------- |
| **Authentication**   | OAuth 2.0 (sign in with Google)         |
| **Asked at connect** | Nothing. You're sent straight to Google |
| **Sends as**         | The Google account you connect          |
| **Works with**       | Single-prompt agents                    |

## Connect Gmail

#### Open Gmail on the Integrations page

Open the **Integrations** page in the dashboard and click **Connect** next to Gmail.

#### Sign in with Google

Click **Connect** in the dialog, choose the Google account the agent should send from, and approve access. We never see your password.

#### Add the tools to your agent

When you see **Gmail connected successfully**, click **Go to Tools**. Click **Add tool → Integration tool**, choose **Gmail**, tick the tools this agent needs, and click **Add tools**. From inside an agent, use **Add tool → New tool → Integration tool** instead.

> **Tip**
>
> Connect a shared mailbox such as `bookings@yourcompany.com` rather than a person's inbox. Every email the agent sends comes from that account.

## Tools

| Tool                | Function name           | What it does                                              |
| ------------------- | ----------------------- | --------------------------------------------------------- |
| **Send email**      | `gmail_send_email`      | Sends an email immediately                                |
| **Create draft**    | `gmail_create_draft`    | Saves an email as a draft for a person to review and send |
| **Search messages** | `gmail_search_messages` | Finds messages using Gmail search syntax                  |
| **Read email**      | `gmail_read_email`      | Reads one message: sender, subject and body               |
| **Get thread**      | `gmail_get_thread`      | Reads every message in a conversation                     |

### Fields

#### Send email · Create draft

| Field             | Required | Description                         | Pinnable |
| ----------------- | -------- | ----------------------------------- | -------- |
| `recipient_email` | Yes      | The recipient's address             | Yes      |
| `subject`         | Yes      | Subject line                        | Yes      |
| `body`            | Yes      | Plain-text body                     | Yes      |
| `cc`              | No       | Comma-separated addresses, up to 10 | Yes      |
| `bcc`             | No       | Comma-separated addresses, up to 10 | Yes      |

#### Search messages

| Field         | Required | Description                                                                                              |
| ------------- | -------- | -------------------------------------------------------------------------------------------------------- |
| `query`       | Yes      | Gmail search syntax, for example `from:jane@example.com subject:invoice`, `is:unread` or `newer_than:7d` |
| `max_results` | No       | 1–50. Defaults to 10                                                                                     |
| `page_token`  | No       | From the previous search, for the next page                                                              |

Returns 10 messages by default (up to 50) with sender, subject and a snippet.

#### Read email · Get thread

| Field                      | Required | Description                                                                                         |
| -------------------------- | -------- | --------------------------------------------------------------------------------------------------- |
| `message_id` / `thread_id` | Yes      | `message_id` comes from **Search messages**; `thread_id` from **Search messages** or **Read email** |

## Keep the agent's email on a short leash

Pinning fields turns **Send email** from "email anyone" into "email exactly this":

| Pin                                       | Effect                                                                                                                                 |
| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `recipient_email` → `ops@yourcompany.com` | The agent can only email that address. **CC** and **BCC** are also removed from the agent unless you pin them, so it can't add anyone. |
| `subject` → `New callback request`        | Every email has the same subject, so your team can filter on it                                                                        |
| `body` → **Variable**                     | The body comes from a variable your agent fills during the call, such as a call summary                                                |

> **Warning**
>
> Without a pinned recipient, the agent sends to whatever address the caller gives. Email addresses are often misheard on the phone, so have the agent read the address back before sending.

## How it works on a call

| Scenario                       | Tools                                    | Example condition prompt                                                                              |
| ------------------------------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Confirm a booking              | **Send email**                           | *After a meeting is booked, email the caller the date and time. Read their email back to them first.* |
| Hand off to your team          | **Send email**, recipient pinned         | *When the caller asks for a human, email the team their name, number and request.*                    |
| Answer "did you get my email?" | **Search messages**, then **Read email** | *When the caller asks about an email they sent, search by their address.*                             |

## Limits

* **One Gmail account per organization.** To switch to a different one, click **Disconnect**, then **Connect** again.
* Bodies are sent as **plain text**.
* **CC** and **BCC** take up to **10** addresses each.

## Troubleshooting

#### Gmail calls start failing after working before

Google access was removed: from the Google Account's third-party connections page, by a Workspace admin, or automatically when the account's password changes. On the Integrations page click **Disconnect**, then **Connect** and sign in again.

#### The email went to the wrong address

The agent sends to the address it heard. Pin `recipient_email` where the destination is fixed, or have the agent spell the address back before sending.

#### Search returns nothing

The query uses Gmail search syntax. Test the same query in the Gmail search bar of the connected account.

## Related

#### [Integrations overview](/voice-agents/integrate/integrations)

Connecting, pinning fields and disconnecting

#### [Google Calendar](/integrations/connected-apps/google-calendar)

Book meetings on the same Google account