Skip to content

Meta Messenger

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.

ParameterTypeRequiredDescription
credentials_idcredentialsYesMeta (Facebook/Instagram) credentials
operationselectYesOperation: fbSendText, fbSendImage, fbSendVideo, fbSendFile, fbSendAudio, fbQuickReplies, fbButtonTemplate, fbGenericTemplate, fbReceiptTemplate, fbTyping, fbMarkSeen, fbGetConversations, fbGetMessages, fbGetUser, fbGetPage, getPages, igSendText, igSendImage, igSendHeart, igReact, igGetConversations, igGetUser
pageIdtextConditionalFacebook page ID (can come from credentials)
igAccountIdtextConditionalInstagram account ID (can come from credentials)
recipientIdtextYesMessage recipient ID
text / textKeytextConditionalMessage text or key in data where it is found
messagingTypeselectNoMessage type: RESPONSE (default), UPDATE, MESSAGE_TAG
quickRepliesjsonConditionalQuick replies array (for fbQuickReplies)
buttonsjsonConditionalButtons array (for fbButtonTemplate)
elementsjsonConditionalCarousel elements array (for fbGenericTemplate)

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
{
"nextModule": "siguiente_modulo",
"data": {
"messageResult": {
"recipient_id": "123456789",
"message_id": "mid.xxxxx"
}
},
"_meta_": {
"operation": "fbSendText",
"service": "meta_messenger",
"platform": "facebook"
}
}
{
"credentials_id": 1,
"operation": "fbSendText",
"recipientId": "123456789",
"text": "Hola, gracias por contactarnos"
}
{
"credentials_id": 1,
"operation": "igSendText",
"recipientId": "987654321",
"text": "Gracias por tu mensaje en Instagram"
}
  • 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 continueOnError parameter allows the workflow to continue even if the operation fails
  • Meta API errors include code and subcode for detailed diagnostics
  • 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