Skip to main content

Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1

Workflow preview

Workflow preview
100%
Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1 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 Retrieval Augmented Generation (RAG) powered by Lookio and an LLM agent (GPT 4.1). This template handles both text and voice messages (voice trans...

Best for

  • Support Chatbot automation workflows
  • AI RAG 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
Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1
Workflow name
Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1

Create a Telegram bot that answers questions using Retrieval-Augmented Generation (RAG) powered by Lookio 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 Lookio tool to fetch knowledge from your uploaded documents, 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?

  • Internal teams & knowledge workers: Turn your internal docs into an interactive Telegram assistant for quick knowledge lookups.
  • Support & ops: Provide on-demand answers from your internal knowledge base without exposing full documentation.
  • Developers & automation engineers: Use this as a reference for integrating agents, transcription, and RAG inside n8n.
  • No-code builders: Quickly deploy a chat interface that uses Lookio for accurate, source-backed answers.

What it does / What problem does this solve?

  • Provides accurate, source-backed answers: Routes queries to Lookio so replies are grounded in your documents instead of generic web 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 Query knowledge base tool to separate reasoning from 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 Query knowledge base tool when domain knowledge is required.
  5. Respond: The agent output is sent back to the user via Telegram answer.

How to set up

  1. Create a Lookio assistant: Sign up at https://www.lookio.app/, upload documents, and create an assistant.
  2. Add credentials in n8n: Configure Telegram API, OpenAI (or your LLM provider), and Mistral Cloud credentials in n8n.
  3. Configure Lookio tool: In the Query knowledge base node, replace <your-lookio-api-key> and <your-assistant-id> placeholders with your Lookio API Key and Assistant ID.
  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.) and update its prompt to include your jargon list.
  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 Lookio account, API Key, and Assistant ID
  • 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 Lookio 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 docs, 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 - Query knowledge base

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

Block 15 - Sticky Note7

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

Block 16 - Sticky Note8

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

Block 17 - Prepare message from audio

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

Block 18 - Prepare message from text

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

Block 19 - Consolidate user message

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

Block 20 - Sticky Note3

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

Block 21 - Mistral transcribe

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

3. Summary Table

Workflow Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1
Complexity advanced
Nodes 21
Categories Support Chatbot, AI RAG
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/9870/9870.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 Create a voice & text Telegram assistant with Lookio RAG and GPT-4.1 do?

Create a Telegram bot that answers questions using Retrieval Augmented Generation (RAG) powered by Lookio and an LLM agent (GPT 4.1). This template handles both text and voice messages (voice trans...

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 RAG use case.