> For the complete documentation index, see [llms.txt](https://docs.borndigital.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.borndigital.ai/insights/building-new-projects/email-bots.md).

# E-mail bots

Let a Digital Agent flow decide what to do with every incoming e-mail – reply, forward, label, move – and let Insights carry it out.

Insights can do more than analyse your e-mails – it can act on them. A Digital Agent flow connected through a [Flow connector](https://docs.borndigital.ai/insights/building-new-projects/add-a-flow-connector.md) reads each incoming e-mail (or other text record), decides what should happen, and Insights carries it out in the mailbox: it answers routine requests, sends messages to the right team and alerts people when something needs attention.

## What a flow can do

| Action     | What happens                                  |
| ---------- | --------------------------------------------- |
| `READ`     | Marks the e-mail as read.                     |
| `REPLY`    | Replies to the sender, with copies if needed. |
| `FORWARD`  | Forwards the e-mail to other people or teams. |
| `SEND_NEW` | Sends a new e-mail.                           |
| `LABEL`    | Adds one or more Outlook categories.          |
| `MOVE_TO`  | Moves the e-mail to a folder.                 |
| `COPY`     | Copies the e-mail to a folder.                |

A flow can combine several actions for one e-mail – for example label it, reply and move it to a folder.

## Which e-mails and mailboxes

All actions except `SEND_NEW` work on the incoming e-mail itself, in the Microsoft 365 mailbox Insights read it from – see [Data sources (Text)](https://docs.borndigital.ai/insights/workspace/upload/data-sources-text.md).

`SEND_NEW` works for **any text record**, not only e-mails from a mailbox. A record uploaded from a file or sent to Insights from another system can trigger an e-mail too – for example feedback to a trainee after a conversation with an AI coach, or an alert based on a single interaction.

Actions run only in **Text** projects, and only when a record is processed for the first time. [Rerun](https://docs.borndigital.ai/insights/workspace/process/rerun.md) and copied data never trigger them, so nobody gets the same reply twice.

## Set it up

E-mail bots are built from parts you already know: a Digital Agent flow decides what to do with each e-mail, and a [Flow connector](https://docs.borndigital.ai/insights/building-new-projects/add-a-flow-connector.md) connects it to your Insights project. There is no separate screen for e-mail actions in Digital Studio.

Born Digital helps you connect the mailbox and set up your first e-mail bot – get in touch with your Born Digital contact.

{% hint style="warning" %}
The actions send real e-mails. Test the flow on a test mailbox before you connect it to a mailbox your customers write to.
{% endhint %}

## Use cases

* **Auto-reply to routine requests** – the flow recognises a simple request, such as a change of address, answers it with `REPLY` and marks the e-mail as read.
* **Route to the right team** – the flow classifies the e-mail and uses `FORWARD`, `LABEL` or `MOVE_TO` to get it to the team that handles it.
* **Alert a supervisor** – when the flow detects a complaint or a cancellation threat, `SEND_NEW` e-mails a supervisor with a short summary.
