---
title: Email-triggered AI agent
slug: email-triggered-ai-agent
image: https://archbee-image-uploads.s3.amazonaws.com/oAyFj2GHlBeBVWF5OAir2/sPFa99mZxPXciRrmfxePx_triggers-1.png
docTags: 
createdAt: 2026-03-19T11:03:02.440Z
---

This email-triggered AI agent scenario watches new emails in your Gmail account, and the agent replies to them. The watched emails are ones you've sent to yourself with a specific subject. Later, you can tailor the watch criteria to your needs.&#x20;

![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/Z8HkSp1ABFNE3JpEpbPj4_email-triggered-ai-agent.png)

## Prerequisites

- A Gmail account
- A test email, with any text and subject, sent to your personal email

## Step 1. Add Watch emails module

The **Gmail&#x20;**> **Watch emails&#x20;**&#x6D;odule watches your Gmail account for new emails.

To add a **Watch emails&#x20;**&#x6D;odule:

::::WorkflowBlock
:::WorkflowBlockItem
In the Scenario Builder, click the giant plus.
:::

:::WorkflowBlockItem
In the app search, search for and click **Gmail**.
:::

:::WorkflowBlockItem
Select the **Watch emails&#x20;**&#x6D;odule.
:::

:::WorkflowBlockItem
In **Connection**, select an existing Gmail connection from the dropdown or click **Add&#x20;**&#x74;o add a new one.&#x20;
:::

:::WorkflowBlockItem
Optionally, in **Label**, you can filter the emails by label.
:::

:::WorkflowBlockItem
Toggle **Advanced settings**.&#x20;
:::

:::WorkflowBlockItem
In **Sender email address**, enter your personal email address so that the module only watches emails from that address.
:::

:::WorkflowBlockItem
Optionally, in **Subject**, add the specific subject to watch for.
:::

:::WorkflowBlockItem
Click **Save**.
:::

:::WorkflowBlockItem
In the dialog that prompts you to choose where to start processing data, click the link.&#x20;
:::

:::WorkflowBlockItem
In the **Choose where to start** dialog, select **Choose manually** and select the first option (the email you sent yourself earlier).&#x20;
:::

:::WorkflowBlockItem
Click **Save** on the Scenario toolbar.&#x20;
:::

:::WorkflowBlockItem
Click **Run once** on the Scenario toolbar to retrieve your test email and have data to map in other modules.&#x20;
:::

:::WorkflowBlockItem
Click the output bubble to view the output items that you can share with the agent. For example, the `Full text body `value is the content of the email.&#x20;
:::
::::

You've now added the **Gmail&#x20;**> **Watch email&#x20;**&#x6D;odule to the scenario.&#x20;

## Step 2. Add the Run an agent module

To add the **Make AI Agent (New)** > **Run an agent** module:

:::::WorkflowBlock
:::WorkflowBlockItem
Click the plus icon next to the **Gmail&#x20;**> **Watch emails** module.&#x20;
:::

:::WorkflowBlockItem
In the app search, search for and click **Make AI Agent (New)**.&#x20;
:::

:::WorkflowBlockItem
Click the **Run an agent** module.&#x20;
:::

::::WorkflowBlockItem
In **Connection**, select an existing AI provider connection from the dropdown or click **Add&#x20;**&#x74;o add a new one.&#x20;

:::hint{type="info"}
If you don't want to set up an account with an AI provider, select **Make's AI Provider**.&#x20;
:::
::::

:::WorkflowBlockItem
In **Model**, select a model from your chosen AI provider.&#x20;
:::

:::WorkflowBlockItem
In **Instructions**, describe who the agent is and what it does. You can copy-paste the below:&#x20;

You are a customer service agent that answers questions from customers. Read the content of the email and answer in HTML format. Directly reply to the email. Don't provide any email signature.&#x20;
:::

:::WorkflowBlockItem
In **Input**, map the `Full text body` value from the **Gmail&#x20;**> **Watch emails** module so that the agent accesses the email content.&#x20;

Later, you can add other values that the agent needs, such as `Date `and `From (name)`.

::Image[]{src="https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/TiLmU65ovPDxSQ0dNuRxc-20260210-153413.png" size="50" width="467" height="474" position="center" darkWidth="467" darkHeight="474" showCaption="false"}
:::

:::WorkflowBlockItem
In **Conversation ID**, map the `Thread ID` value from the **Gmail&#x20;**> **Watch emails** module. This action retrieves the email history so the agent remembers previous emails in case the user replies.&#x20;
:::

:::WorkflowBlockItem
Click **Save**.&#x20;
:::

:::WorkflowBlockItem
Click **Save&#x20;**&#x6F;n the Scenario toolbar.&#x20;
:::
:::::

You've now added the **Make AI Agent (New)** > **Run an agent&#x20;**&#x6D;odule to your scenario.

## Step 3. Add a Reply to an email module

Add a **Gmail&#x20;**> **Reply to an email** module so the agent replies to incoming emails.&#x20;

To add a **Reply to an email&#x20;**&#x6D;odule:

::::WorkflowBlock
:::WorkflowBlockItem
Click the plus icon next to the **Make AI Agent (New)** > **Run an agent&#x20;**&#x6D;odule.&#x20;
:::

:::WorkflowBlockItem
In the app search, click **Gmail**.&#x20;
:::

:::WorkflowBlockItem
Click the **Reply to an email&#x20;**&#x6D;odule.&#x20;
:::

:::WorkflowBlockItem
In **Connection**, select your existing Gmail connection.&#x20;
:::

:::WorkflowBlockItem
In **Thread ID**, map the `Thread ID` value from the **Gmail** > **Watch emails** module. This action allows the agent to reply directly to the initial user email.&#x20;
:::

:::WorkflowBlockItem
In **Body contents**, click **Add body content**.&#x20;
:::

:::WorkflowBlockItem
In **Text**, map the `Response` value from the **Run an agent&#x20;**&#x6D;odule, so the agent sends its response as the email reply.&#x20;
:::

:::WorkflowBlockItem
Click **Save**.&#x20;
:::

:::WorkflowBlockItem
Click **Save&#x20;**&#x6F;n the Scenario toolbar.
:::

:::WorkflowBlockItem
Test your scenario:

1. Click the down arrow next to **Run once** on the Scenario toolbar.&#x20;
2. In **Scenario run**, select the previous scenario run to use its trigger data as test data.&#x20;
3. Click **Run once**.&#x20;
4. Check your inbox for a reply from the agent.&#x20;
:::
::::

You've now created an email-triggered AI agent scenario.
