Automate Telegram support handover from AI to humans with GPT4 and email alerts
Ready for 3.0What this workflow does
This AI workflow has 33 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects Telegram, OpenRouter Chat Model and Azure OpenAI Chat Model. It also calls api.telegram.org over HTTP.
How it runs
Trigger: On Telegram events (message) (plus 1 other trigger).
- Topic Message (If): checks a condition and branches into true / false
- Personal (Edit Fields (Set)): sets 2 fields: personal, group
- Exit (If): checks a condition and branches into true / false
- Text Message (If): checks a condition and branches into true / false
- Close Topic (HTTP Request): calls api.telegram.org
- Forward Message (HTTP Request): calls api.telegram.org
- Configuration (Edit Fields (Set)): sets 5 fields: user, smtp, operator…
- Update Closed Topic (Data table): update
- Get Temporary Message (Data table): get
- Message Router (Switch): routes items into 3 branches
…plus 16 more steps. See the full node list below.
Services it uses
HTTP calls to: api.telegram.org
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 (14)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Edit Fields (Set)
n8n-nodes-base.set - Telegram
n8n-nodes-base.telegram - If
n8n-nodes-base.if - Send Email
n8n-nodes-base.emailSend - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Telegram Tool
n8n-nodes-base.telegramTool - Azure OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - Data table
n8n-nodes-base.dataTable - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - No Operation, do nothing
n8n-nodes-base.noOp
From the author
How it Works This is a Telegram AI-to-Human Handover System that seamlessly transitions customer support conversations between an AI agent and human operators: 1. AI-First Response: When users message the Telegram bot, an AI agent handles the conversation…