Skip to main content

Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice

Workflow preview

Workflow preview
100%
Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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 ...

Best for

  • Support Chatbot automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.telegramtrigger, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.stickynote, n8n-nodes-base.telegram, n8n-nodes-base.switch, @n8n/n8n-nodes-langchain.lmchatopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Guillaume Duvernay.

Original n8n.io source

1.1 Workflow description

Title
Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice
Workflow name
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), 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 preset_user_message 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.

How to set up

  1. Create a Linkup account: Sign up at https://linkup.so to get your API key. They offer a free tier with monthly credits.
  2. Add credentials in n8n: Configure Telegram API, OpenAI (or your LLM provider), and Mistral Cloud credentials in n8n.
  3. Configure Linkup tool: In the Web search node, find the "Headers" section. In the Authorization header, replace Bearer <your-linkup-api-key> with your actual Linkup API Key.
  4. Set Telegram privacy (optional): Edit the Myself? If node and replace <Replace with your Telegram username> with your username to restrict access. Remove the node to allow public use.
  5. Adjust transcription (optional): Swap the Mistral transcribe HTTP node for another provider (OpenAI, Whisper, etc.).
  6. Connect LLM: In OpenAI Chat Model node, add your OpenAI API key (or configure another LLM node) and ensure the AI Agent node references this model.
  7. Activate workflow: Activate the workflow and test by messaging your bot in Telegram.

Requirements

  • An n8n instance (cloud or self-hosted)
  • A Telegram Bot token added in n8n credentials
  • A Linkup account and API Key
  • An LLM provider account (OpenAI or equivalent) for the OpenAI Chat Model node
  • A Mistral API key (or other transcription provider) for voice transcription

How to take it further

  • Add provenance & sources: Parse Linkup responses and include short citations or source links in the agent replies.
  • Rich replies: Use Telegram media (images, files) or inline keyboards to create follow-up actions (open web pages, request feedback, escalate to humans).
  • Multi-user access control: Replace the single-username filter with a list or role-based access system (Airtable or Google Sheets lookup) to allow multiple trusted users.
  • Logging & analytics: Save queries and agent responses to Airtable or Google Sheets for monitoring, quality checks, and prompt improvement.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Telegram Trigger

Type / Role
n8n-nodes-base.telegramTrigger - telegramTrigger
Config choices
Version 1.1

Block 2 - Myself?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 3 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.8

Block 4 - Simple Memory

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 5 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Get Audio File

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 7 - Message Router

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 12 - Telegram answer

Type / Role
n8n-nodes-base.telegram - telegram
Config choices
Version 1.2

Block 13 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 14 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Prepare message from audio

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 17 - Prepare message from text

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Consolidate user message

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Web search

Type / Role
n8n-nodes-base.httpRequestTool - httpRequestTool
Config choices
Version 4.2

Block 21 - Mistral transcribe

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

3. Summary Table

Workflow Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice
Complexity advanced
Nodes 21
Categories Support Chatbot, AI Chatbot
Author Guillaume Duvernay
Published 18 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9871/9871.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Build a Telegram Q&A bot with Linkup web search, GPT-4.1 & Mistral voice do?

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 ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Chatbot use case.