> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getnetra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Automations

> Create, edit, pause, and monitor Netra automations from a prompt, an evaluation, or a red team config, and review the delivery history of each notification.

You create automations from the item you want to watch: a prompt, an evaluation, or a red team config. Each automation is attached to that item, so you only hear about the changes that matter to you.

> [!NOTE]
>
> **Prerequisites:**
>
> * At least one contact point in **Settings → Contact points**. See [Destinations](https://docs.getnetra.ai/Automations/destinations.md).
> * The **Owner** or **Project Admin** role. Project Members cannot see or manage automations.

## Where to Find Automations

| Location | What you can do |
| - | - |
| **Prompt Studio** → open a prompt → lightning icon in the header | Create and manage automations for that prompt |
| **Evaluations** → open an evaluation → lightning icon in the header | Create and manage automations for that evaluation's test runs |
| **Red Teaming** → open a config → lightning icon in the header | Create and manage automations for that config's runs |
| **Settings → Automations** | See every automation in the project, switch them on or off, edit, delete, and view delivery history |

![Lightning icon in the prompt header that opens the Automations drawer](https://mintcdn.com/netra/eAaH_6U2v9wQtxW7/images/automations-entry-button.gif?s=e2ba5d29d0a06af30d6ba960170209aa)

> [!NOTE]
>
> New automations are created from a prompt, an evaluation, or a red team config. The **Settings → Automations** page lists them but does not create them.

## Create an Automation

**1. Open the Automations drawer**

Open the prompt, evaluation, or red team config, then click the lightning icon in the header. If it has no automations yet, the **Add automation** form opens straight away. Otherwise you see its automations; click **Add automation** below the list.

**2. Name the automation**

Enter a **Name** that describes what it does, such as `Notify #ml-team on production changes`.

**3. Choose trigger events**

Under **Trigger events**, select one or more events. The list depends on what you opened:

| Opened from | Available events |
| - | - |
| Prompt | Updated, Deleted |
| Evaluation | Test run triggered, Test run failed, Evaluation completed |
| Red team config | Red team run completed, Red team run failed |

See [Sources and Events](https://docs.getnetra.ai/Automations/overview.md#sources-and-events) for when each event fires.

**4. Add conditions (optional)**

For prompt automations, under **Only when**, click **Add condition** to narrow when the automation fires. See [Add Conditions](#add-conditions).

**5. Choose destinations**

Under **Send to**, select one or more contact points. If you have none yet, click **Create Contact Point** from the dropdown.

Netra previews the result, for example: *"You'll be notified at #ml-team when a prompt is updated."*

**6. Save**

Click **Create**. The automation is enabled immediately.

![Add automation form with name, trigger events, conditions, and destinations](https://mintcdn.com/netra/eAaH_6U2v9wQtxW7/images/automations-create-form.gif?s=84e5fd0fc86ab904edce2ed3820f7af5)

## Add Conditions

Conditions filter events before anything is sent. Every condition must match for the automation to fire. If you add none, every selected event fires it.

| Operator | Matches when |
| - | - |
| **is** | The field equals the value |
| **is one of** | The field equals any of the listed values |
| **contains** | The field contains the text |

Conditions are available on prompt automations. Test run and red team run automations fire on every selected event for the item they are attached to.

| Field | Values |
| - | - |
| **Name** | The prompt name |
| **Label** | A label name, such as `production` |
| **Change** | Prompt deleted, New version published, Label attached, Label removed |
| **Prompt type** | Chat, Text |

**Label** matches the label the event is about: the label that was attached or removed, or the labels a new version was published with.

> [!TIP]
>
> To hear only about production releases of a prompt, select the **Updated** event and add two conditions: **Change is Label attached** and **Label is `production`**.

An automation can have up to 20 trigger events, 20 conditions, and 20 destinations.

## Manage Automations

Open the Automations drawer on a prompt, evaluation, or red team config, or go to **Settings → Automations** to see all of them.

![Settings Automations page listing all automations in the project](https://mintcdn.com/netra/eAaH_6U2v9wQtxW7/images/automations-settings.gif?s=4cf5e853bb273f80f92cd863d4325a8a)

| Column | Description |
| - | - |
| **Name** | The automation name |
| **Type** | Prompt, Evaluation run, or Red team run |
| **Attached to** | The prompt, evaluation, or red team config it watches. Click to open it. |
| **Triggers** | The selected events |
| **Sends to** | The destinations. A paused destination is marked as disabled. |
| **On** | Switch the automation on or off without changing its configuration |

Use the row actions to view **Delivery history**, **Edit**, or **Delete** an automation.

> [!NOTE]
>
> When you delete a prompt, the automations attached to it are deleted too. They still deliver the final **Deleted** event first.

## Delivery History

Click **Delivery history** on an automation to see every message it sent, newest first.

![Delivery history drawer showing delivered, failed, and skipped deliveries](https://mintcdn.com/netra/eAaH_6U2v9wQtxW7/images/automations-delivery-history.gif?s=56e91c9e1875c98e2dc6e2444acb2b40)

| Status | Meaning |
| - | - |
| **Delivered** | The destination accepted the message |
| **Pending** | Queued or being retried |
| **Failed** | Every attempt failed, or the destination rejected the message. Hover to see the error. |
| **Skipped** | The automation or destination was disabled or removed before delivery |

Netra keeps delivery history for 30 days.

### Retries

If a delivery fails because of a timeout, a rate limit (`429`), a server error (`5xx`), or a network error, Netra retries it up to 3 more times, after 5, 10, and 20 seconds (4 attempts in total). Other errors, such as `401` or `404` or a misconfigured contact point, are not retried.

### Paused Destinations

If a destination fails 5 deliveries in a row, Netra pauses it for that automation and emails the person who created the automation. The other destinations keep receiving messages.

To resume, fix the contact point, then open the automation and click **Re-enable** next to the paused destination.

***

## See Also

> [card] [Destinations](https://docs.getnetra.ai/Automations/destinations.md)
>
> Configure contact points and verify webhook payloads

> [card] [Automations Overview](https://docs.getnetra.ai/Automations/overview.md)
>
> Sources, events, and how automations work


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.