Channels
Messenger
Messenger
Messenger turns a message sent to your Facebook Page into a Roomy answer, drawn from the same project corpus as every other channel. It is a conversation channel, not an indexable source: nothing is crawled from Facebook, and no message is stored in the corpus.
The webhook receives entry[].messaging[] events, filters out echoes of the Page's own messages, and replies through POST /{page_id}/messages on the Messenger Platform.
What it does
Each incoming message is answered from the project attached to the channel, in the language of the question. The typing indicator is sent before the text, so the person sees the answer is being prepared rather than a silent conversation.
Two behaviours are worth knowing before you connect the Page:
- Echoes are dropped. When the Page itself sends a message, Meta delivers it back through the same webhook. Without filtering, the bot would answer its own answer in a loop. Only messages sent to the Page are processed.
- Attachments without text are ignored. A message carrying only a photo, an attachment or a sticker has no question to answer, so it produces no reply rather than an empty one.
Setup
You need a Facebook Page you administer, and a Meta app with the Messenger product added.
- In the Meta app dashboard, add the Messenger product and generate a Page access token for the Page.
- Note the Page ID and the App Secret from Settings → Basic.
- In Roomy, open the project, then Channels → Messenger, and fill in the form.
- Copy the webhook URL shown after saving, and paste it into Messenger → Settings → Webhooks. Subscribe to the
messagesfield. - Send a message to the Page to confirm the round trip.
The webhook URL is https://api.querymindx.tech/facebook/webhook. It is derived from the API host, never from the dashboard host: Meta must reach the API directly.
Configuration fields
The token, the verify token and the app secret are stored server-side and never returned in clear: the API answers has_token and has_app_secret booleans instead. An update that omits a secret keeps the stored one, so rotating only the token does not require retyping the app secret.
Security model
Two checks stand between the open internet and your corpus, and both are per-channel:
- The handshake (
GET) is accepted only whenhub.verify_tokenmatches the verify token of a channel of the same kind. A Messenger handshake carrying the Instagram verify token is refused, so the two products cannot be confused for one another. - Every event (
POST) is accepted only when theX-Hub-Signature-256header matches an HMAC-SHA256 of the raw body keyed with the channel's app secret. The comparison is constant-time.
A refused event returns 403 and processes nothing. A valid event from a Page with no channel returns 200 with traites: 0: Meta must not retry a delivery that will never succeed, so an unknown Page is acknowledged rather than rejected.
Message limits
Messenger rejects a text message longer than 2000 characters. Roomy splits a longer answer at the nearest line break, or failing that at the nearest word boundary, and never inside a multi-byte character. Each part is sent as its own message, in the order of the original text.
Because several messages arrive, the conversation shows the answer as a sequence rather than a single bubble. This is a property of the channel, not a setting.
Rendering
Messenger does not render Markdown, so the answer is converted before sending: headings become plain lines, **bold** and *italic* lose their markers, and bullets become -.
A diagram block is removed entirely rather than sent as text. Its content is JSON meant for an image renderer; sent as text it would show braces and quotes instead of a diagram. Text before and after the block is still sent.
Troubleshooting
The handshake fails with verify_token inconnu. The verify token in the Meta console does not match any Messenger channel. Check that the token belongs to the Messenger channel and not to an Instagram one.
The handshake succeeds but no message is answered. Confirm the messages field is subscribed in the Meta console, then check that the incoming entry ID is the Page ID configured in Roomy. An entry from an unknown Page is acknowledged with 200 and traites: 0 on purpose.
The reply is 403 signature invalide. The app secret stored in Roomy differs from the one that signed the event. Copy the App Secret from Settings → Basic again; it is not the Page access token.
The answer arrives in several messages. The answer exceeded 2000 characters and was split. This is expected.
Nothing answers at all, and the log says Limite de requetes atteinte. The project's plan quota is exhausted. The channel itself is configured correctly.
