Smart message batching AI-powered Facebook Messenger chatbot use Data Table
Ready for 3.0Ready 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.
Nodes used (11)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Wait
n8n-nodes-base.wait - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Respond to Webhook
n8n-nodes-base.respondToWebhook - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Data table
n8n-nodes-base.dataTable - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
π€ Facebook Messenger Smart Chatbot - Smart Batch, Format & History with n8n Data Table v3 Version 2026 - Adaptable to n8n v1.113+ and v2.x by Nguyen Thieu Toan (Jay Nguyen) --- !bananapro20251218T102041765Z1.png(fileId:3772) π Overview A production-ready, enterprise-grade chatbot solution for Facebook Messenger built entirely in n8n. Features intelligent message batching, session-aware conversation tracking, multi-page support, and natural AI-powered responses. Perfect for: - πΌ Customer support automation - π E-commerce product inquiries - π
Appointment scheduling & consultation booking - π Educational assistants & training - π€ Lead qualification & sales automation Requirements: n8n v1.113.0+, Facebook App with Messenger, Google Gemini API key (or compatible LLM) π Complementary Workflow Facebook Messenger Chatbot β Smart Human Takeover, Auto Pause & Context-Aware Adds intelligent human agent detection and automatic AI pause. When a human joins, AI pauses for configurable duration, then resumes automatically. Why combine? - Smart Batch (v3): Multi-message batching, spam reduction - Human Takeover: AI pauses for humans, smooth collaboration π Access workflow --- !Screenshot18122025154423n8n.nguyenthieutoan.com.jpeg(fileId:3771) β‘ What's New in Version 3 Major Upgrades | Feature | Impact | |---------|--------| | π’ Multi-Page Support | Manage multiple pages within one workflow | | β±οΈ Flexible Timing | Adjustable wait times instead of fixed delays | | π Improved Detection | More reliable identification of system vs. user messages | | π¦ Smart Delivery | Sequential message handling to avoid overload | | π§Ή Automatic Cleanup | Removes outdated records to keep storage efficient | | π Better Context | Clear separation of past vs. current sessions | | π Ordered Updates | Ensures actions run in the right sequence | | π Simplified Naming | Clearer labels for easier understanding | Architecture Comparison: Previous version had fixed timing, parallel updates, no multi-page handling, and no cleanup. New version introduces flexibility, sequential processing, and scalability for real-world use. --- π― Key Features - π Smart Batching: Groups consecutive messages within configurable window (default 7s) - π§ Session-Aware Context: Distinguishes old vs. current sessions for temporal awareness - π Full History: Stores complete chat logs with both user and page responses - π Natural UX: "Seen" marker and "Typing..." indicator for human-like feel - π― AI Integration: Extensible prompts for domain-specific consulting (Gemini, Groq, or any LLM) - π Multi-Language: Handles Vietnamese (anh/chα»/em) with customizable settings - π’ Multi-Page Ready: Single workflow serves multiple Facebook Pages simultaneously Technical Highlights: Idempotent processing, timezone-aware timestamps (Asia/HoChiMinh), Facebook API v24.0 compatible, sequential delivery with rate limiting protection, auto cleanup (keeps last 15 rows) --- ποΈ How It Works π General Flow Reception & Validation β Batching & Storage β Context Aggregation β β β Identify input Store for later use Combine with history Filter duplicates Apply short delay Build conversation context β AI Processing β Delivery & Cleanup β β Generate response Format & send Add signals Maintain records Ensure continuity Clean old data --- π οΈ Setup Guide Step 1: Facebook App Create app, add Messenger, set webhook, get token, subscribe page Step 2: Data Table Prepare tables for messages batching Step 3: Workflow Import template, set context, link tables, connect AI Step 4: Test Activate workflow, send test messages, verify pause/resume --- π€ About the Author Nguyen Thieu Toan (Nguyα»
n Thiα»u ToΓ n / Jay Nguyen) AI Automation Specialist | n8n Workflow Expert | Business Optimization Consultant Services: AI Automation Solutions, n8n Workflow Development, Custom Chatbot Implementation, Training Programs Contact: - π nguyenthieutoan.com - π Facebook - πΌ LinkedIn - π¦ X (Twitter) - πΊ YouTube - π§ me@nguyenthieu