Skip to content

Wait for New Message

Facebook

Facebook

Wait for New Message

Triggered when your Facebook Page receives a Messenger message. Requires the Page subscribed to the 'messages' webhook field.

Trigger

Inputs

Name Type Required Description
page_iddropdownOptionalFilter: only trigger for events on this Page. Leave empty for any managed Page.
contains_texttextOptionalFilter: only trigger when the message text contains this text (case-insensitive).

Outputs

Name Type Description
pageIdtextId of the Page that received the message.
senderIdtextPage-scoped id (PSID) of the sender.
senderNametextDisplay name of the sender when Meta allows profile access; may be empty without Business Asset User Profile Access.
recipientIdtextId of the recipient (the Page).
messageIdtextId of the message.
messagetextThe message text.
hasMediayes/noWhether the message has attachments.
mediaItemsarray of objectAttachment descriptors (URLs) from the webhook.
urltextAttachment URL.
contentTypetextAttachment type (image, video, audio, file).
mediaFilesfilesDownloaded attachment files with base64 content.