Ai agent to chat with files in Supabase Storage and Google Drive
Needs changesWhat this workflow does
This AI workflow has 49 nodes and runs when an HTTP POST request hits its webhook URL (plus 4 other triggers). Along the way it connects Embeddings OpenAI, Supabase, Supabase Vector Store and OpenAI Chat Model and 1 more. It also calls api.cloud.llamaindex.ai over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 4 other triggers).
- Edit Fields (Edit Fields (Set)): sets 2 fields: session_id, message
- Edit Fields (Edit Fields (Set)): sets 2 fields: session_id, message
- Get All Files (Supabase): get many
- Set File ID (Edit Fields (Set)): sets 2 fields: file_id, extension
- Merge: merges the data from its input branches
- Aggregate: combines items into one
- Delete Old Doc Rows (Supabase): delete
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Supabase Vector Store); memory: Simple Memory
- Get All files (HTTP Request): calls an HTTP API (POST)
- Download File (Google Drive): download
…plus 24 more steps. See the full node list below.
Services it uses
HTTP calls to: api.cloud.llamaindex.ai
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 Agent1 (v1.8): 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.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent1 (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (22)
- HTTP Request
n8n-nodes-base.httpRequest - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Recursive Character Text Splitter
@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Supabase
n8n-nodes-base.supabase - If
n8n-nodes-base.if - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Manual Trigger
n8n-nodes-base.manualTrigger - Aggregate
n8n-nodes-base.aggregate - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Edit Fields (Set)
n8n-nodes-base.set - Wait
n8n-nodes-base.wait - Switch
n8n-nodes-base.switch - Stop and Error
n8n-nodes-base.stopAndError - Merge
n8n-nodes-base.merge - Webhook
n8n-nodes-base.webhook
From the author
Video Guide I prepared a detailed guide that illustrates the entire process of building an AI agent using Supabase and Google Drive within N8N workflows. Youtube Link Who is this for? This workflow is designed for developers, data scientists, and business…