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

# New email received in Gmail trigger

> Run a Workflow automatically when a new email arrives in your Gmail inbox.

Use the **New Email Received in Gmail** trigger to start a [Workflow](https://docs.cassidyai.com/workflows/overview.md) whenever a new email is received in your connected Gmail account. This is useful for automating email triage, drafting replies, or routing messages based on sender or content.

## Set up the trigger

**1. Add the trigger**

Create a new Workflow with the **New Email Received in Gmail** trigger, or change an existing Workflow's trigger type to **New Email Received in Gmail**.

![Selecting the New Email Received in Gmail trigger](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-0.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=d134f25094bd27b0616f1bd00eaf76d7)

**2. Connect your Gmail account**

If you haven't already, connect your Gmail account to Cassidy.

![Adding a Gmail connection in the trigger configuration](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-1.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=79b85b8210cc5ea519a5a6ce946ab546)

**3. Configure labels (optional)**

Filter the trigger to only activate for emails with specific labels such as **Inbox**, **Important**, **Chat**, **Sent**, **Trash**, **Draft**, or **Spam**.

![Configuring label filters for the Gmail trigger](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-2.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=75f10389e9bd71f67006ef8795738f5a)

**4. Configure exclude labels (optional)**

Select any labels you want to exclude from triggering the Workflow.

![Configuring exclude label filters](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-3.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=d7b5a4babc7e59a35e7e44e0cb9fd8ba)

**5. Reference the trigger variables**

In subsequent Workflow steps, you can reference the following variables from this trigger:

* **Email ID** — the ID of the new email
* **Thread ID** — the ID of the email thread
* **Labels** — the inbox labels applied to the email
* **From** — the sender's email address
* **Subject** — the subject line
* **Body** — the email body content
* **Attachments** — any files attached to the email

![Available Gmail trigger variables in the Workflow builder](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-4.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=c1ad8286cbfea757bc5a867cd7cdc08c)

**6. Activate the trigger**

In the trigger block, click the toggle switch to turn it on.

![Activating the Gmail trigger toggle](https://mintcdn.com/cassidy/RuRQFQTAAAcziOuR/images/reference/new-email-received-in-gmail-trigger-img-5.png?fit=max\&auto=format\&n=RuRQFQTAAAcziOuR\&q=85\&s=3b3ff207bce2e9842799b821d6e376c3)

> [!NOTE]
>
> This trigger only activates for emails received **after** the trigger is set up. It does not process existing emails.

## Related

> [card] [Send email with Gmail](https://docs.cassidyai.com/integrations/google-workspace/gmail/send-email.md)
>
> Send or reply to an email from a Workflow.

> [card] [Draft email with Gmail](https://docs.cassidyai.com/integrations/google-workspace/gmail/draft-email.md)
>
> Create a draft email from a Workflow.

> [card] [Add labels to Gmail message](https://docs.cassidyai.com/integrations/google-workspace/gmail/add-labels.md)
>
> Add labels to a Gmail message from a Workflow.


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