Build a RAG knowledge chatbot with OpenAI, Google Drive, and Supabase
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (14)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Edit Fields (Set)
n8n-nodes-base.set - Extract from File
n8n-nodes-base.extractFromFile - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Supabase
n8n-nodes-base.supabase - Google Drive
n8n-nodes-base.googleDrive - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
🚀 Build Your Own Knowledge Chatbot Using Google Drive Create a smart chatbot that answers questions using your Google Drive PDFs—perfect for support, internal docs, education, or research. 🛠️ Quick Setup Guide Step 1: Prerequisites - n8n instance (cloud or self-hosted) - Google Drive account (with PDFs) - Supabase account (vector database) - OpenAI API key - PostgreSQL database (for chat memory) else remove the node Step 2: Supabase Setup - Create supabase account (its free) - Create a project - Copy the sql and paste it in supabase sql editor SQL -- Enable the pgvector extension to work with embedding vectors create extension vector; -- Create a table to store your documents create table documents ( id bigserial primary key, content text, -- corresponds to Document.pageContent metadata jsonb, -- corresponds to Document.metadata embedding vector(1536) -- 1536 works for OpenAI embeddings, change if needed ); -- Create a function to search for documents create function matchdocuments ( queryembedding vector(1536), matchcount int default null, filter jsonb DEFAULT '{}' ) returns table ( id bigint, content text, metadata jsonb, similarity float ) language plpgsql as $$ variableconflict usecolumn begin return query select id, content, metadata, 1 - (documents.embedding <=> queryembedding) as similarity from documents where metadata @> filter order by documents.embedding <=> queryembedding limit matchcount; end; $$; Step 3: Import & Configure n8n Workflow - Import this template into n8n - Add credentials: - OpenAI API key - Google Drive OAuth2 - Supabase URL & service key - PostgreSQL connection - Set your Google Drive folder ID in triggers Step 4: Test & Use - Add a PDF to your Drive folder → check Supabase for new entries - Start the workflow and chat → ask questions about your documents. "What can you help me with?" - Multi-turn chat → context is maintained per user ⚡ Features - Auto-syncs new/updated PDFs from Google Drive - Extracts, chunks, and vectorizes text - Finds relevant info and answers questions - Maintains chat history per user 📝 Troubleshooting - Check folder permissions & IDs if no docs found - Verify API keys & Supabase setup for errors - Ensure PostgreSQL is connected for chat memory Tags: RAG, Chatbot, Google Drive, Supabase, OpenAI, n8n Setup Time: ~20 minutes