Create an intelligent Facebook Messenger chatbot with GPT-4o-mini & message memory
$20/month : Unlimited workflows
2500 executions/month
THE #1 IN WEB SCRAPING
Scrape any website without limits
HOSTINGER 🎉 Early Black Friday Deal
DISCOUNT 20% Try free
DISCOUNT 20%
Self-hosted n8n
Unlimited workflows - from $4.99/mo
#1 hub for scraping, AI & automation
6000+ actors - $5 credits/mo
Who is this for?
Businesses and developers who want to automate customer support or engagement on Facebook Messenger using AI-powered responses.
What does it do?
Creates an intelligent Facebook Messenger chatbot that:
- Responds to messages using OpenAI (gpt-4o-mini)
- Batches rapid-fire messages into a single AI request
- Maintains conversation history (50 messages per user)
- Shows professional UX feedback (seen indicators, typing bubbles)
How it works
- Webhook Verification - Handles Facebook's GET verification request
- Message Reception - Receives incoming messages via POST webhook
- Message Batching - Waits 3 seconds to collect multiple quick messages
- AI Processing - Sends combined message to OpenAI with conversation context
- Response Delivery - Formats and sends the AI response back to Messenger
Setup
- Configure Facebook Graph API credential with your Page Access Token
- Configure OpenAI API credential with your API key
- Set your verify token in the "Is Token Valid?" node
- Register the webhook URL in Facebook Developer Console
Key Features
- Message Batching: Combines "Hey" + "Can you help" + "with my order?" into one request
- Conversation Memory: Remembers context from previous messages
- Echo Filtering: Prevents responding to your own messages
- Response Formatting: Cleans markdown for Messenger's 2000-char limit