# submit.automation_failed

HTML: https://www.app2email.com/docs/api/webhooks/submit.automation_failed · Index: https://www.app2email.com/docs/api/llms.txt

An automation gave up on a submission: an outside call still failed after its retries (1 minute, 10 minutes, 1 hour). GET /submit/runs?status=failed has every step.

Group: Submit-Info. Header `X-App2email-Event: submit.automation_failed`. 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.id` | integer | yes |  |
| `data.reference` | string | yes | The short code the submitter sees: the form's prefix and 6 characters. Every route that takes a submission id takes it too. |
| `data.form` | object | yes | The form it was made with. |
| `data.form.key` | string |  |  |
| `data.form.name` | string |  |  |
| `data.channel` | string |  | whatsapp: the WhatsApp form. web: the web page. api: POST /submit/submissions. staff: entered by a team member.; one of: `whatsapp`, `web`, `api`, `staff` |
| `data.status` | string | yes | The key of the stage it is in (the form's stages). |
| `data.status_name` | string |  |  |
| `data.status_kind` | string |  | one of: `open`, `done`, `cancelled` |
| `data.status_color` | string |  | one of: `grey`, `blue`, `green`, `amber`, `red`, `purple` |
| `data.priority` | string |  | one of: `low`, `normal`, `high`, `urgent` |
| `data.tags` | string[] |  |  |
| `data.due` | string |  | The due time, or null. |
| `data.assignee` | object |  | The member it is assigned to, or null. |
| `data.assignee.id` | integer |  |  |
| `data.assignee.name` | string |  |  |
| `data.contact` | object | yes |  |
| `data.contact.identity` | string |  | The submitter's WhatsApp number (digits, country code first) or business-scoped user id. Empty for a web submission with only an e-mail address. |
| `data.contact.name` | string |  |  |
| `data.contact.phone` | string |  |  |
| `data.contact.email` | string |  |  |
| `data.contact.verified` | boolean |  | true: the number is proven (sent on WhatsApp, or confirmed from the web page with one message). |
| `data.conversation_id` | integer |  | The WhatsApp conversation. 0 when there is none. |
| `data.answers` | object | yes | What was asked: field key -> value. The value's JSON type follows the field type (text: string, number and rating: number, yesno and consent: boolean, multiselect: array of choice ids, photo and document: array of file ids, date: YYYY-MM-DD, location: the address text).; any keys |
| `data.extra` | object |  | Everything that was not asked: internal fields, calculated values and values automations saved.; any keys |
| `data.location` | object |  | The pin the submitter sent, or null. |
| `data.location.lat` | number |  |  |
| `data.location.lng` | number |  |  |
| `data.location.name` | string |  |  |
| `data.location.address` | string |  |  |
| `data.parent` | string |  | The reference of the submission this one adds to (a follow-up form), or null. |
| `data.summary` | string |  | One line for lists: the first answers. |
| `data.files_count` | integer |  |  |
| `data.files_pending` | integer |  | Files of the WhatsApp form that are still being fetched. 0 = all stored. |
| `data.unread` | boolean |  | New, or the submitter added something staff have not opened yet. |
| `data.link` | string |  | The submitter's own page: status, history, add information. No login; treat it as a secret of the submitter. |
| `data.created` | string |  |  |
| `data.updated` | string |  |  |
| `data.status_changed` | string |  |  |
| `data.closed` | string |  | When it reached a done or cancelled stage, or null. |
| `data.deleted` | string |  | Only on a deleted submission: when it was deleted. |
| `data.automation` | object | yes | The automation that failed. |
| `data.automation.id` | integer |  |  |
| `data.automation.name` | string |  |  |
| `data.step` | integer | yes | The number of the action that failed, counted from 1 (n in the run's steps). |
| `data.error` | string | yes | What went wrong, in words. |

## Samples

### outside call

```json
{
  "id": "evt_Sub3k9m2Lw8Rt5Yp1Zs09",
  "type": "submit.automation_failed",
  "created": "2026-11-13T04:20:00.000Z",
  "number": "4976659348270",
  "data": {
    "id": 4182,
    "reference": "MR-7Q3M2A",
    "form": {
      "key": "meter_reading",
      "name": "Meter reading"
    },
    "channel": "whatsapp",
    "status": "received",
    "status_name": "Received",
    "status_kind": "open",
    "status_color": "blue",
    "priority": "normal",
    "tags": [
      "north"
    ],
    "due": null,
    "assignee": null,
    "contact": {
      "identity": "61412345678",
      "name": "Sample Contact",
      "phone": "61412345678",
      "email": "",
      "verified": true
    },
    "conversation_id": 8762,
    "answers": {
      "meter_no": "A-1182",
      "reading": 48213,
      "photo": [
        9917
      ]
    },
    "extra": {
      "usage": 312
    },
    "location": null,
    "parent": null,
    "summary": "A-1182 · 48213",
    "files_count": 1,
    "files_pending": 0,
    "unread": true,
    "link": "https://www.app2email.com/s/4mXk9QpL2vTz8RwY3nBc6HdJ5sFg7Ka1",
    "created": "2026-11-13T04:00:00.000Z",
    "updated": "2026-11-13T04:20:00.000Z",
    "status_changed": "2026-11-13T04:00:00.000Z",
    "closed": null,
    "automation": {
      "id": 31,
      "name": "Send to billing"
    },
    "step": 1,
    "error": "The billing system answered 503 (Service Unavailable). Tried 4 times."
  }
}
```

## Caused by

- [Run a manual automation on a submission](https://www.app2email.com/docs/api/submit-info/run-submission-action.md): `POST /v1/{number}/submit/submissions/{id}/run`

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