AI agent for conversing with files stored in Supabase
Workflow Description
An automation enabling direct conversation with files stored in Supabase using an AI agent. The system loads files, splits them into chunks, generates semantic embeddings via OpenAI, stores them in a vector database, then answers user queries based on file contents through intelligent retrieval.
How it works
- 1.Load files from Supabase storage and extract text content
- 2.Split document text into meaningful chunks for processing
- 3.Generate semantic embeddings using OpenAI's embedding model
- 4.Store embeddings in Supabase vector database for retrieval
- 5.Receive user questions through the chat interface
- 6.Search vector database and provide contextual answers
Use cases
- Answer questions about stored PDFs, presentations, and documents
- Analyze company reports and contracts interactively
- Extract specific information from large document collections
Requirements
- Active Supabase account with configured vector table
- Valid OpenAI API key for embeddings and chat models
- Support for file formats and defined file size limits
Service Value
Ideal as a smart automation service combining integrations and AI to produce ready-to-use results.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (33)
Get All files
HTTP Request
Default Data Loader
Document Default Data Loader
Recursive Character Text Splitter
Text Splitter Recursive Character Text Splitter
Extract Document PDF
Extract From File
Embeddings OpenAI
OpenAI
Create File record2
Supabase
If
If
Get All Files
Supabase
Download
HTTP Request
Loop Over Items
Split In Batches
When clicking ‘Test workflow’
Manual Trigger
Aggregate
Aggregate
When chat message received
Chat Trigger
OpenAI Chat Model1
OpenAI
Embeddings OpenAI2
OpenAI
OpenAI Chat Model2
OpenAI
Vector Store Tool1
Tool Vector Store
Switch
Switch
Insert into Supabase Vectorstore
Vector Store Supabase
Merge
Merge
AI Agent
Agent
Supabase Vector Store
Vector Store Supabase
Sticky Note
Sticky Note
Sticky Note1
Sticky Note
Sticky Note2
Sticky Note
Sticky Note3
Sticky Note
Sticky Note4
Sticky Note
Sticky Note5
Sticky Note
Sticky Note9
Sticky Note
Sticky Note7
Sticky Note
Sticky Note6
Sticky Note
Sticky Note8
Sticky Note
Sticky Note10
Sticky Note