trigger.error

Error Trigger (trigger.error)

The entry node for an error workflow — a workflow that runs whenever another workflow's execution fails. Build one alert flow (Slack message, email, ticket) and point any number of workflows at it.

Parameters

None. The wiring happens on the other side: open a workflow's ⚙ settings and pick this workflow as its error workflow. The picker only lists workflows that contain an Error Trigger.

The trigger item

When a watched workflow fails, this trigger receives:

{
  "workflow":  { "id": "…", "name": "Nightly sync" },
  "execution": { "id": "…", "mode": "schedule",
                 "started_at": "…", "finished_at": "…" },
  "error":     { "node": "HTTP Request",
                 "message": "HTTP 500 for GET https://api.example.com" }
}

The failed execution is linked as the error run's parent, so the executions page jumps straight to what broke.

Behavior

  • Fires after the failed run is fully persisted — the payload's execution id is always inspectable.
  • No cascades: an error workflow that itself fails never fires another error workflow.
  • A workflow can't be its own error workflow (rejected at save).
  • Sub-workflows running inline don't fire their own error workflow — the parent's fires once for the whole tree.

Quirks & tips

  • A bare manual ▶ run emits a representative SAMPLE payload — build and test your alert formatting without forcing a real failure. The swap only happens for a single empty test item; real payloads always pass through untouched.
  • The payload carries the failure summary. For deep context (node I/O), link to the execution: the id is right there in $json.execution.id.
  • n8n imports: errorTrigger maps here natively; the n8n workflow-level error setting becomes a re-link warning (ids don't transfer).

Related

  • Execute Workflow / Sub-workflow Trigger — the other cross-workflow pair.
  • Gmail Send — a one-node alert body.
  • HTTP Request — post the failure to Slack/PagerDuty/webhooks.