Auto-respond to Instagram, Facebook & WhatsApp with Llama 3.2
Needs changesWhat this workflow does
This AI workflow has 11 nodes and runs on WhatsApp events (messages) (plus 2 other triggers). Along the way it connects WhatsApp Business Cloud and Ollama Chat Model. It also calls graph.facebook.com over HTTP.
How it runs
Trigger: On WhatsApp events (messages) (plus 2 other triggers).
- Message Processor (Code): runs custom JavaScript code
- AI Travel Agent (AI Agent): runs an AI agent, with model: Ollama Chat Model; memory: Platform Memory
- Response Router (Switch): routes items into 3 branches
- Send message (WhatsApp Business Cloud): send
- Instagram Sender (HTTP Request): calls an HTTP API
- Facebook Sender (HTTP Request): calls graph.facebook.com
Services it uses
HTTP calls to: graph.facebook.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Travel 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.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Travel Agent (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - AI Agent
@n8n/n8n-nodes-langchain.agent - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - WhatsApp Business Cloud
n8n-nodes-base.whatsApp
From the author
This automated n8n workflow enables AI-powered responses across multiple social media platforms, including Instagram DMs, Facebook messages, and WhatsApp chats using Meta's APIs. The system provides intelligent customer support, lead generation, and smart…