Documents

Automation runs, steps and approvals

Follow a run, its steps, the operations it waits for, approvals and cancellation.

What a run records

A run records its workflow and published version, trigger, input, who or what started it, its idempotency key, timestamps and final outcome. Store the run ID with the record in your system that started it.

IDs in responses

Workflow and run responses carry public IDs only. The API key already identifies the organisation, workspace and environment, so they are not repeated in definitions.

API and dashboard actions

ActionWhere
Validate a draft graphv2 API: POST /api/v2/workflows/validate (workflows.write)
List, create and read workflowsv2 API: GET and POST /api/v2/workflows, GET /api/v2/workflows/{workflowId} (workflows.read / workflows.write)
Replace a draftv2 API: PATCH /api/v2/workflows/{workflowId} (workflows.write)
Publish a version (required before any run)v2 API: POST /api/v2/workflows/{workflowId}/publish (workflows.write)
Start a run of a published workflowv2 API: POST /api/v2/workflows/{workflowId}/runs (workflows.execute)
Read one runv2 API: GET /api/v2/workflow-runs/{runId} (workflows.read)
Cancel or replay a runv2 API: POST /api/v2/workflow-runs/{runId}/cancel or /replay (workflows.execute)
Decide an approvalv2 API: POST /api/v2/workflow-approvals/{approvalId}/decision (workflows.approve)
Create a schedule or retry one failed stepDashboard only

Step states

StateMeaning
PendingWaiting for earlier steps
ReadyAbout to start
RunningIn progress
WaitingWaiting for a document operation or an approval
SucceededFinished successfully
FailedFinished with an error
CancelledStopped on purpose

Steps that process documents

A processing step starts a document operation and waits for it. The step succeeds or fails only when the operation does, so the run's result always matches the actual output version.

Approvals

  • An approval belongs to one run, step and workflow version.
  • It records who decided, the decision, the reason and the time.
  • It is decided once and moves the run on exactly once.
  • A decided approval is never reopened.

Cancelling

Cancelling stops new steps from starting and tries to cancel operations in progress. Work that already finished, such as a sent email, stays done, and the run reports what completed; nothing is rolled back.