# WorkflowRunStatus

The outcome of a workflow's LAST run, plus one entry per automation.

When the workflow itself has never been run as a whole but its automations
have, the top-level `result`, `message` and `duration_seconds` are derived
from `automations` — worst result wins, so a single failed automation makes
the workflow `error`.

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 |
| --- | --- | --- | --- | --- |
| `workflow_id` | string | yes | Id of the workflow this status belongs to. |  |
| `execution` | string | yes | Live phase: `running` if the workflow or any of its automations is still executing, otherwise `completed`. |  |
| `result` | string | yes | Outcome of the last finished run: `never_run`, `success` or `error`. `error` if ANY automation failed. |  |
| `message` | string, nullable | no | Human-readable explanation of the outcome, from the workflow run when there is one, otherwise from the failing automation. Null on success and before the first run. |  |
| `docs_link` | string, nullable | no | URL of the help article for this error, when one exists. |  |
| `started_at` | string, nullable | no | When the last WORKFLOW run started. Null when the workflow has only ever been run one automation at a time — running a single automation records no workflow start time, and none is invented here. |  |
| `duration_seconds` | number, nullable | no | How long the last run took, in seconds. When derived from automations, this is the longest automation duration. |  |
| `last_failed_automation_id` | string, nullable | no | Id of the automation that failed, so you can go straight to it without scanning `automations`. Null when nothing failed. |  |
| `automations` | array of [AutomationRunStatus](https://dev-api.sheetgo.com/rest/reference/models/AutomationRunStatus.md) | no | Per-automation breakdown of the same run, one entry per automation in the workflow. |  |

## Used by

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

---

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.
