workflows.fit
Back to n8n workflows
n8n template$10By Paul

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...

CommunicationHITLData & StorageAILangchainUtilityCore NodesGoogle Drive
Open checkout
Loading interactive preview...

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.

---