n8nDemo Build
AI Agent for Facebook Messenger
24/7 Messenger replies from your own docs
Gemini 3.5 FlashConversation memoryMeta webhook verification
The Problem
Customers message a Facebook Page at all hours and expect fast answers. Small teams can't staff Messenger around the clock.
How It Works
- 01Message received
- 02Filter
- 03Load business info
- 04AI agent replies
- 05Send via Messenger
What I Built
- Webhook handles both Meta's GET verification handshake and incoming POST messages
- Filter drops events that aren't real customer messages
- Pulls business info from a Google Doc so answers stay on-brand and factual
- AI Agent on Gemini 3.5 Flash with Simple Memory to keep the conversation context
- HTTP Request sends the reply back through the Messenger API
Tools Used
n8n
Facebook Messenger
Google Gemini
Google Docs
What Was Tricky
Meta verifies a webhook with a GET request before it will send any messages. I split the webhook into a GET branch that echoes the verification challenge and a POST branch for real messages, so the same URL handles both.
Where This Fits
Local businesses with an active Facebook PageE-commerce storesClinics and service providers