Templates / Build a Facebook Messenger customer service AI chatbot with Google Gemini

Build a Facebook Messenger customer service AI chatbot with Google Gemini

Ready for 3.0

by Nguyễn Thiệu Toàn (Jay Nguyen) ✓ · 4,214 views · created 2026-01-28 · Support Chatbot, AI Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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.

  1. Confirm Webhook (Respond to Webhook): sends the response back to the webhook caller
  2. Is message (If): checks a condition and branches into true / false
  3. From user? (If): checks a condition and branches into true / false
  4. Set Context (Edit Fields (Set)): sets 5 fields: user_id, page_id, message…
  5. Seen (HTTP Request): calls an HTTP API (POST)
  6. Typing (HTTP Request): calls an HTTP API (POST)
  7. Process Merged Message (AI Agent): runs an AI agent, with model: Gemini Flash; memory: Conversation Memory; output parser: Structured Output Parser
  8. Cut if reply more than 2000 characters (Code): runs custom JavaScript code
  9. Send Text (HTTP Request): calls an HTTP API (POST)
  10. Switch: routes items into 2 branches

…plus 2 more steps. See the full node list below.

Services it uses

Google Gemini Chat Model

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)

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…

Excerpt from Nguyễn Thiệu Toàn (Jay Nguyen)'s description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.