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 β not suitable for production environments. Base workflows: - Smart message batching AI-powered Facebook Messenger chatbot use Data Table - [Smart human takeover & auto pause AI-powered

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 β not suitable for production environments. Base workflows: - Smart message batching AI-powered Facebook Messenger chatbot use Data Table - Smart human takeover & auto pause AI-powered Facebook Messenger chatbot --- π― What This Workflow Does β Core Features: - Receives messages from Facebook Messenger via webhook - Processes user messages with Google Gemini AI - Maintains conversation context using Simple Memory node - Automatically responds with AI-generated replies - Handles webhook verification for Facebook setup - Send image or video to customer through Facebook Messenger πΉ Simplified Approach: - Memory: Simple Memory node (10-message window) - Format: Cleans text, strips markdown, truncates >1900 chars - Response: Single message delivery β οΈ Limitations & Trade-offs: 1. No Smart Batching β fragmented user messages cause spam-like replies 2. No Human Takeover Detection β bot continues even when admin joins 3. Basic Memory Management β no persistence, not reliable in production 4. Basic Text Formatting β strips markdown, truncates brutally, no smart splitting --- π When to Upgrade Upgrade to full workflows when you need: - Production deployment with reliability & persistence - Analytics & tracking (query history, reports) - Professional formatting (bold, italic, lists, code blocks) - Handling long messages (>2000 chars) - Smart batching for fragmented inputs - Human handoff detection - Full conversation persistence Key upgrades available: - Smart message batching workflow - Smart human takeover workflow --- βοΈ Setup Requirements Facebook Setup 1. Create Facebook App at developers.facebook.com 2. Add Messenger product 3. Configure webhook: - URL: - Verify token: secure string - Subscribe to: messages, messagingpostbacks 4. Generate Page Access Token 5. Copy token to "Set Context" node n8n Setup 1. Import workflow 2. Edit "Set Context" node β update pageaccesstoken 3. Configure "Gemini Flash" node credentials 4. Deploy workflow (must be publicly accessible) --- π How It Works --- ποΈ Architecture Overview Section 1: Webhook & Initial Processing - Facebook Webhook: handles GET (verification) & POST (messages) - Confirm Webhook: returns challenge / acknowledges receipt - Filters text messages only - Blocks echo messages from bot itself Section 2: AI Processing with Memory - Set Context: extracts userid, message, token - Seen & Typing: user feedback - Conversation Memory: 10-message window, per-user isolation - Process Merged Message: AI Agent with Jenix persona - Gemini Flash: Googleβs AI model for response generation Section 3: Format & Delivery - Cuts replies >2000 chars, strips markdown - Sends text via Facebook Graph API --- π¨ Customisation Guide - Bot Personality: edit system prompt in "Process Merged Message" node - Memory: adjust contextWindowLength (default 10), change sessionKey if needed - AI Model: replace Gemini Flash with OpenAI, Anthropic Claude, or other LLMs --- π Important Notes β οΈ Production Warning: testing only, memory lost on n8n restart in queue mode π No Analytics: no history storage, no reporting π§ Format Limitations: responses β€1800 chars, markdown stripped, no complex formatting --- π οΈ Troubleshooting - Bot not responding β check token, webhook accessibility, event subscriptions - Memory not working β verify session key, ensure not in queue mode, restart workflow - Messages truncated β adjust system prompt for conciseness, reduce response length --- π License & Credits Created by: Nguyα» n Thiα»u ToΓ n (Jay Nguyen) - Email: me@nguyenthieutoan.com - Website: nguyenthieutoan.com - n8n Creator: n8n.io/creators/nguyenthieutoan - Company: GenStaff
Download the workflow JSON file after purchase.
Open n8n β click the menu β Import from File.
Select the downloaded JSON and import.
Set up credentials for each node that requires them.
Click Execute Workflow to test, then activate.
Setup guide included
Purchase to unlock the full step-by-step guide
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.