Build a Facebook Messenger customer service AI chatbot with Google Gemini
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects Google Gemini Chat Model.
How it runs
Trigger: When an HTTP GET request hits its webhook URL.
- Confirm Webhook (Respond to Webhook): sends the response back to the webhook caller
- Is message (If): checks a condition and branches into true / false
- From user? (If): checks a condition and branches into true / false
- Set Context (Edit Fields (Set)): sets 5 fields: user_id, page_id, message…
- Seen (HTTP Request): calls an HTTP API (POST)
- Typing (HTTP Request): calls an HTTP API (POST)
- Process Merged Message (AI Agent): runs an AI agent, with model: Gemini Flash; memory: Conversation Memory; output parser: Structured Output Parser
- Cut if reply more than 2000 characters (Code): runs custom JavaScript code
- Send Text (HTTP Request): calls an HTTP API (POST)
- Switch: routes items into 2 branches
…plus 2 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (11)
- Edit Fields (Set)
n8n-nodes-base.set - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook - HTTP Request
n8n-nodes-base.httpRequest - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Switch
n8n-nodes-base.switch - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - AI Agent
@n8n/n8n-nodes-langchain.agent - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured
From the author
🤖 Build a customer service AI chatbot for Facebook Messenger with Google Gemini --- 📌 Overview A streamlined Facebook Messenger chatbot powered by AI with conversation memory. This is a simplified version designed for quick deployment, learning, and testing…