This guide shows you how to create a Facebook Messenger chatbot in two ways:
- Use AI Agent in Text for the current, recommended experience. It can answer questions using your knowledge sources and customer context, follow your instructions, use Skills, and transfer conversations to your team.
- Keep using the previous ChatBot.com workflow if you already manage a ChatBot.com chatbot with the Visual Builder and AI Assist.
For a new setup, start with AI Agent in Text. If you already use the previous ChatBot.com Visual Builder and AI Assist workflow, follow the second part of this guide.
Start with the recommended Messenger chatbot setup
Create an AI Agent in Text, connect your Facebook Pages, and manage automated and human conversations from one Inbox. Try Text for free.
Start with the recommended Messenger chatbot setup
Create an AI Agent in Text, connect your Facebook Pages, and manage automated and human conversations from one Inbox. Try Text for free.
How to create a Messenger chatbot with AI Agent in Text
Before you begin, make sure you have:
- A Text account and an Owner or Admin role. Only Owners and Admins can edit AI Agent settings or turn the AI Agent on and off.
- The login details for your Facebook account.
- Admin access to every Facebook Page you want to connect. The Pages must be added to your Facebook profile or business account.
Step 1: Set up AI Agent in Text
- In Text, go to Team and open AI agents.
- Select the AI Agent you want to use for Messenger conversations.
- Customize its profile and instructions, then add the knowledge sources and Skills it needs.
- Make sure the AI Agent belongs to the chatting team that should receive Messenger conversations.
- Go to Team > Teams, open that chatting team, and set Chat assignment to Automatic. Manual chat assignment does not work with an AI Agent.
- When the setup is ready, set the AI Agent to Accept chats.
Learn more about profiles, knowledge, instructions, languages, and Skills in AI agents.
Step 2: Connect Messenger to Text
-
In Text, go to Settings > Messenger.
-
Select Continue with Facebook, then log in with your Facebook credentials.
-
In the Meta setup wizard:
- Select the Facebook Pages you want to connect.
- Choose your Business account.
- Review and accept the required permissions.
- Select Save.
-
Back in Text, select Connect next to each Page from which you want to receive messages.

Messenger messages from connected Pages can now appear in the Text Inbox. For connection management, including disconnecting or removing a Page, see Connecting Messenger to Text.
Step 3: Route Messenger chats to the AI Agent’s team
If the AI Agent’s chatting team is your Fallback team, Messenger conversations that do not match another rule will already go there. To send Messenger conversations—or conversations from a specific Facebook Page—to another team, create a Chat routing rule:
- Go to Settings > Chat routing.
- Select New routing rule.
- Add the Customer’s channel condition, choose Messenger, and select the Facebook Page when you want the rule to apply to one Page only.
- Set the action to Route to team, then select the chatting team that contains your AI Agent.
- Enter a name in Describe rule and select Create rule.

Chat routing rules run from top to bottom, and the first matching rule is applied. Put specific Page rules above broader Messenger rules. This feature is available on the Growth and Enterprise plans. See Chat routing rules for the complete setup.
Step 4: Test the Messenger connection
- Go to Settings > Messenger.
- Select Open next to the connected Facebook Page.
- Open the Messenger link or scan the QR code, then send a test message.
- In Text, confirm that the conversation appears in the Inbox and that the AI Agent responds as expected.
If messages do not arrive or replies fail, use How to troubleshoot Messenger: common issues and fixes.
Step 5: Set up human handoff
-
Go to Team > AI agents and select your AI Agent.
-
Open Skills, then select Transfer to human.
-
Choose one of the transfer options:
- Automatic transfers the chat to the first available teammate in the same team.
- Transfer to a specific team sends the chat to the team you select. This option appears when your Text account has more than one team.
-
Optional: enable Create a ticket. If no teammate is available within 30 seconds, the AI Agent can create a support ticket instead.
-
Save your changes.

