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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Gmail

> Send, search, label, draft, and reply to Gmail messages, or react to mailbox and message changes.

## Exports

```ts theme={null}
import { gmail, googleAccount, getGmailApi } from "automate.ax/gmail"
```

* `gmail` contains the packaged Gmail actions and triggers.
* `googleAccount("name")` selects a named Google connection.
* `getGmailApi` creates the authenticated Gmail API helper for a custom account-backed action.

## Triggers

* [On mailbox changed](/reference/integrations/gmail/triggers/on-mailbox-changed.md)
* [On message added](/reference/integrations/gmail/triggers/on-message-added.md)
* [On message deleted](/reference/integrations/gmail/triggers/on-message-deleted.md)
* [On new email](/reference/integrations/gmail/triggers/on-new-email.md)
* [On email sent](/reference/integrations/gmail/triggers/on-email-sent.md)
* [On label added](/reference/integrations/gmail/triggers/on-label-added.md)
* [On label removed](/reference/integrations/gmail/triggers/on-label-removed.md)

## Actions

* [Send email](/reference/integrations/gmail/actions/send-email.md)
* [Forward a message](/reference/integrations/gmail/actions/forward.md)
* [Reply to a message](/reference/integrations/gmail/actions/reply.md)
* [Reply to a thread](/reference/integrations/gmail/actions/reply-thread.md)
* [Draft email](/reference/integrations/gmail/actions/draft-email.md)
* [Draft reply](/reference/integrations/gmail/actions/draft-reply.md)
* [Get a draft](/reference/integrations/gmail/actions/get-draft.md)
* [Search drafts](/reference/integrations/gmail/actions/search-drafts.md)
* [Update a draft](/reference/integrations/gmail/actions/update-draft.md)
* [Send a draft](/reference/integrations/gmail/actions/send-draft.md)
* [Delete a draft](/reference/integrations/gmail/actions/delete-draft.md)
* [Get message](/reference/integrations/gmail/actions/get-message.md)
* [Get messages](/reference/integrations/gmail/actions/get-messages.md)
* [Get raw message](/reference/integrations/gmail/actions/get-raw-message.md)
* [Get thread](/reference/integrations/gmail/actions/get-thread.md)
* [Search messages](/reference/integrations/gmail/actions/search-messages.md)
* [Search threads](/reference/integrations/gmail/actions/search-threads.md)
* [Get profile](/reference/integrations/gmail/actions/get-profile.md)
* [Add label](/reference/integrations/gmail/actions/add-label.md)
* [Remove label](/reference/integrations/gmail/actions/remove-label.md)
* [Modify labels](/reference/integrations/gmail/actions/modify-labels.md)
* [Create label](/reference/integrations/gmail/actions/create-label.md)
* [Update label](/reference/integrations/gmail/actions/update-label.md)
* [Delete label](/reference/integrations/gmail/actions/delete-label.md)
* [List labels](/reference/integrations/gmail/actions/list-labels.md)
* [Has label](/reference/integrations/gmail/actions/has-label.md)
* [Archive](/reference/integrations/gmail/actions/archive.md)
* [Move to inbox](/reference/integrations/gmail/actions/move-to-inbox.md)
* [Trash](/reference/integrations/gmail/actions/trash.md)
* [Untrash](/reference/integrations/gmail/actions/untrash.md)
* [Mark as spam](/reference/integrations/gmail/actions/mark-as-spam.md)
* [Mark as not spam](/reference/integrations/gmail/actions/mark-as-not-spam.md)
* [Mark as read](/reference/integrations/gmail/actions/mark-as-read.md)
* [Mark as unread](/reference/integrations/gmail/actions/mark-as-unread.md)
* [Is unread](/reference/integrations/gmail/actions/is-unread.md)
* [Mark as important](/reference/integrations/gmail/actions/mark-as-important.md)
* [Unmark as important](/reference/integrations/gmail/actions/unmark-as-important.md)
* [Is important](/reference/integrations/gmail/actions/is-important.md)
* [Star](/reference/integrations/gmail/actions/star.md)
* [Unstar](/reference/integrations/gmail/actions/unstar.md)
* [Check starred status](/reference/integrations/gmail/actions/is-starred.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.