Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice
Needs changesWhat this workflow does
This AI workflow has 13 nodes and runs on Telegram events (message). Along the way it connects Telegram, OpenAI Chat Model and HTTP Request. It also calls api.mistral.ai and api.linkup.so over HTTP.
How it runs
Trigger: On Telegram events (message).
- Myself? (If): checks a condition and branches into true / false
- Message Router (Switch): routes items into 2 branches
- Get Audio File (Telegram): work with file
- Prepare message from text (Edit Fields (Set)): sets 1 field: preset_user_message
- Mistral transcribe (HTTP Request): calls api.mistral.ai (POST)
- Consolidate user message (Edit Fields (Set)): sets 1 field: final_user_message
- Prepare message from audio (Edit Fields (Set)): sets 1 field: preset_user_message
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Web search); memory: Simple Memory
- Telegram: uses Telegram
Services it uses
HTTP calls to: api.mistral.ai, api.linkup.so
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Telegram
n8n-nodes-base.telegram - Switch
n8n-nodes-base.switch - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Edit Fields (Set)
n8n-nodes-base.set - Http Request Tool
n8n-nodes-base.httpRequestTool - HTTP Request
n8n-nodes-base.httpRequest
From the author
Create a Telegram bot that answers questions using AI-powered web search from Linkup and an LLM agent (GPT-4.1). This template handles both text and voice messages (voice transcribed via a Mistral model by default), routes queries through an agent that can…