n8n error handling
Use for production n8n workflows, webhook APIs, retries, error outputs, error workflows, dead-letter patterns, and correct HTTP response status shapes for callers.
By- name:
- n8n-error-handling
- description:
- Use for production n8n workflows, webhook APIs, retries, error outputs, error workflows, dead-letter patterns, and correct HTTP response status shapes for callers.
n8n Error Handling
Author: Taghi Molavi
Defaults
- Fallible nodes (HTTP, DB, payments, mail) get explicit error strategy.
- Webhook-facing workflows: 4xx for caller mistakes, 5xx for internal failures — never 200 on hard fail unless intentionally accepting then async-processing (document it).
- Central Error Workflow for uncaught failures + alert channel.
- Retries: exponential backoff only on idempotent ops; otherwise dead-letter.
- Do not swallow errors in Code with empty catch.
Node error output
- Enable continue on error output when you need a branch
- Wire the error branch to normalize → notify → optionally respond
References
references/WEBHOOK_API_SHAPES.mdreferences/ERROR_WORKFLOWS.md
Open this reference as its own page
Error workflows
- Trigger: Error Trigger
- Include: workflow name, execution id, node name, message, env
- Alert: Slack/Telegram/email with deep link to execution
- Rate-limit alerts to avoid storms
- Never forward raw secrets from input data
Open this reference as its own page
Webhook response shapes
// 400 caller error
{ "ok": false, "error": { "code": "invalid_payload", "message": "..." } }
// 500 internal
{ "ok": false, "error": { "code": "internal_error", "message": "retry later" } }
// 200 async accepted
{ "ok": true, "accepted": true, "id": "..." }
Use Respond to Webhook with explicit status code.
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.


