Build an advanced multi-language RAG chatbot using a comprehensive n8n workflow. Integrates Telegram, OpenAI, Supabase vector database, Google Drive, and automated web scraping.
Download this n8n workflow template and start using it instantly.
































This comprehensive n8n workflow template provides a production-ready solution for deploying a Retrieval-Augmented Generation (RAG) chatbot accessible via Telegram, complete with automated content ingestion and cleanup routines. The value of this n8n automation lies in its modularity and multi-language support, routing user queries through a sophisticated Supervisor AI Agent that directs the request to specialized RAG knowledge bases (Product, Academy, News). It solves the challenge of providing up-to-date, relevant answers across multiple data sources (Google Sheets, documents, scraped web data) by maintaining a synchronized Supabase vector store. This particular n8n workflow is a powerful example of how to leverage cutting-edge AI tools with robust cloud services.
This vast n8n workflow is divided into three major operational pillars:
Web Scrape Ingestion: A manual or scheduled n8n trigger starts the process. The flow reads website links from a Google Sheet, filters them, and uses an HTTP Request to crawl the content (via Crawl4AI). The resulting data is formatted by an OpenAI Agent and saved to a Google Doc, updating the link status in the Google Sheet. This demonstrates a flexible data preparation system.
Google Drive Ingestion: The n8n workflow is triggered by new or updated files in Google Drive (via the Google Drive n8n trigger). The system downloads the file, uses the 'Extract From File' n8n node to handle documents and PDFs, performs text splitting using a Character Text Splitter, generates vector embeddings via the Embeddings OpenAI n8n node, and finally inserts the vectorized data into the Supabase Vectorstore for RAG retrieval.
Telegram Interaction: The flow starts with a Telegram n8n trigger when a user sends a message. The incoming message is first routed through a sequence of Translator AI Agents (using OpenAI Chat Model) and Structured Output Parsers to determine the user's language and translate the query into English for efficient processing by the RAG system. A temporary 'Telegram Waiting' message is sent back to the user.
Supervisor AI & RAG: The core logic runs through the Supervisor AI Agent (using OpenAI Chat Model 5 and Postgres Chat Memory for context). This supervisor agent evaluates the user's request and routes it to one of the specialized RAG agents: Product, Academy, or News. Each RAG AI Agent uses dedicated tools (Supabase Vector Store, Google Sheets Tool, or Postgres Tool) to query its specific knowledge base.
The retrieved response is passed back to the main flow. An 'If English' n8n node checks the original user language. If translation is needed, the 'Output Translator' AI Agent translates the final English response back into the user's native language using the OpenAI Chat Model 2. The final message is merged and sent back to the user via the 'Send a text message' Telegram n8n node.
A dedicated 'Schedule Trigger1' runs periodically to fetch document IDs and links from Google Sheets and Supabase. The flow uses Supabase n8n nodes to delete old vector data and Google Sheets n8n nodes to clear metadata, ensuring the knowledge base remains clean and relevant.
To deploy this powerful n8n workflow, follow these steps:
HTTP Request - Crawl4AI n8n node, ensure the URL and any necessary authentication headers for the external web scraping service are correctly configured.Google Drive File Created/Updated n8n triggers to monitor the correct folders where documents will be uploaded. Configure the Schedule Trigger1 for your desired cleanup frequency. Telegram Trigger (n8n trigger): The entry point for the chatbot, listening for incoming Telegram messages.
OpenAI Chat Model (n8n node): Used extensively across the workflow for LLM generation, translation, and agent decision-making. Essential for the RAG agents.
Supervisor AI Agent (n8n node - LangChain): Acts as the router, analyzing the incoming translated query and delegating the retrieval task to the appropriate specialized RAG agent (Product, Academy, or News).
Supabase Vector Store (n8n node - LangChain): The primary knowledge retrieval tool for RAG agents, storing and searching document embeddings generated by the Embeddings OpenAI n8n node.
Google Sheets (n8n node): Used for retrieving lists of URLs for scraping, monitoring file metadata, and scheduled row cleanup.
HTTP Request - Crawl4AI (n8n node): Used in the Web Scraping pipeline to fetch raw content from URLs before it is processed and vectorized.
Extract From Document / Extract From PDF (n8n node): Handles parsing various file types during the Google Drive document ingestion process.
Character Text Splitter (n8n node - LangChain): Prepares text data for embedding by breaking large documents into smaller, searchable chunks, optimizing RAG performance.
Deploy a dynamic multi-LLM customer support chatbot using this versatile n8n workflow. Integrate with WordPress or any live chat via webhook to automate service and lead generation. Find powerful n8n templates here.

Use this powerful n8n workflow to automatically monitor multi-jurisdiction regulatory changes (EU, US, UK), compare them against active contracts via a Postgres database, calculate risk scores using a custom n8n node, and send critical alerts via Gmail. This is one of the essential n8n templates for legal tech.

Use this robust n8n workflow to automatically process and ingest multi-format documents (PDF, Docx, Excel) from Google Drive into a Supabase Vectorstore using OpenAI embeddings, perfect for building custom RAG chatbots.

Automate deep research using PerplexityAI and dynamic content creation using OpenAI via an advanced n8n workflow. Generate images, manage tags, and publish structured, multi-chapter articles directly to WordPress.

A Growth Hacker, Digital Marketer & AI Automation Builder with 10+ years of experience in Digital Marketing & Workflow Automation. Based in Helsinki, Finland. For questions about my templates and customization, contact me at: [email protected]







































