Skip to main content

Facebook trigger

Starts the flow when someone messages your Facebook Page. Configured on the Start node by adding a webhook of type Facebook Messenger.

Connect the Page first — see Facebook credentials.

Settings​

FieldWhat it does
Webhook NameNames this trigger and forms the prefix of every variable it provides. Required.
Facebook PageWhich connected Page feeds this flow. Connect Pages in Connected Accounts — there is no in-canvas connect, because Facebook's flow needs a Page-picking step.
Facebook EventsWhich events start the flow. Events already claimed by another flow on the same Page are hidden, so two flows cannot both answer the same message.
Auto-switch to manual mode on operator replyOn by default. When an operator answers from the Page inbox, the AI stops and the chat goes to a human. Turn off only if your own automation replies on this Page from outside Flowera.

Events​

EventFires wheneventType
MessagesSomeone sends the Page a messagemessage
Button clicksGet Started, persistent menu, or a button your flow sentpostback
Ad / link referralsChat opened from a Click-to-Messenger ad or m.me link, nothing typed yetreferral

Variables​

Replace <name> with your webhook name.

VariableContains
{{$webhook.<name>.senderId}}The person's PSID — use this to reply to them
{{$webhook.<name>.senderName}}The person's name — best-effort, can be empty
{{$webhook.<name>.recipientId}}Your Page ID
{{$webhook.<name>.eventType}}message, postback or referral
{{$webhook.<name>.timestamp}}When the event happened (ISO 8601)
{{$webhook.<name>.postbackPayload}}The value behind the tapped button
{{$webhook.<name>.referralSource}}How the chat started, e.g. ADS
{{$webhook.<name>.referralAdId}}Click-to-Messenger ad ID
{{$webhook.<name>.referralRef}}ref parameter from an m.me link

senderUsername exists but is always empty — Messenger has no username for Page conversations. There is no profile picture either. senderName is best-effort, so give your flow a fallback. See Facebook Messenger.

Media the person sends is downloaded and attached to the run, so a vision-capable model can read it the same way it does on Instagram and WhatsApp.

Branching on a button​

postbackPayload is the value you set when sending the button, so it is exact — no interpretation needed:

Condition: {{$webhook.facebook-dm.postbackPayload}} equals ORDER_STATUS

Attributing an ad​

For a Click-to-Messenger conversation, the ad reaches the flow two ways: as the webhook variables above, and as {{$flow.facebookAds.adId}} for lead-source reporting.