# Automation notifications

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/air/llms.txt).

Air Teams reports automation runs in two ways: it emails the people responsible for an automation when a run fails, and it sends the result of every run to any webhook you add.

## Email notifications

Every automation reports its failures by email, with no setup on your part. When a run ends with a Problem status, Air Teams emails:

* the person who created the automation

* the person who started the run, when that's someone else

Each message goes to the address of the recipient's JetBrains Account. The email names the automation and its repository, says what triggered the run and when, and links to the run so you can see what happened.

A run you [stop yourself](manage-automations.html#stop_automation_run) isn't a failure, so Air Teams doesn't email anyone about it. A failed run sends one email per recipient, even if the run moves between failure states before it settles.

If a run fails for a reason you can't act on, see [Troubleshoot automations](troubleshoot-automations.html).

## Webhook notifications

To report runs somewhere else, add a notification that sends the run's result to an external system after the run completes.

Procedure: Send run results to an external system

1. In the Notifications section of the automation settings, click Add Notification and select Webhook.

2. Enter the destination URL and save the automation.

When an automation run finishes, Air Teams sends an HTTP `POST` request to each configured webhook URL.

## Webhook payload

Every outgoing webhook request includes these headers:

* `X-Air-Webhook-Id` – event identifier in the form `evt_<uuid>`. This value is stable across delivery attempts and can be used as an idempotency key.

* `X-Air-Webhook-Event` – `automation.execution.succeeded` or `automation.execution.failed`

* `X-Air-Webhook-Format` – `json` or `slack-workflow`

* `User-Agent` – `Air-Webhooks/1`

* `Content-Type` – `application/json`

Regardless of the format, every payload includes a `statusUrl` field with a link to the automation run that sent the notification, in the form `https://air.jetbrains.cloud/org/{orgId}/automations/{automationId}?run={runId}`. Open this link to see the run details in Air Teams.

### JSON format

For regular webhook URLs, Air Teams sends the payload in the `json` format.

Successful runs send the automation result in `output.result`. Failed runs send an `error` object with the failure details.

Example success payload:

```JSON
                
{
    "id": "evt_9a3f2b",
    "type": "automation.execution.succeeded",
    "apiVersion": 1,
    "createdAt": "2026-05-11T11:48:06.000Z",
    "automationId": "auto-1a2b3c",
    "automationName": "AIR Automations Overview",
    "automationRunId": "run-9f8e7d",
    "statusUrl": "https://air.jetbrains.cloud/org/org-42/automations/auto-1a2b3c?run=run-9f8e7d",
    "output": {
        "result": "# Weekly summary\n\n…markdown body produced by the agent…"
    }
}
                
```

Example failure payload:

```JSON
                
{
    "id": "evt_5c1e0d",
    "type": "automation.execution.failed",
    "apiVersion": 1,
    "createdAt": "2026-05-11T10:43:02.987Z",
    "automationId": "auto-4d5e6f",
    "automationName": "Nightly dependency upgrade",
    "automationRunId": "run-2c3b4a",
    "statusUrl": "https://air.jetbrains.cloud/org/org-42/automations/auto-4d5e6f?run=run-2c3b4a",
    "error": {
        "message": "Agent run timed out",
        "code": "timeout"
    }
}
                
```

### Slack workflow format

If the destination URL matches `https://hooks.slack.com/triggers/...`, Air Teams sends the payload in the `slack-workflow` format.

This format is flattened because Slack workflow variables must be primitive strings.

On success, the generated result is sent in `outputText`. On failure, the error is sent in `errorText`.

Example success payload:

```JSON
                
{
    "id": "evt_9a3f2b",
    "type": "automation.execution.succeeded",
    "apiVersion": "1",
    "createdAt": "2026-05-11T11:48:06.000Z",
    "automationId": "auto-1a2b3c",
    "automationName": "AIR Automations Overview",
    "automationRunId": "run-9f8e7d",
    "statusUrl": "https://air.jetbrains.cloud/org/org-42/automations/auto-1a2b3c?run=run-9f8e7d",
    "outputText": "# Weekly summary\n\n…markdown body produced by the agent…",
    "errorText": ""
}
                
```

Example failure payload:

```JSON
                
{
    "id": "evt_5c1e0d",
    "type": "automation.execution.failed",
    "apiVersion": "1",
    "createdAt": "2026-05-11T10:43:02.987Z",
    "automationId": "auto-4d5e6f",
    "automationName": "Nightly dependency upgrade",
    "automationRunId": "run-2c3b4a",
    "statusUrl": "https://air.jetbrains.cloud/org/org-42/automations/auto-4d5e6f?run=run-2c3b4a",
    "outputText": "",
    "errorText": "{\"message\":\"Agent run timed out\",\"code\":\"timeout\"}"
}
                
```

