The most common way an automation dies is silently. Nobody notices for two weeks, then a client asks why an invoice never arrived. An error workflow is the cheapest insurance you can attach to any build.
Here's a small, importable n8n template I use as the baseline for client work — and the checks that matter more than the JSON itself.
Download
Download the workflow JSON (import into n8n).
It's four nodes:
Error Trigger → Format Failure Message (Code) → Post to Slack Webhook (HTTP, 3 retries)
+ sticky note with setup steps
The Code node reads the error-trigger payload defensively and produces a single message with the workflow name, last executed node, execution URL and the error message. The HTTP node posts it as {"text": "..."} — which works for a Slack incoming webhook, and can be repointed to Teams, Feishu, Telegram (different body shape) or your own endpoint.
How to use it
- n8n → Workflows → Import from File → choose the JSON.
- Open "Post to Slack Webhook" and replace the placeholder URL with your webhook.
- Save the workflow.
- For every workflow you want covered: Settings → Error Workflow → select this one.
- Test it: temporarily break a target workflow (change a URL to something invalid), run it, confirm
the alert arrives with the execution link.
The part people forget: testing the failure path
An error workflow that has never fired is not an error workflow, it's a hope. The acceptance test for any automation should include:
- Deliberate failure — wrong token/URL/404 and check that the alert arrives within seconds.
- Execution link — the alert must contain a clickable execution URL, otherwise you can't debug.
- Retry policy — a transient 429 should retry before alerting; a 400 should alert immediately.
- No secret leakage — the alert must not include API keys or full payloads with personal data.
- A heartbeat — a workflow that stops running (deleted trigger, expired token) doesn't throw an
error. Add a daily "last successful run" check for anything mission-critical.
What this template deliberately does not do
- It doesn't retry the failed workflow itself (n8n has retry settings on the original workflow; blind
auto-retry can duplicate writes).
- It doesn't include credentials — you attach your own Slack/HTTP credential or use a webhook URL.
- It doesn't send emails by default; SMTP credentials vary by client. Add an
Email Sendnode if needed.
Five checks before calling a workflow "done"
- Error workflow bound and tested.
- Idempotency: re-running doesn't duplicate records.
- Timeouts on every external call.
- Cost cap on any LLM node.
- A runbook line that says who is woken up by the alert.
If you want the checklist I use for client handovers (acceptance tests, runbook, credential rotation), it's in the free audit call — or email me and I'll send the one-pager.
---
Workflow template by FlowSmith — fixed-scope automation, first prototype in 48 hours. If an n8n build has gone quietly unreliable, send me the workflow and I'll tell you what's missing.