# Alerts

Alerts allow you to receive notifications in Slack or through an incoming webhook when your Workflow returns an error.

## How To Create An Alert

To create an alert, follow these steps:

1. Publish your Workflow in order to create an alert
2. Click **Monitor > Alerts**
3. Click **Add Alert**
4. Name your alert
5. Choose the Workflows you want to be notified about
6. Choose how you want to be notified:
   * To receive the alert through an incoming Webhook: Click **Add** **Action >** **Webhook** and provide the URL where you will receive a POST request with the data of the error
   * To receive the alert through Slack: click on **Add Action > Slack** and select the Slack channel where you want to receive notifications

<figure><img src="/files/MddJnHcueMZ6wF46VqQo" alt=""><figcaption></figcaption></figure>

### Slack Action

When an alert containing a Slack action is triggered, the Slack action sends a message to the selected channel including the Workflow name, error message, and a link to the execution:

<figure><img src="/files/Wy0PQTzsLqzFE2lnAhM8" alt=""><figcaption></figcaption></figure>

### Webhook Action

When an alert containing a Webhook action is triggered, the Webhook action sends a **POST** request to the selected url, with a **JSON** body containing metadata about the errored execution, such as Workflow, Execution id, error message, and more:

```json
{
  "status": "error",
  "id": 72367362,
  "source": "web",
  "user_id": 9000,
  "airops_app_id": 9999,
  "output": null,
  "error_code": "SENSITIVE_CONTENT",
  "error_message": "Content contains sensitive data"
}
```


---

# 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://docs.airops.com/monitoring/alerts.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.
