Build a custom RAG chatbot using an n8n workflow, Gemini, and Supabase. Index n8n documentation to create an AI expert that answers questions about any n8n node or feature accurately.
Download this n8n workflow template and start using it instantly.





















n8n developers and power users needing instant, factual documentation answers.
Engineers wanting hands-on experience building an enterprise-grade RAG solution.
Users looking for advanced n8n templates integrating AI agents and vector databases.
Teams requiring a reliable, knowledge-base-backed AI expert for their specific tools.
This sophisticated n8n workflow demonstrates the power of Retrieval-Augmented Generation (RAG) by turning the entire n8n documentation website into a specialized knowledge base. It solves the common Large Language Model problem of 'hallucination' by ensuring the AI's answers are strictly derived from the official documentation. The full n8n workflow is divided into two parts: an indexing flow that scrapes, processes, and stores knowledge chunks in a Supabase vector database, and a live chatbot flow, initiated by an n8n trigger, which retrieves relevant context to answer user queries using the Gemini LLM. This is one of the most powerful n8n templates available for creating accurate, domain-specific AI experts.
The n8n workflow operates in two distinct phases:
HTML, Remove Duplicates, Filter) extract, clean, and deduplicate all documentation links, preparing a comprehensive list of pages.Execute Workflow n8n node initiates a sub-workflow loop, processing pages in batches for superior memory management, a key feature when indexing massive datasets like the full n8n documentation.HTTP Request), cleaned (HTML, Set), and checked against a long-term memory cache (Remove Duplicates) to avoid re-indexing.Recursive Character Text Splitter node breaks the clean text into small, overlapping chunks. The Gemini Chunk Embedding n8n node converts these chunks into numerical vectors (embeddings).Your Supabase Vector Store n8n node inserts these vectors and their corresponding text chunks into the configured Supabase database, completing the knowledge base.n8n Docs AI Agent n8n node, which maintains conversation history using the Simple Memory n8n node.Gemini Query Embedding n8n node converts the user's question into a vector.Gemini 2.5 Flash n8n node, synthesizes a final, authoritative answer based only on the retrieved context, ensuring the answer is factually correct and specific to the requested n8n node or n8n workflow feature.To use this powerful n8n workflow template, you must configure Supabase and Google AI credentials.
vector extension, the documents table, and the search function).service_role API key from Project Settings > API.Your Supabase Vector Store n8n node. Create a new Supabase credential, pasting the Project URL into Host and the Service Role Key into API Key.Gemini 2.5 Flash n8n node. Create a new Google AI credential and paste your Gemini API key.Official n8n Documentation and Keep Supabase Instance Alive n8n nodes.Gemini Chunk Embedding and Gemini Query Embedding n8n nodes.Start Indexing n8n trigger (top left).RAG Chatbot n8n trigger node to access the Public URL and begin chatting with your n8n expert. RAG Chatbot (Chat Trigger): The entry point and public interface for the chatbot. It is a live n8n trigger that initiates the RAG process upon receiving a message.
n8n Docs AI Agent (Agent): The control hub. It uses its custom system prompt to enforce expert behavior and decide when to use the retrieval tool (the vector store) before formulating the final response via the LLM.
Gemini 2.5 Flash (LLM): The generative AI model providing reasoning and final text generation based on the context retrieved by the vector store.
Official n8n Documentation (Vector Store - Retrieve): Configured to retrieve 10 relevant document chunks from the Supabase database using the vector generated by the Gemini Query Embedding n8n node.
Your Supabase Vector Store (Vector Store - Insert): Handles batch insertion of documentation chunks and their corresponding embeddings into the Supabase table during the initial indexing run.
Remove Duplicate Documentation Content (Remove Duplicates): Uses the Remove items seen in previous executions operation, a powerful setting that provides long-term memory for the n8n workflow, ensuring documentation pages are only indexed once, even if the workflow is run multiple times.
Build and deploy a state-of-the-art AI Agent using this specialized n8n workflow. Leveraging Google Gemini, SerpAPI for RAG, and short-term memory, this n8n templates solution is perfect for complex analytical tasks. Learn how to configure every n8n node.

Use this powerful n8n workflow template to create an advanced Slackbot that validates requests, parses complex commands, executes modular sub-workflows, and manages communication via Slack threads.

Automate restaurant orders and customer support using this advanced n8n workflow. Integrates WhatsApp (Evolution API), LangChain Agents, RAG, and Supabase for ultimate delivery automation.

Automate Discord bot responses using this n8n workflow. It periodically checks channels for mentions, filters authorized users, routes messages to an external AI API, and posts the reply.

Innovative builder with a passion for crafting automation solutions that solve real-world challenges. From streamlining workflows to driving efficiency, my work empowers teams and individuals to achieve more with less effort. Experienced in developing scalable tools and strategies that deliver results with n8n, supabase and cline.







































