09 · Advanced
Alerts #ops when a workflow fails so broken runs never fail silently.
Error Trigger
Set
Slack
n8n canvas preview
Error Alert Slack
Canvas via n8n-demo · import JSON into n8n.io → Workflows → Import from File
Writeup
Error Trigger → Set summary “Workflow failed on n8n” → Slack #ops “:x: Workflow error — check executions”. Template pager for failed runs.
Step by step — how to build it
01
Start a dedicated workflow
New empty workflow — this one only handles errors (don’t mix with your main graphs).
02
Add Error Trigger
Drop Error Trigger as the start node (no Manual/Webhook needed).
03
Add Set (Format Error)
Connect Error Trigger → Set. Field summary = Workflow failed on n8n (later: map execution URL from the error payload).
04
Add Slack
Set → Slack → channel ops → text :x: Workflow error — check executions. Attach Bot credential; invite bot to #ops.
05
Activate this error workflow
Toggle Active so producers can call it.
06
Point a producer at it
Open another workflow → Settings → Error Workflow → select this one → Save.
07
Force a failure to verify
Break the producer briefly (bad URL) → Execute → #ops should ping. Then fix the producer.
How it functions
1 · Error Trigger
Fires when a workflow that points here (Error Workflow setting) fails.
2 · Format Error
Set node writes summary = “Workflow failed on n8n” (static in this export — extend with {{$json.execution.*}}).
3 · Slack Ops
Channel ops, fixed alert text pointing humans at Executions.
Setup notes
Import as its own workflow
Import error-alert-slack.workflow.json. Attach Slack; ensure #ops exists.
Link producers
On each critical workflow → Settings → Error Workflow → select this workflow.
Activate the error workflow
Keep it Active. Force a failure on a test workflow to confirm #ops pings.
Tips
Upgrade Format Error to include workflow name + execution URL from the error payload.
Only attach revenue-critical producers or #ops will get noisy.
Import into n8n.io → Workflows → Import from File, attach credentials, activate.