Guard workflows and log incidents with the n8n API, data tables and email
Ready for 3.0What this workflow does
This workflow has 21 nodes and runs when another workflow fails (error workflow) (plus 2 other triggers). It uses only n8n's built-in nodes.
How it runs
Trigger: When another workflow fails (error workflow) (plus 2 other triggers).
- Settings (Edit Fields (Set)): sets 2 fields: alertTo, alertFrom
- What happened? (Code): runs custom JavaScript code
- Is an incident? (If): checks a condition and branches into true / false
- Shape the incident (Code): runs custom JavaScript code
- Get all workflows (n8n): get many (workflow)
- Store dead letter (Data table): insert (row)
- Fingerprint workflows (Code): runs custom JavaScript code
- Alert by email (Send Email): sends an email over SMTP
- Latest fingerprints (Data table): get (row)
- Compare with last version (Code): runs custom JavaScript code
…plus 8 more steps. See the full node list below.
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Error Trigger
n8n-nodes-base.errorTrigger - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Data table
n8n-nodes-base.dataTable - Send Email
n8n-nodes-base.emailSend - n8n
n8n-nodes-base.n8n - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow provides an n8n “safety net” by logging failed workflow executions to an n8n Data Table and sending email alerts, and by fingerprinting workflows nightly or via a secured webhook using the n8n API to detect suspicious edits and…