Diagnose failed workflows with OpenAI and send throttled Telegram alerts
Ready for 3.0What this workflow does
This AI workflow has 12 nodes and runs when another workflow fails (error workflow). Along the way it connects OpenAI Chat Model and Telegram.
How it runs
Trigger: When another workflow fails (error workflow).
- Configuration (Edit Fields (Set)): sets 4 fields: telegramChatId, cooldownMinutes, maxStackLines…
- Fingerprint and Throttle Check (Code): runs custom JavaScript code
- Should Send Alert? (If): checks a condition and branches into true / false
- Diagnose Error with AI (Basic LLM Chain): sends a prompt to an LLM, with model: OpenAI Chat Model; output parser: Diagnosis Output Parser
- Record Suppressed Duplicate (Edit Fields (Set)): sets 4 fields: status, fingerprint, suppressedSinceLastAlert…
- Build Alert Message (Code): runs custom JavaScript code
- Is Critical or High? (If): checks a condition and branches into true / false
- Send Urgent Alert (Telegram): uses Telegram
- Send Silent Alert (Telegram): uses Telegram
Services it uses
Other Telegram + OpenAI templates (807)
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.
Nodes used (8)
- Error Trigger
n8n-nodes-base.errorTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Telegram
n8n-nodes-base.telegram
From the author
Quick overview This workflow triggers on n8n workflow failures, fingerprints and throttles duplicate errors, uses an OpenAI chat model to generate a structured diagnosis, and sends formatted Telegram alerts that notify loudly for high/critical issues and…