Bibliothek / RAG & Wissensdatenbanken
RAG & Wissensdatenbanken
Reply to Facebook comments using RAG with Google Drive, Supabase, OpenAI and Postgres
When an API call/webhook arrives, it answers questions from your own knowledge base with OpenAI / ChatGPT and OpenRouter using Postgres, Supabase, Facebook / Instagram, Google Drive.
Was sie bewirkt
# ENTERPRISE RAG ECOSYSTEM: AI FACEBOOK COMMENT AUTO-REPLY & DRIVE KNOWLEDGE SYNC ## Executive Summary & Architecture Overview This production-grade n8n automation ecosystem bridges the gap between static enterprise documentation (Google Drive) and real-time social media customer engagement (Facebook Pages). By combining a self-updating Retrieval-Augmented Generation (RAG) pipeline with an intelligent AI Agent, Postgres Persistent Memory, and Supabase Vector Store, this system ensures your Facebook Fanpage responds to customer comments instantly, accurately, and with precise context. --- ## Prerequisites & Credentials Setup Before running or publishing this workflow, ensure you have configured the following credentials in your n8n instance: 1. OpenRouter API Account: Required to power the AI Agent LLM model. 2. OpenAI API Account: Required for generating document embeddings (Embeddings OpenAI / Embed the query). 3. Supabase Account & Vector Store Setup: - Create a Supabase project and enable pgvector. - You need to create the vector table named documents. Follow the official guide here: Supabase LangChain AI Integration Guide. 4. PostgreSQL Database Account: - Required for Postgres Chat Memory to isolate conversation history per user per post. 5. Google Drive OAuth2 API: - Required to monitor the watched folders (Google Drive Trigger & file operations). 6. Facebook Graph API Account: - Requires a Page Access Token with permissions: pages_manage_posts, pages_read_engagement, and pages_messaging (or comment management permissions). --- ## Facebook Webhook & n8n Webhook Configuration Guide To receive real-time comments from your Facebook Page, you must set up a Meta App and configure the n8n Webhook node: 1. Configure n8n Webhook: - Refer to the official n8n Webhook Node Documentation for detailed configuration options (such as handling challenge verification methods and routing). 2. Configure Meta for Developers: - Go to Meta for Developers and create/select your app. - Add the Webhooks product and select Page subscription. - Callback URL: Paste your n8n Webhook production URL. - Verify Token: Enter the secret token matching your configuration. - Subscribe to the feed (or comments) field. 3. Once verified, the webhook will automatically handle Meta's initial verification challenge (hub.challenge) and process incoming comment events. --- ## Detailed Breakdown o
Die Schritte
- Webhook
- Respond to Webhook
- AI Agent
- OpenRouter Chat Model
- Extract Comment Data
- Set Challenge Variable
- Filter: Is Comment Event
- Filter: Ignore Page Self-Comments
- Get Post Content
- Send Reply Comment
- End / Ignore Self-Comment
- End / Not a Comment
- New PDF added to Drive folder
- Download the PDF
Insgesamt 33 Schritte.
Ähnliche Automatisierungen
RAG & WissensdatenbankenRun a RAG Messenger chatbot with Facebook, Google Drive, Supabase, OpenAI and OpenRouter36 SchritteRAG & WissensdatenbankenSync a Telegram RAG chatbot with Google Drive using OpenAI and Supabase25 SchritteSocial-Media-VeröffentlichungSchedule and publish Instagram and Facebook Reels from Google Sheets with Gemini26 SchritteKI-Agenten & AssistentenCreate Facebook photo posts from Telegram albums using OpenRouter AI18 Schritte