Reply to Facebook comments using RAG with Google Drive, Supabase, OpenAI and Postgres
Ready for 3.0What this workflow does
This AI workflow has 33 nodes and runs when an HTTP GET request hits its webhook URL (plus 3 other triggers). Along the way it connects OpenRouter Chat Model, Facebook Graph API, Google Drive and Supabase Vector Store and 3 more.
How it runs
Trigger: When an HTTP GET request hits its webhook URL (plus 3 other triggers).
- Set Challenge Variable (Edit Fields (Set)): sets 1 field: query['hub.challenge']
- Extract Comment Data (Edit Fields (Set)): sets 4 fields: COMMENT_ID, MESSAGE, POST_ID…
- Download the PDF (Google Drive): download
- Remove outdated vectors (Supabase): delete
- Remove vectors from database (Supabase): delete
- Respond to Webhook: sends the response back to the webhook caller
- Filter: Is Comment Event (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
…plus 9 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 (16)
- Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Facebook Graph API
n8n-nodes-base.facebookGraphApi - No Operation, do nothing
n8n-nodes-base.noOp - 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 - Default Data Loader
@n8n/n8n-nodes-langchain.documentDefaultDataLoader - Embeddings OpenAI
@n8n/n8n-nodes-langchain.embeddingsOpenAi - Postgres Chat Memory
@n8n/n8n-nodes-langchain.memoryPostgresChat
From the author
Quick overview This workflow creates a Facebook Messenger chatbot that answers questions using a Supabase vector knowledge base built from PDFs in Google Drive, using OpenRouter for chat responses, OpenAI embeddings for search, and Postgres for conversation…