Run a RAG Messenger chatbot with Facebook, Google Drive, Supabase, OpenAI and OpenRouter
Ready for 3.0What this workflow does
This AI workflow has 36 nodes and runs on Google Drive events (file created) (plus 3 other triggers). Along the way it connects Google Drive, Supabase Vector Store, Supabase and Embeddings OpenAI and 3 more.
How it runs
Trigger: On Google Drive events (file created) (plus 3 other triggers).
- Download the PDF (Google Drive): download
- Remove outdated vectors (Supabase): delete
- Remove vectors from database (Supabase): delete
- Prepare Webhook Verification (Edit Fields (Set)): sets 1 field: query.hub_challenge
- Filter Page Messages (If): checks a condition and branches into true / false
- Extract text from PDF (Extract from File): extracts data from a file (pdf)
- Download updated PDF (Google Drive): download
- Confirm file removed from Drive (Google Drive): delete file
- Respond to Webhook: sends the response back to the webhook caller
- Extract Messenger Data (Edit Fields (Set)): sets 3 fields: Id_Sender, Id_Page, User_Message
…plus 14 more steps. See the full node list below.
Services it uses
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 (19)
- Google Drive Trigger
n8n-nodes-base.googleDriveTrigger - Google Drive
n8n-nodes-base.googleDrive - Extract from File
n8n-nodes-base.extractFromFile - Supabase Vector Store
@n8n/n8n-nodes-langchain.vectorStoreSupabase - Supabase
n8n-nodes-base.supabase - Edit Fields (Set)
n8n-nodes-base.set - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Respond to Webhook
n8n-nodes-base.respondToWebhook - Facebook Graph API
n8n-nodes-base.facebookGraphApi - Webhook
n8n-nodes-base.webhook - Data table
n8n-nodes-base.dataTable - Limit
n8n-nodes-base.limit - If
n8n-nodes-base.if - Wait
n8n-nodes-base.wait - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat
From the author
Quick overview This workflow powers a Facebook Messenger chatbot that batches incoming user messages, answers with an OpenRouter chat model using RAG retrieval from a Supabase vector store, and keeps the knowledge base synced from PDFs in Google Drive (add,…