Skip to main content

Error Workflows

An error workflow is a regular workflow that Blokkio starts whenever an execution of another workflow fails. Use it to send alerts, open tickets or log failures in one place, without adding error branches to every workflow.

When it runs​

The error workflow starts when an execution of the watched workflow ends with status Failed, after any retries have been used up. It does not start for:

  • executions that end as Success or Warning (failures handled by an error port or Continue on error)
  • Cancelled executions
  • test runs from the editor
  • sub-workflow and building block runs started by another workflow (the parent's error workflow covers them)

Each failed execution starts the error workflow at most once.

Setting it up​

  1. Build the error workflow in the same project. Start it with a Manual trigger and add the steps you want, for example a Slack message or an HTTP Request.
  2. Publish it. Only the published revision runs.
  3. Point the watched workflow at it. Open the watched workflow in the editor and click the settings (gear) icon in the header, next to undo and redo. In Workflow settings, pick the workflow under Error workflow and click Save. Choose None to remove it.

Workflow settings are stored on the workflow itself, not in the draft, so they apply to every run straight away — there's nothing to publish. Changing them requires permission to edit workflows (Administrator or Contributor), and changes are recorded in the audit log.

Setting it through the API​

The same setting is available on the app API (signed-in session, not the Public API):

curl -X PUT "https://api.blokkio.com/api/projects/{projectId}/workflows/{workflowId}/execution-settings" \
-H "Content-Type: application/json" \
-H "X-Requested-With: blokkio" \
-d '{ "errorWorkflowId": "8c1d4e2a-..." }'

Send { "errorWorkflowId": null } to remove it. GET on the same path returns the current setting.

Rules​

  • The error workflow must be in the same project.
  • A workflow can't be its own error workflow.
  • Several workflows can share one error workflow.
  • If the error workflow has been deleted or is unpublished when a failure happens, nothing is started. The failed execution itself is unaffected.

What the error workflow receives​

The failure details are the trigger payload, available as $trigger:

{
"execution": {
"id": "5e0c7a3b-2f41-4c55-9d8e-1a2b3c4d5e6f",
"startedAt": "2026-11-11T09:30:00.000+00:00",
"finishedAt": "2026-11-11T09:30:04.512+00:00",
"status": "Failed"
},
"workflow": {
"id": "3fb4a2c1-8d0e-4f6b-9a51-2c7d8e9f0a1b",
"name": "Sync orders"
},
"error": {
"message": "HTTP Request: Response status code does not indicate success: 503 (Service Unavailable)."
},
"failedNode": {
"id": "b7e2c9d0-1111-4a2b-8c3d-9e8f7a6b5c4d",
"name": "Fetch orders"
}
}
FieldDescription
execution.idId of the failed execution. Use it to find the run in the execution logs.
execution.startedAt / finishedAtWhen the failed execution started and ended.
execution.statusAlways Failed.
workflow.id / workflow.nameThe workflow that failed.
error.messageThe error message of the node that stopped the run. No stack trace, and secret values are masked.
failedNodeId and name of the node that failed, or null if the failure didn't come from a node.

Example Slack message text in the error workflow:

:rotating_light: {{ $trigger.workflow.name }} failed at {{ $trigger.failedNode.name }}
{{ $trigger.error.message }}
Run: {{ $trigger.execution.id }}

The error workflow runs without an environment, so it uses the project's shared secret values and connection settings.