# automation.ran

HTML: https://www.app2email.com/docs/api/webhooks/automation.ran · Index: https://www.app2email.com/docs/api/llms.txt

A chat automation rule finished a run (after its last step, or when it stopped). A run that waits sends it when it is done.

Group: Automations. Header `X-App2email-Event: automation.ran`. Inside the envelope `{id, type, created, number, test?, data}` ([envelope, headers, signature](https://www.app2email.com/docs/api/webhooks.md)). Every webhook of the number gets every number event: filter by `type`.

## data

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data.run_id` | integer | yes |  |
| `data.rule` | object | yes |  |
| `data.rule.id` | integer |  |  |
| `data.rule.name` | string |  |  |
| `data.contact` | string | yes |  |
| `data.conversation_id` | integer |  |  |
| `data.trigger` | string |  |  |
| `data.status` | string | yes | one of: `ok`, `failed` |
| `data.sent` | boolean |  | Something was sent to the contact. |
| `data.steps` | object[] |  |  |
| `data.steps.type` | string |  |  |
| `data.steps.outcome` | string |  |  |
| `data.steps.note` | string |  |  |
| `data.error` | string |  |  |
| `data.started` | string |  |  |
| `data.finished` | string |  |  |

## Samples

### ok

```json
{
  "id": "evt_Au7m2Qw9Lp4Xr8Tz1Va1",
  "type": "automation.ran",
  "created": "2026-11-19T08:12:03.000Z",
  "number": "4976659348270",
  "data": {
    "run_id": 1842,
    "rule": {
      "id": 12,
      "name": "Price reply"
    },
    "contact": "61412345678",
    "conversation_id": 3321,
    "trigger": "keyword",
    "status": "ok",
    "sent": true,
    "steps": [
      {
        "type": "send_text",
        "outcome": "sent",
        "note": "text sent"
      },
      {
        "type": "add_tag",
        "outcome": "done",
        "note": "tag \"lead\" added"
      }
    ],
    "error": null,
    "started": "2026-11-19T08:12:02.000Z",
    "finished": "2026-11-19T08:12:03.000Z"
  }
}
```

Send it to your URL: https://www.app2email.com/docs/api/webhooks/tester?type=automation.ran
