> ## 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](/workflows/overview) 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

<Steps>
  <Step title="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**.

    <Frame>
      <img src="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" alt="Selecting the New Email Received in Gmail trigger" width="1416" height="750" data-path="images/reference/new-email-received-in-gmail-trigger-img-0.png" />
    </Frame>
  </Step>

  <Step title="Connect your Gmail account">
    If you haven't already, connect your Gmail account to Cassidy.

    <Frame>
      <img src="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" alt="Adding a Gmail connection in the trigger configuration" width="1012" height="1172" data-path="images/reference/new-email-received-in-gmail-trigger-img-1.png" />
    </Frame>
  </Step>

  <Step title="Configure labels (optional)">
    Filter the trigger to only activate for emails with specific labels such as **Inbox**, **Important**, **Chat**, **Sent**, **Trash**, **Draft**, or **Spam**.

    <Frame>
      <img src="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" alt="Configuring label filters for the Gmail trigger" width="1010" height="216" data-path="images/reference/new-email-received-in-gmail-trigger-img-2.png" />
    </Frame>
  </Step>

  <Step title="Configure exclude labels (optional)">
    Select any labels you want to exclude from triggering the Workflow.

    <Frame>
      <img src="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" alt="Configuring exclude label filters" width="1006" height="226" data-path="images/reference/new-email-received-in-gmail-trigger-img-3.png" />
    </Frame>
  </Step>

  <Step title="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

    <Frame>
      <img src="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" alt="Available Gmail trigger variables in the Workflow builder" width="1286" height="810" data-path="images/reference/new-email-received-in-gmail-trigger-img-4.png" />
    </Frame>
  </Step>

  <Step title="Activate the trigger">
    In the trigger block, click the toggle switch to turn it on.

    <Frame>
      <img src="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" alt="Activating the Gmail trigger toggle" width="900" height="320" data-path="images/reference/new-email-received-in-gmail-trigger-img-5.png" />
    </Frame>
  </Step>
</Steps>

<Note>This trigger only activates for emails received **after** the trigger is set up. It does not process existing emails.</Note>

## Related

<CardGroup cols={2}>
  <Card title="Send email with Gmail" icon="paper-plane" href="/integrations/google-workspace/gmail/send-email">
    Send or reply to an email from a Workflow.
  </Card>

  <Card title="Draft email with Gmail" icon="file-pen" href="/integrations/google-workspace/gmail/draft-email">
    Create a draft email from a Workflow.
  </Card>

  <Card title="Add labels to Gmail message" icon="tags" href="/integrations/google-workspace/gmail/add-labels">
    Add labels to a Gmail message from a Workflow.
  </Card>
</CardGroup>
