# Email notifications for failed process flow runs

## Introduction

You can configure a process flow to trigger email notifications in the event that a process flow runs and fails. This is a two-stage process:

* [Add the required email recipients to a notification group](https://doc.wearepatchworks.com/product-documentation/general-settings/notification-groups#adding-a-new-notification-group)
* [Update settings for your process flow(s)](#updating-process-flow-settings-to-trigger-failed-run-notifications)

{% hint style="info" %}
If you're not sure how to approach a process flow that's failed, see our [Process flow run failures](https://doc.wearepatchworks.com/product-documentation/process-flows/troubleshooting-process-flows/process-flow-run-failures) troubleshooting guide.
{% endhint %}

## Need to know

Email notifications for a failed process flow run are only sent if:

* the process flow is [enabled and deployed](https://doc.wearepatchworks.com/product-documentation/process-flows/managing-process-flows/enabling-and-disabling-a-process-flow/enabling-and-disabling-a-process-flow-without-virtual-enviroments)
* the process flow is initiated via the [trigger shape](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/trigger-shape) (i.e. not for manual runs)

## Updating process flow settings to trigger failed run notifications

Having [added email recipients to a notification group](https://doc.wearepatchworks.com/product-documentation/general-settings/notification-groups#adding-recipients-to-a-notification-group), you should access settings for the required process flow(s) and apply this group to the **email failure notifications** section. To do this, follow the steps below.

**Step 1**\
[Access the process flow](https://doc.wearepatchworks.com/product-documentation/process-flows/accessing-your-process-flows) that you want to update.

**Step 2**\
Click the 'cog' icon in the [canvas](https://doc.wearepatchworks.com/product-documentation/process-flows/building-process-flows/the-process-flow-canvas) toolbar to access general settings for this process flow:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FTBhjoG3TVOsGEqzp6qiz%2Fenable%20process%20flow%201.png?alt=media&#x26;token=d22308f7-14d6-4499-b2fc-6a2674a91b9a" alt="" width="233"><figcaption></figcaption></figure></div>

**Step 3**\
From the **settings** panel, click in the email failure notifications field and select the appropriate  group to receive an email notification in the event that this process flow runs and fails:

<div align="left"><figure><img src="https://2440044887-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLYNcUBVQwSkOMG6KjZfz%2Fuploads%2FgE5SLLn7CDyVlFhMKNKD%2Fadd%20email%20group%20to%20process%20flow%20settings.png?alt=media&#x26;token=ba24012c-13f3-45f0-93ff-ac3e2ddb252e" alt="" width="375"><figcaption></figcaption></figure></div>

{% hint style="info" %}
All defined notification groups are available for selection. If you need to add a new group or check recipients in an existing group, please check our [Notification groups](https://doc.wearepatchworks.com/product-documentation/general-settings/notification-groups) page.
{% endhint %}

**Step 4**\
Save changes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.wearepatchworks.com/product-documentation/process-flows/error-reporting-and-exception-handling/email-notifications-for-failed-process-flow-runs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
