{"product_id":"auto-reply-to-facebook-comments-with-openrouter-n8n","title":"Auto Reply to Facebook Comments with OpenRouter + n8n","description":"\u003ch3\u003eAuto-reply to Facebook comments with an OpenRouter-powered AI Agent—powered by your own knowledge base\u003c\/h3\u003e\n\u003cp\u003eTurn Facebook Page conversations into an always-on support channel. This n8n workflow automatically replies to incoming Facebook comments using an OpenRouter AI Agent, backed by Postgres chat memory and a Supabase vector knowledge base that stays synced with PDFs in Google Drive.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eVerifies Facebook webhooks:\u003c\/strong\u003e Handles Meta webhook verification by returning the required \u003ccode\u003ehub.challenge\u003c\/code\u003e value when needed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eProcesses only real comments:\u003c\/strong\u003e Extracts incoming comment details, ignores non-comment events, and skips comments authored by the Facebook Page itself to prevent reply loops.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches context from the original post:\u003c\/strong\u003e Uses the Facebook Graph API to retrieve the original Facebook post message that the comment belongs to.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGenerates a concise reply:\u003c\/strong\u003e Uses an AI Agent powered by \u003cstrong\u003eOpenRouter\u003c\/strong\u003e, using \u003cstrong\u003ePostgres chat memory\u003c\/strong\u003e (per post and user) and a \u003cstrong\u003eSupabase vector-store retrieval tool\u003c\/strong\u003e to draft an on-topic response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePosts the reply back to Facebook:\u003c\/strong\u003e Sends the AI-generated text as a comment reply to the specific user comment via the Facebook Graph API.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eKeeps knowledge up to date:\u003c\/strong\u003e Monitors Google Drive folders for PDF creations, updates, and “trash” events—extracting text, generating OpenAI embeddings, and inserting\/deleting matching vectors in Supabase so the AI stays current.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomated, consistent responses to FAQ-style Facebook comments for SaaS products.\u003c\/li\u003e\n  \u003cli\u003eSupport teams using a PDF knowledge base (policies, onboarding docs, product docs) without manual copy\/paste.\u003c\/li\u003e\n  \u003cli\u003ePage admins reducing response time while keeping replies grounded in your latest documentation.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Meta Facebook (webhooks + Facebook Graph API), OpenRouter, Postgres, Supabase, Google Drive, and PDFs.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes\/tools noted in workflow:\u003c\/strong\u003e webhook, if, set, no op, supabase, and sticky note.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMemory + retrieval:\u003c\/strong\u003e Postgres chat memory plus Supabase vector-store retrieval for knowledge-grounded replies.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46132746518707,"sku":"N8N-20192","price":3.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/OMqm-OgQJqBMsSiBEIeNR_6th7lYnD.png?v=1790758951","url":"https:\/\/buyflowscripts.com\/products\/auto-reply-to-facebook-comments-with-openrouter-n8n","provider":"N8N Commerce","version":"1.0","type":"link"}