n8n Facebook Messenger RAG Chatbot w/ Google Drive & Supabase
n8n Facebook Messenger RAG Chatbot w/ Google Drive & Supabase
Regular price
£28.99
Regular price
£28.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Facebook Messenger RAG Chatbot w/ Google Drive & Supabase
Regular price
£28.99
Regular price
£28.99
Sale price
Unit price
/
per
Turn your Facebook page into a RAG-powered knowledge assistant—using Google Drive PDFs and a Supabase vector database
This n8n workflow builds a Facebook Messenger chatbot that answers user questions by retrieving relevant passages from a Supabase vector knowledge base created from PDFs stored in Google Drive. It also keeps your index automatically synced when files are created, updated, or deleted.
What this workflow does
-
Connects to Facebook Messenger via Webhooks: handles the Meta verification challenge by echoing the
hub_challenge. - Processes incoming messages: extracts sender/page IDs and message text, and ignores messages sent by the page to itself to avoid loops.
- Retrieves knowledge with RAG: uses a LangChain AI Agent with Postgres chat memory to embed the user query (OpenAI embeddings) and fetch relevant passages from a Supabase vector store.
- Generates grounded answers: sends the user’s question plus retrieved context to an OpenRouter chat model, then replies back to the user via the Facebook Graph API.
-
Indexes Google Drive PDFs automatically:
- When a file is created in a specified Drive folder: downloads the PDF, extracts text, chunks it, generates OpenAI embeddings, and inserts vectors into Supabase.
- When a file is updated: deletes matching vectors in Supabase, then re-downloads, re-extracts, re-chunks, re-embeds, and re-indexes.
- When a file appears in a designated Drive Trash folder: deletes matching vectors in Supabase and permanently deletes the file from Google Drive.
Use cases
- SaaS support: answer “How do I…” questions from your help-center PDFs directly in Facebook Messenger.
- Sales enablement: respond with policy, product, or pricing documentation stored as Drive PDFs.
- Ops teams: maintain an always-current chatbot knowledge base without manual reindexing.
Technical details
- n8n workflow triggers: Facebook Messenger webhook + Google Drive events (create/update/trash).
- AI/RAG components: LangChain AI Agent, OpenAI embeddings, Supabase vector store, OpenRouter chat model.
- Memory & persistence: Postgres chat memory for conversation context.
- Nodes/controls reflected in the workflow: webhook, if, set, no op, supabase, sticky note.
