n8n-nodes-messenger-advanced
v1.0.1
Published
Enterprise-grade n8n node to interact with Facebook Messenger (Send and Receive)
Maintainers
Readme
n8n Node: Facebook Messenger Advanced
An enterprise-grade, high-performance community node for n8n that integrates fully with Facebook Messenger using real-time Webhooks and the Meta Graph API.
This package offers production-ready support for both Receiving (Trigger) and Sending (Action) text, images, videos, audio, attachments, templates, and interactive elements.
Features
⚡ Messenger Trigger Node
Experience real-time responsiveness with native Meta Webhook integration.
- Supported Events: Messages, Postbacks (Buttons), Message Reactions, and Message Echoes.
- Security First: Automatically validates
X-Hub-Signature-256payload signatures using your Meta App Secret. - Smart Webhook Verification: Natively handles Meta's
hub.challengeverification requests. - Deduplication & Echo Protection: Safely ignores page self-echoes to prevent infinite bot loops.
- Clean Data Output: Automatically flattens complex Meta JSON payloads into clear, manageable n8n workflow items.
💬 Messenger Send Node
Send dynamic and engaging content to your users safely and efficiently.
- Send Content Options: Text, Images, Video, Audio, Generic Files, and JSON Templates.
- Advanced Media Support: Upload media via raw URLs, saved Attachment IDs, or Streaming Binary Data directly from inside the n8n execution pipeline.
- Interactive Elements: Attach Quick Replies securely.
- Metadata: Full support for Facebook Message Tags and Messaging Types (Response, Proactive Update, etc).
- Enterprise Error Handling: Built-in support for standard n8n error reporting (
NodeApiError) making API limits and access token issues incredibly clear.
Setup & Installation
Option 1: Community Nodes (Recommended)
You can install this node securely directly from your n8n UI:
- Go to Settings > Community Nodes.
- Select Install.
- Enter
n8n-nodes-messenger-advanced.
Option 2: Local / Docker Build
If you are running a custom self-hosted n8n instance:
# Inside your n8n custom container or root directly
npm install n8n-nodes-messenger-advancedTo build locally for development:
git clone https://github.com/your-repo/n8n-nodes-messenger-advanced.git
cd n8n-nodes-messenger-advanced
npm install
npm run buildMeta App & Credentials Setup
Before using the nodes in n8n, you must configure a Meta application.
1. Create a Facebook App
- Go to the Meta for Developers Console.
- Create a new App of type Business.
- In the App Dashboard, add the Messenger product.
2. Generate Page Access Token
- Under Messenger > Settings, locate the Access Tokens section.
- Link your Facebook Page and click Generate Token.
- Open n8n, create a new Messenger API credential, and paste this token into the
Page Access Tokenfield.
3. Configure Security (App Secret) - Highly Recommended
- In the Meta Console, navigate to Settings > Basic.
- Reveal and copy your App Secret.
- Paste it into the
App Secretfield in your n8n credential. This guarantees that unauthenticated requests to your n8n webhook URL are explicitly rejected.
4. Setup The Webhook for the Trigger node
- Drop the Messenger Trigger Node into a new n8n workflow.
- Select your newly created
Messenger APIcredential. - In the n8n credential window, invent a random string and type it into the Verify Token field.
- From the Trigger node parameters natively within n8n, copy the Test Webhook URL. Save your workflow.
- In your Meta App Dashboard under Messenger > Settings, go to Webhooks and click Add Callback URL.
- Paste the n8n Webhook URL and the exact Verify Token you created.
- Click Verify and Save. Meta will send a GET request which the node will seamlessly answer.
- Subscribe the webhook to the required event fields (e.g.,
messages,messaging_postbacks,message_reactions).
API & Graph API Constraints
- This node securely communicates with
https://graph.facebook.com/v19.0/. - Ensure standard 24-hour messaging policies are applied when responding to standard user messages, or utilize the
Message Tagfunctionality in the node appropriately.
License
MIT
