metaAds.onMessengerMessageReceived starts when someone sends a selected Facebook Page a Messenger message.
automations/meta-ads-on-messenger-message-received.automation.ts
account selects a static project account binding.
The event includes:
senderId, the person’s Page-scoped ID (PSID); pass it asrecipientIdto replypageId,recipientId,messageId, andtimestampin Unix millisecondstext,attachmentswith eachtypeand providerpayload, andquickReplyPayloadreplyToMessageIdwhen the person replies to a specific messagereferralwhen the message comes from a Click-to-Messenger ad, withadId,source,type,ref, andadsContextData
messageId starts at most one run. The trigger needs pages_manage_metadata, pages_messaging, and pages_show_list. Until the app has Advanced Access, Meta only delivers messages from people with a role on the Meta app.