# Report executions by email

import { Steps } from "@astrojs/starlight/components"

**Email notifications** on a flow send run status to the addresses you list, so you do not have to watch the designer
for every execution. By default a flow sends **No notifications**. You choose when to notify (**On successful run**,
**On any failure**, or **On successful runs and any failure**) and add recipients on the flow **Settings** tab.
Screenshots on this page show the condition picker, recipients, and sample alert emails.

## When to use

- Operators or stakeholders should learn about run outcomes without opening Studio.
- You want failure alerts for production-critical flows, or success confirmation for important jobs.
- Prefer [Logs](../logs/) when you need step-level detail, reruns, or filters instead of an email summary.

Before you begin, open the flow in the designer in an environment where you can edit it. Deploy the flow after you
change notification settings if you need the next run to use the saved configuration.

## Guide

### Configure email notifications

Each flow has its own **Email notifications** section under designer **Settings**. Changes can take up to 15 minutes to
apply on the next run.

<ol>
<li>

**Open Settings.** In the designer, open the flow inspector and select the **Settings** tab.

</li>
<li>

**Choose a condition.** Under **Email notifications**, pick one of:

- **No notifications** (default)
- **On successful run**
- **On any failure**
- **On successful runs and any failure**
<div class="docs-screenshot-compact">

![Flow Settings Email notifications dropdown with No notifications selected and the three notify options listed](./assets/flow-settings-email-notifications-dropdown-no.png)

</div>

</li>
<li>

**Add recipients.** Enter one or more addresses in **Email to notify**. Use **Add new recipient** for additional
addresses. Any valid email works, including an emailhook inbox address if you want another flow to receive the alert.
<div class="docs-screenshot-compact">

![Flow Settings with On any failure selected and three Email to notify recipient fields filled](./assets/flow-settings-any-failure-selected-three.png)

</div>

</li>
</ol>
### Read failure and success emails

When a run matches your condition, Mindflow emails the listed recipients. Failure messages highlight the error. Success
messages confirm the run completed.

<ol>
<li>

**Inspect a failure email.** The message names the flow and shows the failure reason (for example missing data a step
expected).
<div class="docs-screenshot-compact">

![Sample failure email for a flow with the error reason highlighted in red](./assets/sample-failure-email-flow-error-reason.png)

</div>

</li>
<li>

**Optional: set a Failure step message.** If the flow ends on a **Failure** step, the **Message** you set there can
appear in the failure email so recipients see a clear operator-facing reason.
<div class="docs-screenshot-compact">

![Failure step Input with Message describing a missing query in the webhook payload](./assets/failure-step-input-message-describing-missing.png)

</div>
<div class="docs-screenshot-compact">

![Sample failure email body that includes the Failure step Message](./assets/sample-failure-email-body-includes-failure.jpg)

</div>

</li>
<li>

**Inspect a success email.** With **On successful run** (or **On successful runs and any failure**), recipients get a
success notice when the run completes without error.
<div class="docs-screenshot-compact">

![Sample success email confirming a flow run completed](./assets/sample-success-email-confirming-flow-run.png)

</div>

</li>
</ol>
## Example

A SOC lead configures **Enrich phishing URL** for **On any failure** and adds `secops-alerts@example.com`. When the
webhook payload is missing a required field, the Failure step Message explains the gap, and the alert email carries that
reason so on-call can fix the upstream payload without opening Studio first.

## Keep in mind

- Notification changes may take up to 15 minutes to take effect on runs.
- Each flow is configured separately; there is no workspace-wide default beyond **No notifications**.
- Emails summarize run status. Use [Logs](../logs/) for step detail and **Rerun**.

## Related

- [End a flow with success or failure](../../build/control-flow-execution/end-a-flow-with-success-or-failure/)
- [Logs](../logs/)
