Skip to content
QwryAI
Documentation
Pages

Integrations

Add an AI agent to Facebook Messenger

Connect your Facebook pages so your QwryAI agent handles Messenger conversations, with human takeover

The Messenger channel connects your QwryAI agent to one or more Facebook Pages, so it answers the messages customers send those Pages in Facebook Messenger. It's for businesses that get customer questions through their Facebook Page, such as online stores handling product and order questions, or local businesses answering about opening hours and bookings.

Use cases

Customer support. Your agent answers from its data sources and reads the photos and documents customers send. When a customer needs a person, the Escalations Action opens a ticket and your team replies from the Inbox.

Shopping and orders. With Shopify connected, customers can find products and check their orders in Messenger. Choose which Actions run on Messenger on the channel's Actions tab.

Public comments. Comment monitoring turns comments on your Facebook posts into tickets, so your team sees questions like "How much is shipping?" in the same place as other tickets.

Before you start

  • A QwryAI agent
  • A Facebook Page you manage, and the Facebook account that manages it

How to connect Messenger

  1. Open the Messenger channel

    Open your agent and select Channels in the sidebar. On the Messenger card, Connect your agent to a Facebook page and let it respond to messages from your customers, select Setup. If you've connected pages before, the card shows Manage.

    Channels › Messenger › Setup.
  2. Read the page selection note

    QwryAI shows Connect Messenger before it opens Meta. Pages you select are granted access across your QwryAI agents, and unselecting a page that's already connected disconnects it from its agent. Select I understand.

    Read this before Meta opens.
  3. Grant permission in Meta

    Meta's window opens. Sign in with Facebook if asked and allow QwryAI to use your Pages. If you've connected pages before, choose to edit your previous settings.

  4. Choose your pages and save

    Select the Pages your agent should answer, review the permissions, and select Save, then Done. QwryAI connects the Pages in a few seconds.

  5. Check the Connection tab

    On Channels › Messenger › Manage, the Connection tab lists your Connected Facebook pages. Each page has an Active switch and a menu with Open in Messenger and Delete page. Add Pages with Connect a new Facebook Page.

    Connected Facebook pages.
Open in Messenger to test.

Human takeover

Human takeover lets you take over a chat whenever you want and reply to the customer yourself. It works per conversation: the agent stops answering that conversation until you hand it back.

Enable human takeover for a conversation

  1. Open the Inbox and select Messenger in the Channels list.
  2. Open the conversation.
  3. Select Take over. The AI stops answering and your replies go to the customer in Messenger.
  4. To give the conversation back, select Hand back to AI.

To stop the agent without taking the conversation yourself, use Pause AI and Resume AI.

Response delay

Customers on Messenger often send several short messages in a row. If your agent replied at once, it would answer each one before the customer had finished. The response delay makes the agent wait after the customer's latest message; anything sent during the wait is answered in one reply.

To set it:

  1. Go to Channels › Messenger › Manage › Delay.
  2. For each Facebook Page, set a Minimum delay and a Maximum delay in seconds.
  3. Select Save.
A minimum and a maximum per page.

For each reply, the agent waits a random time between the two values, so replies don't arrive at a mechanical interval. To always wait the same time, enter the same value twice.

Lead collection

QwryAI can save each person who messages your Facebook Pages as a contact, with their name and profile picture. On the Leads tab, turn on Enable automatic collection of leads and tick the Pages. Collected leads appear in Contacts.

Leads from Messenger.

Comment monitoring

Comment monitoring turns comments on your Facebook posts into tickets in QwryAI, so your team sees them alongside other tickets.

  1. Open the channel settings

    Go to Channels › Messenger › Manage.

  2. Open Comments

    Select the Comments tab.

  3. Enable comment monitoring

    Turn on Enable comment monitoring and tick the Facebook Pages to monitor. QwryAI shows Comment monitoring enabled.

    Comments become tickets.
  4. Receive comments as tickets

    When someone comments on a post of a connected Page, QwryAI creates a ticket titled Facebook comment from the person's name, with the comment and a link to the post.

  5. Reply on Facebook

    Open the ticket, follow the post link, and reply under the comment on Facebook.

Connecting different AI agents to different pages

Each Facebook Page answers with one agent at a time, so different Pages can use different agents.

  1. Open the agent you want to connect

    Open the agent, then Channels › Messenger: Setup or Manage.

  2. Connect a new page

    On the Connection tab, select Connect a new Facebook Page, then I understand, and in Meta's window choose to edit your previous settings.

  3. Keep your existing pages selected
  4. Select the new page and save

    Select the Page to add and save. It appears on this agent's Connection tab.

    A Page that already answers with another agent is listed under Facebook pages connected to other agents. To move it, delete it from that agent and connect it again from this one.

    Delete a page to move it to another agent.

Channel settings

Overview shows the model, data sources, Actions and instructions Messenger uses. Turn off Sync with global instructions to write instructions for Messenger only. Actions lists the Actions with a switch for each, so you choose which run on Messenger.

Overview: what Messenger uses.

Limitations

  • Deleting a page stops replies in its conversations. The conversations stay in the Inbox.
  • Unselecting a page in Meta's window disconnects it from QwryAI, even if you only meant to add another.
  • The agent doesn't answer comments. Comment monitoring turns them into tickets; replies are posted on Facebook.

Best practices

Troubleshooting

A page card says Disconnected

Facebook no longer accepts the page's access, for example after a password change. Select Connect a new Facebook Page and connect it again, keeping the page selected.

A page stopped responding after you edited your settings

The page was probably unselected in Meta's window, which disconnects it. Select Connect a new Facebook Page again and make sure the page is selected.

The agent stopped replying in a conversation

Check whether the conversation was taken over, paused, or has an open ticket. A conversation can also be paused by spam detection. If the agent is silent everywhere, check the page's Active switch.

Frequently asked questions

Can I connect more than one Facebook page?

Yes. Select several during setup, or add more later with Connect a new Facebook Page.

Can different pages use different agents?

Yes. Each Page connects to one agent at a time. See Connecting different AI agents to different pages.

Does the agent reply to comments on my posts?

No. Turn on comment monitoring to get a ticket for each comment, and reply on Facebook.

How do I reply to a customer myself?

Select Take over on the conversation in the Inbox, or let the customer reach your team through an Escalations ticket. Either way, the agent stops answering that conversation.

How many message credits does Messenger use?

Each reply uses message credits based on your agent's model, the same as on every other channel.

Next steps

Explore the documentation