workflows.fit
Back to n8n workflows
n8n template$14By Amanda Benks

Automated Facebook comment management with GPT-4o and LangChain

πŸ€– Facebook AI Agent with MCP Server – Built for Smart Engagement and Automation Hi! I’m Amanda πŸ₯°πŸ˜˜ β€” I build intelligent automations with n8n and Make. This powerful workflow was designed to help teams automatically...

AILangchainCore NodesChat TriggerAgentMemory Buffer WindowMcp Trigger
Open checkout
Loading interactive preview...

Template notes

πŸ€– Facebook AI Agent with MCP Server – Built for Smart Engagement and Automation

Hi! I’m Amanda πŸ₯°πŸ˜˜ β€” I build intelligent automations with n8n and Make. This powerful workflow was designed to help teams automatically handle Facebook page interactions with AI. Using Meta Graph API, LangChain, MCP Server, and GPT-4o, it allows your AI agent to search for posts, read captions, fetch comments, and even reply or message followers, all through structured tools.

---

πŸ”§ What the workflow does

- Searches for recent media using Facebook Page ID and access token - Reads and extracts captions or media URLs - Fetches comments and specific replies from each post - Replies to comments automatically with GPT-generated responses - Sends direct messages to followers who commented - Maps user input and session to keep memory context via LangChain - Communicates via Server-Sent Events (SSE) using your MCP Server URL

---

🧰 Nodes & Tech Used

- LangChain Agent + Chat Model with GPT-4o - Memory Buffer for session memory - toolHttpRequest to search media, comments, and send replies - MCP Trigger and MCP Tool (custom SSE connection) - Set node for input and variable assignment - Webhook and JSON for Facebook API structure