workflows.fit
Back to n8n workflows
n8n templateFreeBy Guillaume Duvernay

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

DevelopmentCore NodesCommunicationHITLAILangchainTelegram TriggerIf
Loading interactive preview...

Template notes

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.