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

# Gmail

> Send, read, and manage your email inbox

Connect your Gmail account and give your agents full email capabilities: send and reply to messages, manage drafts,
organize with labels and filters, and trigger tasks automatically when new mail arrives.

***

## What you unlock

<CardGroup cols={2}>
  <Card title="Send and reply to emails" icon="paper-plane">
    Compose new emails, reply to threads, and forward messages — all from within Mantle.
  </Card>

  <Card title="Inbox management" icon="inbox">
    Read, search, label, archive, and trash messages without leaving the workspace.
  </Card>

  <Card title="Draft and template workflow" icon="file-pen">
    Create, update, and send drafts so agents can prepare emails for your review before sending.
  </Card>

  <Card title="New-message trigger" icon="bolt">
    Start an agent task automatically every time a new email arrives in the connected inbox.
  </Card>
</CardGroup>

***

## Connect Gmail

<Steps>
  <Step title="Open Settings → Integrations">
    In any workspace go to **Settings → Integrations** and select **Gmail**.
  </Step>

  <Step title="Authorize with Google">
    Click **Connect** and sign in with your Google account. Grant the requested permissions so Mantle can read and send
    email on your behalf.
  </Step>

  <Step title="Add Gmail to an agent">
    Open the agent and enable only the Gmail actions it needs. A shared agent does not share your Gmail sign-in with
    other members.
  </Step>
</Steps>

***

## Agent tools

### Sending

| Tool            | Description                                  |
| --------------- | -------------------------------------------- |
| Send email      | Compose and send a new email                 |
| Reply to thread | Send a reply within an existing email thread |
| Forward email   | Forward a message to another recipient       |
| Send draft      | Send a previously created draft              |

### Drafts

| Tool         | Description                               |
| ------------ | ----------------------------------------- |
| Create draft | Create a new email draft for later review |
| Get draft    | Retrieve the contents of a specific draft |
| List drafts  | List all drafts in the account            |
| Update draft | Modify an existing draft                  |
| Delete draft | Remove a draft permanently                |

### Reading and search

| Tool                    | Description                                 |
| ----------------------- | ------------------------------------------- |
| Fetch emails            | Search and retrieve emails matching a query |
| Fetch message by ID     | Get a single message by its message ID      |
| Fetch message by thread | Retrieve all messages in a thread           |
| Get attachment          | Download an attachment from a message       |
| List threads            | List email threads in the mailbox           |

### Organization

| Tool                | Description                           |
| ------------------- | ------------------------------------- |
| Modify email labels | Add or remove labels on a message     |
| Create label        | Create a new Gmail label              |
| List labels         | List all labels in the account        |
| Create filter       | Create an automatic email filter rule |
| Move to trash       | Move a message to the trash folder    |

***

## Triggers

Triggers fire an agent task automatically when something happens in Gmail.

| Trigger                    | When it fires                              |
| -------------------------- | ------------------------------------------ |
| New Gmail message received | A new email arrives in the connected inbox |

<Steps>
  <Step title="Create a task with a Gmail trigger">
    Open any agent, go to the **Tasks** tab, and add a new task. In the trigger picker, choose **Integration → Gmail**.
  </Step>

  <Step title="Select the event">Choose **New Gmail Message Received**.</Step>
  <Step title="Save and activate">Save the task. The agent will run automatically each time a new email arrives.</Step>
</Steps>

***

## Example use cases

<AccordionGroup>
  <Accordion title="Auto-reply to customer inquiries">
    **Trigger:** New Gmail message received

    When a new email lands in your inbox, an agent reads the subject and body, classifies the inquiry, drafts a personalized response, and saves it as a draft for your review.
  </Accordion>

  <Accordion title="Forward invoices to your accounting channel">
    **Trigger:** New Gmail message received

    An agent watches for emails with PDF attachments from known vendors, downloads the attachment, and posts a summary with the file to your #accounting channel.
  </Accordion>

  <Accordion title="Summarize a long email thread on demand">
    Ask your agent to fetch a specific email thread, summarize the key points and action items, and post the summary in your workspace chat.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Google shows an unverified-app warning">
    Do not bypass a warning you did not expect. Cancel the connection and contact [Mantle
    support](https://mantlechat.featurebase.app/help) so the team can confirm the correct sign-in flow.
  </Accordion>

  <Accordion title="The agent can read emails but can't send">
    Check that the Gmail OAuth scope includes send permissions. Disconnect and reconnect the integration from **Settings
    → Integrations → Gmail** to re-authorize with full scopes.
  </Accordion>

  <Accordion title="Trigger tasks aren't firing">
    A new-message event may take a short time to arrive. Confirm the task is **active** and that the trigger is set to
    **Gmail → New Gmail Message Received**. Then check the task history for a connection or permission error.
  </Accordion>

  <Accordion title="Emails are landing in the recipient's spam folder">
    This is controlled by the recipient's email provider, not Mantle. Avoid spammy subject lines and ensure your Google
    account has a good sending reputation.
  </Accordion>
</AccordionGroup>

***

<Card title="Back to Integrations" icon="plug" href="/integrations/overview">
  View all available integrations
</Card>
