> ## Documentation Index
> Fetch the complete documentation index at: https://help.ciarem.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook comment-to-DM automations

> When someone comments a keyword on your Facebook Page's posts, Ciarem sends them a Messenger message and your AI agent takes it from there.

The same comment-to-DM automations you can run on [Instagram](https://help.ciarem.ai/channels/instagram-comment-automations.md) work on your **Facebook Page**. When someone comments a keyword on one of the Page's posts, Ciarem sends them a private message on Messenger. The conversation opens in your [Inbox](https://help.ciarem.ai/using-ciarem/inbox.md), and when they reply your [AI agent](https://help.ciarem.ai/ai-agent/agent-team.md) answers like on any other Messenger chat.

Rules are shared between the two networks: one rule can listen on Instagram accounts and Facebook Pages at once, so a campaign posted on both is a single rule.

## How it works

1. You publish a post on your Page with a clear call to action: "Comment **INFO** for prices".
2. Someone comments the keyword. Ciarem matches it against your automation rules (case- and accent-insensitive, anywhere in the comment).
3. The first matching rule sends its **direct message** to the commenter on Messenger. Facebook allows one private message per comment. If you chose to, the rule also posts a short **public reply** under their comment so everyone else sees you answered.
4. The message opens a Messenger conversation in the Inbox, with the comment and the post shown at the top as context.
5. When they reply, the conversation is a normal Messenger chat: the AI agent qualifies, answers, and hands off to your team when it should. A comment does not open the messaging window; their reply does.

## Create a rule

**1. Open the Messenger channel page**

In the sidebar, go to **Channels**, then **Messenger**. Your Facebook Page must be [connected](https://help.ciarem.ai/channels/connect-messenger.md).

**2. Open Comment automations**

Click **Manage automations**, then **New automation**. It is the same list you reach from the Instagram page.

**3. Pick the accounts and posts**

* **Accounts**: the Facebook Pages and Instagram accounts the rule listens on. Pick one or several.
* For each account, choose **All posts** or **Specific posts**. With specific posts, pick from the Page's recent posts, so a rule about a launch only fires on the launch post.

**4. Set the keywords and the message**

Keywords, the **Direct message**, the optional image card, buttons, and public reply work exactly as on Instagram. See [Write what it sends](https://help.ciarem.ai/channels/instagram-comment-automations.md#create-a-rule). A **Reply** button tap counts as the customer's answer on Messenger too, so the AI agent replies to it.

**5. Save the rule**

It appears in the list switched on, with one chip per account it listens on.

## Re-authorize your Page once

Facebook Pages connected to Ciarem before comment automations existed need extra Facebook permissions. Ciarem shows admins a banner at the top of every page: "New for *your Page's name*: automatically message people on Messenger when they comment on your posts." Re-authorizing is optional: if you skip it, everything else keeps working, and you can close the banner with **×**. Saving a rule on such a Page shows **Re-authorize your Facebook Page** too.

1. Click **Reconnect** in the banner (or **Re-authorize on Facebook** in the rule dialog) and log in with Facebook again.
2. Grant the permissions it asks for. Keep every Page that is already connected to Ciarem **selected** in Facebook's Page list: unchecking a Page removes Ciarem's access to it and disconnects it.
3. Back in Ciarem, pick the same Page again in the Page picker. Nothing is disconnected, and the banner goes away.

Pages connected from now on already include these permissions.

## In the Inbox

A conversation opened by an automation starts with the comment itself: a card that reads **Commented on your post**, showing the post and the comment, with a link to open the post on Facebook. The message the rule sent comes next. From there it is a regular Messenger thread, and the person is created as a contact like any other Messenger chat, so your funnel stages, tags, and follow-ups apply from the first message.

If a message could not be sent (for example, Facebook rejected it), there is no conversation to show it in: the comment is skipped and nothing appears in the Inbox.

## Requirements and Meta's rules

* A **Facebook Page** connected to Ciarem through [Messenger](https://help.ciarem.ai/channels/connect-messenger.md).
* Top-level comments on the **Page's posts** trigger rules. Replies to other comments and the Page's own comments do not.
* **One private reply per comment**, and only within **7 days** of the comment. Both limits are enforced by Facebook. If the same person comments twice, they get two messages.
* Ciarem paces sends under **about 700 per hour** per Page. Comments beyond that on a post that goes viral are not answered, rather than risking the Page.
* The automated message does not open the 24-hour messaging window; only the customer's reply does. Until they answer, nothing else is sent, and the AI stays silent.
* Every automated message counts as one message toward your plan. Messenger carries no Meta messaging fees.

As on Instagram, Meta's rules are about relevance and consent: answer people who asked, with what they asked for. The [good habits](https://help.ciarem.ai/channels/instagram-comment-automations.md#good-habits) for Instagram apply here too.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.