Templates / Chat with internal documents using Ollama, Supabase Vector DB & Google Drive

Chat with internal documents using Ollama, Supabase Vector DB & Google Drive

Needs changes

by Lakindu Siriwardana ✓ · 2,467 views · created 2025-08-02 · Internal Wiki, AI RAG

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 26 nodes and runs when a chat message arrives (plus 3 other triggers). Along the way it connects Google Drive, Postgres Chat Memory, Supabase and Supabase Vector Store and 4 more.

How it runs

Trigger: When a chat message arrives (plus 3 other triggers).

  1. Edit Fields (Edit Fields (Set)): sets 2 fields: chatInput, sessionId
  2. Set File ID (Edit Fields (Set)): sets 2 fields: file_id, file_type
  3. RAG AI Agent (AI Agent): runs an AI agent, with model: Ollama Chat Model; 1 tool (User_documents); memory: Postgres Chat Memory
  4. Delete Old Doc Rows (Supabase): delete
  5. Respond to Webhook: sends the response back to the webhook caller
  6. Download File (Google Drive): download
  7. Switch: routes items into 3 branches
  8. Extract PDF Text (Extract from File): extracts data from a file (pdf)
  9. Extract from Excel (Extract from File): extracts data from a file (xlsx)
  10. Extract Document Text (Extract from File): extracts data from a file (text)

…plus 3 more steps. See the full node list below.

Services it uses

Google DrivePostgres Chat MemorySupabaseSupabase Vector StoreEmbeddings OllamaOllama ModelOllama Chat ModelVector Store Question Answer

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in RAG AI Agent (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
RAG AI Agent (v1.6)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (20)

From the author

📚 Chat with Internal Documents (RAG AI Agent) ✅ Features - Answers should given only within provided text. - Chat interface powered by LLM (Ollama) - Retrieval-Augmented Generation (RAG) using Supabase Vector DB - Multi-format file support (PDF, Excel,…

Excerpt from Lakindu Siriwardana's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.