Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice
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), r...
Template notes
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 call a Linkup tool to fetch up-to-date information from the web, and returns concise, Telegram-friendly replies. A security switch lets you restrict use to a single Telegram username for private testing, or remove the filter to make the bot public.
Who is this for?
Anyone needing quick answers: Build a personal assistant that can look up current events, facts, and general knowledge on the web. Support & ops teams: Provide quick, web-sourced answers to user questions without leaving Telegram. Developers & automation engineers: Use this as a reference for integrating agents, transcription, and web search tools inside n8n. No-code builders: Quickly deploy a chat interface that uses Linkup for accurate, source-backed answers from the web.
What it does / What problem does this solve?
Provides accurate, source-backed answers: Routes queries to Linkup so replies are grounded in up-to-date web search results instead of the LLM's static knowledge. Handles voice & text transparently: Accepts Telegram voice messages, transcribes them (via the Mistral API node by default), and treats transcripts the same as typed text. Simple agent + tool architecture: Uses a LangChain AI Agent with a Web search tool to separate reasoning from information retrieval. Privacy control: Includes a Myself? filter to restrict access to a specific Telegram username for safe testing.
How it works
1. Trigger: Telegram Trigger receives incoming messages (text or voice). 2. Route: Message Router detects voice vs text. Voice files are fetched with Get Audio File. 3. Transcribe: Mistral transcribe receives the audio file and returns a transcript; the transcript or text is normalized into presetusermessage and consolidated in Consolidate user message. 4. Agent: AI Agent (GPT-4.1-mini configured) runs with a system prompt that instructs it to call the Web search tool when up-to-date knowledge is required. 5. Respond: The agent output is sent back to the user via Telegram answer.