Build a Telegram AI chatbot with human takeover using Trilox and GPT-4o-mini
UnknownWhat this workflow does
This AI workflow has 29 nodes and runs on Telegram events (message) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, Telegram, OpenAI and Trilox (community).
How it runs
Trigger: On Telegram events (message) (plus 1 other trigger).
- Message Type Router (Switch): routes items into 2 branches
- Channel Router (Switch): routes items into 6 branches
- Extract Text (Edit Fields (Set)): sets 1 field: text
- Download Voice File (Telegram): work with file
- Forward to Telegram (Telegram): uses Telegram
- Merge: merges the data from its input branches
- Transcribe Voice Message (OpenAI): transcribe (audio)
- Record Visitor Message (Trilox): uses Trilox
- Check Handler (Pre-Bot) (Trilox): check handler
- Handler Status Router (Switch): routes items into 3 branches
…plus 9 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 2 community packages, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that n8n-nodes-trilox is verified or supports 3.0 (used in Record Visitor Message, Record Bot Response, Record Awaiting Message).
- Check that n8n-nodes-trilox is verified or supports 3.0 (used in Trilox Trigger (Agent Reply)).
Nodes used (14)
- AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Telegram Trigger
n8n-nodes-base.telegramTrigger - Telegram
n8n-nodes-base.telegram - OpenAI
@n8n/n8n-nodes-langchain.openAi - Merge
n8n-nodes-base.merge - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Trilox
n8n-nodes-trilox.trilox - Trilox Trigger
n8n-nodes-trilox.triloxTrigger
From the author
> ⚠️ This template uses the Trilox community node (n8n-nodes-trilox) and requires self-hosted n8n. Who is this for n8n developers building Telegram chatbots who need to take over from the bot when it fails — without the customer getting double replies. How…