Document-based RAG chat assistant with Google Drive, Supabase & OpenAI
Ready for 3.0What this workflow does
This AI workflow has 32 nodes and runs when a chat message arrives (plus 3 other triggers). Along the way it connects OpenAI Chat Model, Supabase Vector Store, Embeddings OpenAI and Google Drive and 2 more.
How it runs
Trigger: When a chat message arrives (plus 3 other triggers).
- Switch: routes items into 2 branches
- Edit Fields (Edit Fields (Set)): sets 3 fields: file_id, file_type, source
- Edit Fields (Edit Fields (Set)): sets 3 fields: file_id, file_type, source
- Search files and folders (Google Drive): work with file folder
- Extract From PDF (Extract from File): extracts data from a file (pdf)
- AI Agent: runs an AI agent, with model: OpenAI Chat Model; 1 tool (Supabase Vector Store); memory: Chat Memory
- Delete a row (Supabase): delete
- Download file (Google Drive): download
- Get many rows (Supabase): get many
- Merge: merges the data from its input branches
…plus 12 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Drive templates (628) · Other OpenAI + PostgreSQL templates (191) · Other OpenAI + Supabase templates (149)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (16)
- AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Edit Fields (Set)
n8n-nodes-base.set - Google Drive
n8n-nodes-base.googleDrive - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Switch
n8n-nodes-base.switch - Merge
n8n-nodes-base.merge - Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Supabase
n8n-nodes-base.supabase - Remove Duplicates
n8n-nodes-base.removeDuplicates - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat - Extract from File
n8n-nodes-base.extractFromFile
From the author
What is this? This RAG workflow allows you to build a smart chat assistant that can answer user questions based on any collection of documents you provide. It automatically imports and processes files from Google Drive, stores their content in a searchable…