Facebook Messenger Chatbot
Answer your Facebook Page's messages from your own documents — policies, FAQs, shipping info, product docs. Setup takes minutes, credentials are stored encrypted, and every reply is grounded in your workspace documents with sources.
What you need
- A Ragbee account with a workspace and at least a few documents uploaded
- A Facebook Page you administer (the bot answers as that Page)
Two ways to connect
- Path A — Hosted (recommended): one click, no Meta developer account needed
- Path B — Your own Meta app: full control, works with any Page and any Meta app you own
Path A — Hosted (one-click connect)
- Create the integration. In your Ragbee dashboard go to Chatbots → Integrations → New chatbot integration. Choose platform Messenger, give it a name, and save.
- Click "Connect Facebook." The Connect Facebook button appears on your Messenger integration. Log in with the Facebook account that manages your Page, approve the permission prompt, and Ragbee automatically stores your Page ID and a fresh Page Access Token — encrypted, no copy-pasting.
- Give the bot its documents. Create a chatbot definition for the integration (the dashboard prefills a Messenger-ready persona). Point it at the workspace whose documents it should answer from.
- Send a test message. Message your Page. The bot replies in seconds, with sources. Conversations, events, and delivery status all show up in your dashboard.
Your Page token is refreshed automatically when you reconnect — if a token ever expires or you rotate it, just click Connect Facebook again.
Path B — Bring your own Meta app
Ragbee verifies Meta's webhook signatures and challenges against your app credentials — nothing shared with anyone else.
1. Create your Meta app
At developers.facebook.com create an app (Business type), then add the Messenger use case/product. Connect the Facebook Page the bot will answer for.
2. Register the webhook
In your Meta app: Messenger → Settings → Webhooks → Edit (in the newest dashboard: Use cases → Messenger first, then the Webhooks panel). Use:
- Callback URL:
https://bots.ragbee.ai/webhooks/messenger - Verify token: a token you choose
- Then subscribe to the
messageswebhook field
Gotcha: the webhook fields only appear after the Messenger product/use case is added. A lone "Authorize callback URL" field under Settings → Basic is not it — the webhook form always shows a Callback URL and a Verify Token together.
3. Fill the four fields in Ragbee
Chatbots → Integrations → new (or edit) a Messenger integration:
- Facebook Page ID — numeric Page ID (required)
- Facebook Page Access Token — generate one in your Meta app's Messenger → Settings (Token Generation), or use the Connect Facebook button
- Facebook App Secret — your app's secret from Settings → Basic (required for Path B)
- Facebook Webhook Verify Token — the same token you entered in step 2 (required for Path B)
4. Save and test
Ragbee verifies Meta's signed webhook events against your app secret and routes messages to your workspace by Page ID. Message the Page and the bot answers.
Going public
- Development vs Live mode: while your Meta app is in Development mode, only app admins/testers/developers can chat with the bot. To let everyone message it, switch the app to Live (top of App Settings → Basic). Facebook may require App Review for the
pages_messagingpermission for apps owned by business organizations; personal developer apps usually go live without review. - 24-hour window: Messenger bots can only reply within 24 hours of a person's last message — standard for support bots.
- Replies are grounded in your workspace documents only; Ragbee's channel policy keeps personal or sensitive account data out of chat and routes those conversations to your official channels.
- All Page tokens and app secrets are stored encrypted at rest.
- One webhook serves every integration — routing is by Page ID, so you can run several Pages/bots.
Troubleshooting
- "Doesn't stick" when saving the webhook URL: you're in the wrong field — the webhook form always has Callback URL + Verify Token together, under Messenger → Settings → Webhooks.
- Webhook verifies but no replies: check that the
messagesfield is subscribed, and that the Page Access Token is filled in the integration (Connect Facebook fixes this in one click). - Bot ignores you: your Meta app is probably still in Development mode — add yourself as a tester or go Live.
- Token expired: click Connect Facebook again to fetch a fresh one.
Stuck? Contact Ragbee support — or open the integration in your dashboard and check its event log for routing details.
Ragbee