Templates / AI agent to chat with files in Supabase Storage

AI agent to chat with files in Supabase Storage

Needs changes

by Mark Shcherbakov ✓ · 80,809 views · created 2024-12-10 · 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 22 nodes and runs when a chat message arrives (plus 1 other trigger). Along the way it connects Embeddings OpenAI, Supabase, OpenAI Chat Model and Vector Store Question Answer and 1 more.

How it runs

Trigger: When a chat message arrives (plus 1 other trigger).

  1. AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Vector Store Tool)
  2. Get All Files (Supabase): get many
  3. Aggregate: combines items into one
  4. Get All files (HTTP Request): calls an HTTP API (POST)
  5. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  6. If: checks a condition and branches into true / false
  7. Download (HTTP Request): calls an HTTP API
  8. Switch: routes items into 2 branches
  9. Merge: merges the data from its input branches
  10. Extract Document PDF (Extract from File): extracts data from a file (pdf)

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

Services it uses

Embeddings OpenAISupabaseOpenAI Chat ModelVector Store Question AnswerSupabase Vector Store

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 AI Agent (v1.7): 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)
AI Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (17)

From the author

Video Guide I prepared a detailed guide explaining how to set up and implement this scenario, enabling you to chat with your documents stored in Supabase using n8n. Youtube Link Who is this for? This workflow is ideal for researchers, analysts, business…

Excerpt from Mark Shcherbakov'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.