Build an advanced RAG chatbot using this n8n workflow. Connect Google Drive documents, use OpenAI embeddings, and store knowledge in a Supabase vector database for intelligent conversations.
Download this n8n workflow template and start using it instantly.
Data scientists and developers building custom AI solutions.
Businesses needing searchable knowledge bases from proprietary documents.
Users looking for advanced, practical n8n templates integrating multiple cloud services.
Anyone interested in using the n8n node ecosystem for AI orchestration.
This powerful n8n workflow provides a complete solution for creating a dynamic, Retrieval-Augmented Generation (RAG) chatbot. It solves the problem of connecting scattered business knowledge (stored as PDFs or documents in Google Drive) directly to an intelligent AI conversational agent. The automation is split into two distinct processes: data ingestion and conversational query handling. When a file is added or updated in Google Drive, the n8n workflow processes the document, generates embeddings via OpenAI, and persists the data in Supabase. The second half of the n8n workflow operates as a live chat agent, using the stored knowledge and Postgres for session memory to provide highly relevant, context-aware answers, making this one of the most practical n8n templates available.
This n8n workflow operates in two main phases:
Phase 1: Document Ingestion and Vectorization
fileid from the Google Drive payload.documents table, ensuring data freshness before proceeding.fileid). The Recursive Character Text Splitter n8n node ensures the document is broken into appropriately sized chunks for effective vectorization.documents table in Supabase.Phase 2: Conversational RAG Agent
documents table) for the top 6 most relevant document chunks to inform the final answer.pgvector extension and set up the necessary documents table and matchdocuments query function (referencing the guide in the workflow's sticky note). Google Drive Trigger (File Created / File Updated): These n8n trigger nodes monitor specific folders in Google Drive, initiating the ingestion pipeline. Key Configuration: triggerOn: specificFolder, configured with the desired folder IDs.
Supabase (Delete a row): This n8n node ensures data integrity by deleting outdated vector entries associated with an updated file ID using a metadata filter.
Download the file (Google Drive node): Downloads the file content from Drive, optionally using Google File Conversion to convert files like Docs to plain text.
Extract from File: Extracts the raw text from the binary file data downloaded by the previous n8n node, preparing it for splitting.
Recursive Character Text Splitter: This n8n node splits the large document text into smaller chunks for effective embedding and indexing, a core RAG component.
Embeddings OpenAI: Used twice in this n8n workflow. This critical n8n node calls the OpenAI API to convert text into vector embeddings, enabling similarity search.
Supabase Vector Store (Insert): The primary storage n8n node for the ingestion pipeline. It inserts the processed text chunks and their vectors into the Supabase documents table.
When chat message received (Chat Trigger): The main entry point n8n trigger for the conversational agent, starting the RAG chain upon a user query.
RAG AI Agent: The orchestrator n8n node that uses system instructions, the connected memory, language model, and tools to generate informed responses.
RAG Vector store (Retrieve): Configured as an AI Tool, this n8n node executes a vector similarity search against the Supabase database, retrieving the topK (set to 6) relevant document chunks based on the user's question embedding.
Deploy a robust n8n workflow for a Question-Answering AI agent using RAG with Qdrant, Ollama embeddings, and local LLM execution via the MCP Server n8n trigger.

Deploy a custom AI Shopping Assistant using this sophisticated n8n workflow. Integrate Zep memory, GPT-4, and Google Sheets to instantly handle inventory checks, order tracking, and return policies.

Build a powerful, multi-functional AI personal assistant using this advanced n8n workflow. It integrates Google Gemini, Gmail, Google Calendar, and Google Sheets using the Langchain Agent framework and n8n's Multi-Client Protocol (MCP).

Implement a robust Retrieval-Augmented Generation (RAG) system using Qdrant vector database, Google Gemini, and OpenAI. This complete n8n workflow template enables automatic source citations from Google Drive documents.

Deploy a custom RAG system using this comprehensive n8n workflow, integrating Google Gemini's File Search API and LangChain nodes. Use this n8n template to easily upload documents and query them for context-aware answers.

Deploy a sophisticated RAG n8n workflow using Qdrant vector database, Mistral OCR for PDF ingestion, Cohere Reranker, and an OpenAI Agent. This n8n templates solution is built for accurate knowledge retrieval and robust LLM-as-a-Judge testing.

I’m currently obsessed with building cool things using AI automation and AI agents — systems that save time, cut manual work, and actually do stuff on their own. If there’s a way to automate it, I’m probably already trying it out (or planning to). Having worked in IT industry for 15 years, I’m combining that background with AI to help businesses move smarter, not just faster.







































