# AutomationRunStatus

The outcome of an automation's LAST run. There is no run history.

Type: object

Fields typed as another model are documented on that model's page; fetch it before filling the field.

| Field | Type | Required | Description | Allowed values / default / constraints |
| --- | --- | --- | --- | --- |
| `automation_id` | string | yes | Id of the automation this status belongs to. |  |
| `execution` | string | yes | Live phase: `running` while the run is enqueued, executing or cancelling; `completed` once it has stopped. Poll until this is `completed` before trusting `result`. |  |
| `result` | string | yes | Outcome of the last finished run: `never_run` (it has not run yet), `success`, or `error`. While `execution` is `running`, this still describes the PREVIOUS run. |  |
| `status_code` | integer | no | Sheetgo result code behind `result`: 0 = never run, 1 = success, anything greater = the specific error. Useful when you want to branch on the exact failure. | default: `0` |
| `message` | string, nullable | no | Human-readable explanation of the run's outcome — the stored run message when there is one, otherwise the standard description for `status_code`. Null on success and before the first run. |  |
| `docs_link` | string, nullable | no | URL of the help article for this error, when one exists. Null unless `result` is `error`. |  |
| `error_count` | integer, nullable | no | Number of individual errors recorded during the run (a run can fail on several rows or files). Null when not tracked. |  |
| `duration_seconds` | number, nullable | no | How long the last run took, in seconds. Null before the first run completes. |  |

## Used by

- [GET /rest/beta/automations/{id}/run](https://dev-api.sheetgo.com/rest/reference/automations.md#get-rest-beta-automations-id-run)
- [GET /rest/beta/workflows/{id}/run](https://dev-api.sheetgo.com/rest/reference/workflows.md#get-rest-beta-workflows-id-run)
- [WorkflowRunStatus](https://dev-api.sheetgo.com/rest/reference/models/WorkflowRunStatus.md)

---

More: start page https://dev-api.sheetgo.com/rest/reference.md, everything in one file https://dev-api.sheetgo.com/rest/llms-full.txt, OpenAPI https://dev-api.sheetgo.com/rest/openapi.json.
