Meta Messenger
Description
Section titled “Description”This module allows sending and receiving messages through Facebook Messenger and Instagram Direct using the Meta Graph API v18.0. It supports operations for both Facebook (sending text, images, video, audio, files, quick replies, button templates, carousels, receipts, typing indicators) and Instagram (sending text, images, hearts, message reactions).
It also allows querying conversations, messages, user profiles and page information. The operation is determined by the operation field or by the node name.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | Meta (Facebook/Instagram) credentials |
| operation | select | Yes | Operation: fbSendText, fbSendImage, fbSendVideo, fbSendFile, fbSendAudio, fbQuickReplies, fbButtonTemplate, fbGenericTemplate, fbReceiptTemplate, fbTyping, fbMarkSeen, fbGetConversations, fbGetMessages, fbGetUser, fbGetPage, getPages, igSendText, igSendImage, igSendHeart, igReact, igGetConversations, igGetUser |
| pageId | text | Conditional | Facebook page ID (can come from credentials) |
| igAccountId | text | Conditional | Instagram account ID (can come from credentials) |
| recipientId | text | Yes | Message recipient ID |
| text / textKey | text | Conditional | Message text or key in data where it is found |
| messagingType | select | No | Message type: RESPONSE (default), UPDATE, MESSAGE_TAG |
| quickReplies | json | Conditional | Quick replies array (for fbQuickReplies) |
| buttons | json | Conditional | Buttons array (for fbButtonTemplate) |
| elements | json | Conditional | Carousel elements array (for fbGenericTemplate) |
Credentials
Section titled “Credentials”Service type: meta_messenger. Stored in the servicecredentials table.
Configuration fields:
- accessToken: Facebook page access token (required)
- pageId: Facebook page ID
- igAccountId: Instagram Business account ID
Output
Section titled “Output”{ "nextModule": "siguiente_modulo", "data": { "messageResult": { "recipient_id": "123456789", "message_id": "mid.xxxxx" } }, "_meta_": { "operation": "fbSendText", "service": "meta_messenger", "platform": "facebook" }}Usage Example
Section titled “Usage Example”Basic case - Send text via Facebook
Section titled “Basic case - Send text via Facebook”{ "credentials_id": 1, "operation": "fbSendText", "recipientId": "123456789", "text": "Hola, gracias por contactarnos"}Basic case - Send text via Instagram
Section titled “Basic case - Send text via Instagram”{ "credentials_id": 1, "operation": "igSendText", "recipientId": "987654321", "text": "Gracias por tu mensaje en Instagram"}API Used
Section titled “API Used”- Meta Graph API v18.0:
https://graph.facebook.com/v18.0 - Documentation: https://developers.facebook.com/docs/messenger-platform
- Instagram Documentation: https://developers.facebook.com/docs/instagram-api/guides/messaging
- A Page Access Token with pages_messaging permissions is required
- Quick replies are limited to 13 options per message
- Button templates are limited to 3 buttons per message
- Carousels (generic template) support up to 10 elements
- The recipientId generally comes from the senderId field in the incoming webhook data
- Instagram operations require the igAccountId of the Instagram Business account linked to the page
- The
continueOnErrorparameter allows the workflow to continue even if the operation fails - Meta API errors include code and subcode for detailed diagnostics
Related Nodes
Section titled “Related Nodes”- FB Send Text, FB Send Image, FB Send Video, FB Send File, FB Send Audio
- FB Quick Replies, FB Button Template, FB Generic Template (Carousel), FB Receipt
- FB Typing, FB Mark Seen, FB Get Conversations, FB Get Messages, FB Get User, FB Get Page
- IG Send Text, IG Send Image, IG Send Heart, IG React, IG Get Conversations, IG Get User