Diagnose failed workflows with a local Ollama model and send triage reports to Discord
Ready for 3.0What this workflow does
This workflow has 16 nodes and runs when another workflow fails (error workflow) (plus 2 other triggers). Along the way it connects Discord.
How it runs
Trigger: When another workflow fails (error workflow) (plus 2 other triggers).
- Normalize Failure (Code): runs custom JavaScript code
- Sample Failures (Code): runs custom JavaScript code
- Build Config (Edit Fields (Set)): sets 6 fields: ollama_url, model, n8n_editor_url…
- Skip Excluded Workflows (Filter): keeps only the items that match a condition
- Get Failed Execution (n8n): get (execution)
- Get Workflow Definition (n8n): get (workflow)
- Redact and Build Context (Code): runs custom JavaScript code
- Get Recent Diagnoses (Data table): get (row)
- Skip Repeat Failures (Code): runs custom JavaScript code
- Diagnose Failure (HTTP Request): calls an HTTP API (POST)
…plus 3 more steps. See the full node list below.
Services it uses
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 - Code
n8n-nodes-base.code - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Filter
n8n-nodes-base.filter - n8n
n8n-nodes-base.n8n - HTTP Request
n8n-nodes-base.httpRequest - Discord
n8n-nodes-base.discord - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Data table
n8n-nodes-base.dataTable
From the author
Quick overview This workflow captures failed n8n executions, fetches the execution and workflow details via the n8n API, redacts sensitive data, sends the failure context to a local Ollama chat model for diagnosis, and posts a formatted triage message to…