Chat with documents via RAG: Google Drive to GPT-5 with Supabase vector database
π n8n RAG Ingestion & Query Workflow Overview This workflow is your all-in-one pipeline to turn any document into a powerful searchable knowledge base using RAG (Retrieval-Augmented Generation). From the moment a fil...
Template notes
π n8n RAG Ingestion & Query Workflow
Overview This workflow is your all-in-one pipeline to turn any document into a powerful searchable knowledge base using RAG (Retrieval-Augmented Generation). From the moment a file lands in your Google Drive, itβs automatically processed, understood, and made ready for instant AI-powered answers.
If youβre looking to unlock hidden value in your files and get answers in seconds instead of hours, this workflow is the foundation you need.
---
What It Does for You - π₯ Automatic Ingestion β New files in a designated Google Drive folder are instantly picked up. - π OCR Extraction β Extracts all text, whether itβs plain or inside tables. - π Vector Database Storage β Keeps your documents in Supabase for lightning-fast semantic search. - π§© Smart Chunking β Each page becomes a single chunk for better understanding. - π‘ AI-Powered Answers β Ask questions in natural language and get precise, context-aware responses. - π§ Persistent Memory β Remembers previous chats for more coherent conversations. - β‘ GPT-5 Intelligence β Uses OpenAIβs most advanced model for deep, accurate answers.
---
How It Works 1. Detect β Watches your Google Drive folder for new files. 2. Extract β Uses Mistral AI to read all text, including tables. 3. Chunk β Splits content so one page = one chunk for better context. 4. Embed β Generates vector embeddings with OpenAI for semantic search. 5. Store β Inserts processed content into Supabase. 6. Retrieve & Answer β When you ask, the system searches the database and passes the results to GPT-5. 7. Remember β Stores conversation history in Postgres for continuity.
---