Automated Facebook comment management with GPT-4o and LangChain
Needs changesWhat this workflow does
This AI workflow has 12 nodes and runs when an MCP client calls one of its tools (plus 1 other trigger). Along the way it connects MCP Client, HTTP Request and OpenAI Chat Model.
How it runs
Trigger: When an MCP client calls one of its tools (plus 1 other trigger).
- Facebook Mapping (Edit Fields (Set)): sets or maps fields
- AI Agent: runs an AI agent, with model: Chat Model; 1 tool (MCP Facebook); memory: Simple Memory
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
- HTTP Request Tool (legacy) in Search Media, Media Details, Search Comment…: replace with HTTP Request node connected to the AI Agent's Tool input.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
| HTTP Request Tool (legacy) Search Media, Media Details, Search Comment, Reply Comment, Send Direct Message | HTTP Request node connected to the AI Agent's Tool input |
Nodes used (8)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - MCP Server Trigger
@n8n/n8n-nodes-langchain.mcpTrigger - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - HTTP Request Tool
@n8n/n8n-nodes-langchain.toolHttpRequest - Edit Fields (Set)
n8n-nodes-base.set - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
🤖 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…