Transfers can occur when the AI Agent cannot answer or when a customer asks for a human. Preview shows when a transfer would be triggered, but it does not perform the transfer, so complete the final check through the connected Messenger Page.
How to connect Messenger with the previous ChatBot.com workflow
The following instructions are for the previous ChatBot.com Visual Builder and AI Assist workflow. Use them when you want to connect an existing ChatBot.com chatbot directly to a Facebook Page.
Connect your chatbot to a Facebook page with a few clicks. This will make it easier for your followers and potential customers to connect with you regardless of the time of day.
The bot will ensure your customers are always cared for, and you can review their chats in the Archives. You can stay on top of the cases resolved by the bot by adding your users to Segments and collecting their information in the All leads section in the Visitors section.
Good to know
-
The integration does not support the typing indicator, delay, and welcome interaction, so you must remember to put the User input block at the beginning.
Check what Keywords/Machine Learning phrases you have in the User input block at the start of your bot flow - you need to use them correctly for the bot to start the chat later. You can also create an attribute with the Any validation type.
-
If you previously integrated bots into Facebook Messenger, you might need to use the Edit settings option first to ensure the correct page is selected.
-
Facebook allows only 3 buttons in the Button bot response type. So, if you have more than 3 options and you’d like to use the button response, use the Gallery response, where you can add more than one card within one bot response.
-
The Get started button informs users about the possibility of connecting with your chatbot. We recommend turning it on because it improves the conversation flow. Every user who clicks on this button will see your welcome message.
If you turn the Get started button off, the welcome interaction will be triggered only if a user types in the input that matches this interaction. In other cases, the bot may display the fallback message. It’ll be repeated until the user’s query matches the phrases included in your bot flow. In this case, you can’t get full control over your chatbot’s behavior and experience.
Connect ChatBot.com with Messenger
You can connect your bot to the Facebook page in the bot builder view.
- Go to your bot and open the Integrations panel. Choose Messenger from the list.

- Continue with your logged-in account. Choose the Opt in to current Pages only option (1) and select the page from the list (2). Continue.

- Review and ensure all permissions are granted. Save.

- The selected page will be displayed in the integration configurator. Click the Connect button.

-
Decide whether to turn the Get started button on or off. Add a Welcome greeting that will show in the Messenger window. Click the Add integration button.
We recommend turning the Get started button on.

- The integration will appear on the integrations list.
How to disable the Messenger integration
When you finish the integration process, it is active by default on the list. You can disable it by sliding the toggle to the off position in the Integrations panel. When the integration is inactive, the slider is gray.

Switch the toggle back on to enable the bot on your Facebook page again.
How to delete the Messenger integration
To delete the integration, go to the Integrations panel and click on the Facebook integration. Click the Delete integration button at the bottom. Confirm your choice.

Integrating ChatBot.com with LiveChat and Messenger
To Integrate ChatBot.com with both LiveChat and Messenger, you need to add the Facebook Messenger integration on the LiveChat side first. Only after that can you add ChatBot.com to LiveChat.
If you’ve already integrated ChatBot.com with Messenger and want to add the LiveChat integration, you need to disconnect ChatBot.com from Messenger first. Then, integrate LiveChat with Messenger. Lastly, connect ChatBot.com with LiveChat by following this tutorial.
FAQ
-
While integrating ChatBot.com with Messenger, I can’t see any of my fan pages on the list. What should I do? - Log out of Facebook in your ChatBot.com app. Log in again, and click on the Edit Settings button. Your fan pages should appear on the list.
-
How can I verify whether ChatBot.com is connected to my Facebook page?
- Go to your page Settings.
- Go to the Page setup section.
- View the Advanced Messaging section.
- The ChatBot.com app should be at the top of the site.
If you integrate ChatBot.com with LiveChat and Messenger, LiveChat should be displayed on that list instead of ChatBot.com.
-
Why doesn’t my bot function properly after integrating ChatBot.com with Facebook Messenger? - You probably turned the Get started button off. If you do that, a chat session starts when a user sends a message, and not when they click on the Get started button. Then, if a user asks a question that isn’t covered in the story, the bot will display the fallback message, and that’s not a bug.
How you can change that:
- If you’re using ChatBot.com, Messenger, and LiveChat together, enable the pre-chat form.
- If you’re using the ChatBot.com and Messenger integration, enable the Get started button.
How can you enable the Get started button in Facebook Messenger?
Read more: