๐Ÿ“– Chat with internal documents using Ollama, Supabase Vector DB & Google Drive

โšก 2,220 views ยท ๐Ÿ“– Internal Wiki & Knowledge Base

Description

๐Ÿ“š Chat with Internal Documents (RAG AI Agent)

โœ… Features

โš™๏ธ How It Works

๐Ÿ“ฅ Document Ingestion & Vectorization

Watches a Google Drive folder for new or updated files.

Deletes old vector entries for the file.

Uses conditional logic to extract content from PDFs, Excel, Docs, or text

Summarizes and preprocesses content. (if needed)

Splits and embeds the text via Ollama.

Stores embeddings in Supabase Vector DB

๐Ÿ’ฌ RAG Chat Agent

Chat is initiated via Webhook or built-in chat interface.

User input is passed to the RAG Agent.

Agent queries the User_documents tool (Supabase vector store) using the Ollama model to fetch relevant content.

If context is found, it answers directly.

Otherwise, it can call tools or request clarification.

Responses are returned to the user, with memory stored in PostgreSQL for continuity.

๐Ÿ›  Supabase Database Configuration

  1. Create a Supabase project at https://supabase.com and go to the SQL editor.

  2. Create a documents table with the following schema:

  1. Generate an API Key

๐Ÿ”— Nodes Used

Webhook, Google Drive, Google Drive Trigger, Supabase, AI Agent, Ollama Chat Model

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup