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

# Automate comments and comment-to-DM

> Reply to comments automatically, DM commenters privately, and hide or delete unwanted comments on Facebook, Instagram and TikTok.

Comment automation watches the comments under your posts and acts on them: a public reply,
a private DM to the commenter, a like, a hide, or a delete. It runs on three channels —
Facebook Pages, Instagram and TikTok — through four triggers in the flow builder:

| Trigger                   | Channel   | Fires when                           |
| ------------------------- | --------- | ------------------------------------ |
| **Facebook comments**     | Facebook  | "User comments on your Post"         |
| **Post or Reel comments** | Instagram | "User comments on your Post or Reel" |
| **Live comments**         | Instagram | "User comments on your Live"         |
| **Video comments**        | TikTok    | "User comments on your video"        |

<Note>
  On Instagram the two triggers are interchangeable today: every Instagram comment — feed,
  Reel or Live — fires automations built on *either* trigger. Pick whichever reads better;
  don't build one automation on each expecting them to split the traffic, because both
  will fire on the same comments.
</Note>

A few things are true for every comment trigger:

* **Only brand-new comments fire it.** Edited comments and deleted comments do nothing, and
  your own Page's or account's comments never trigger your own automations. Replies *under*
  a comment count as comments too — someone answering another commenter can trigger your flow.
* **Every commenter becomes a Contact.** DMLY creates (or matches) a
  [contact](/contacts/overview) for the commenter, named from their username. On Facebook and
  Instagram, comments and DMs from the same person belong to the same contact but thread
  separately in the [Inbox](/inbox/overview) — you'll see a comment thread alongside their DM
  conversation. On TikTok, a commenter and a DMer are separate contacts (TikTok's API keeps
  the two identities apart).
* **The comment thread is a real Inbox thread.** Your automated public replies appear there
  as your Page's own comments, and your team can answer manually with **Write a public
  reply…** in the composer.

<Warning>
  The trigger's **Which posts?** setting offers **All posts** and **Specific** with a post
  picker — but the **Specific** selection is not enforced today. An automation saved with
  specific posts still fires on comments on *every* post on the account. Until this changes,
  scope your automation with keywords, not posts — and be especially careful combining a
  no-keyword trigger with **Delete Comment**, which would permanently delete matching
  comments across all your posts.
</Warning>

## Reply to comments automatically

The simplest comment automation: when someone comments, post a public reply under their
comment.

<Steps>
  <Step title="Create a comment-triggered flow">
    Create a new automation on your Facebook, Instagram or TikTok channel in the
    [flow builder](/automation/flow-builder) and pick the comment trigger for that channel —
    for example **Post or Reel comments** on Instagram.
  </Step>

  <Step title="Filter with keywords (or don't)">
    On the trigger, choose how the comment text is matched:

    * **Any message (no keyword filter)** — fire on every comment
    * **Message contains a keyword**
    * **Message is an exact match**
    * **Message starts with a keyword**

    Matching is case-insensitive, so `Price`, `PRICE` and `price` all match. Leave the
    keyword list empty and the automation fires on any comment.

    The trigger also has **Only respond once per contact** — turn it on for giveaway-style
    automations where each person should only ever get one response, however many times
    they comment.
  </Step>

  <Step title="Add a Reply to Comment step">
    Comment-triggered flows get an extra palette group, **Comment actions**, with four
    steps: **Reply to Comment**, **Like Comment**, **Hide Comment** and **Delete Comment**.
    (The group only appears when the flow starts from a comment trigger — these steps need
    a comment to act on.)

    Drag in **Reply to Comment** and write the **Public reply**. It supports contact tokens —
    `{{first_name}}` and the rest — but remember a fresh commenter's name is seeded from
    their username, so `{{first_name}}` may resolve to a handle rather than a real first
    name. The default text is "Thanks for your comment! 🙌 Check your DMs." — change it if
    you're not also sending a DM.

    If the reply is empty, the builder flags the step with an amber "Public reply text is
    empty." warning. Heed it — the flow will still publish, and the empty reply only fails
    when it runs.
  </Step>

  <Step title="Publish and test">
    [Publish the flow](/automation/publishing-bots), then comment on one of your posts
    **from a different account** — your own Page's comments never trigger it. The public
    reply appears under the comment, and in the Inbox the comment thread shows the reply as
    your own comment.
  </Step>
</Steps>

## Comment-to-DM

The classic pattern: "Comment WANT and I'll DM you the link." This works on **Facebook and
Instagram** — a comment lets you open a DM with someone who has never messaged you.

<Steps>
  <Step title="Start from a comment trigger with a keyword">
    Same as above: a **Facebook comments** or **Post or Reel comments** trigger, matching
    mode **Message contains a keyword** (or **exact match** for a cleaner giveaway), keyword
    `WANT` or whatever you announce in the caption.
  </Step>

  <Step title="Optionally reply in public first">
    Add **Reply to Comment** with something like "Check your DMs!". It isn't required for
    the DM to work, but it tells everyone else scrolling the comments that the mechanic is
    real — which is half the point of the pattern.
  </Step>

  <Step title="Add the Send Message step">
    Add a **Send Message** step with the link or content you promised. In a comment-triggered
    flow, the **first text message** of the run is delivered as a *private reply* to the
    comment — a special Meta mechanism that opens the DM thread even though the commenter
    has never messaged you, outside the normal 24-hour messaging window.
  </Step>

  <Step title="Publish">
    [Publish](/automation/publishing-bots), announce the keyword in your post caption, and
    watch the comment thread and DM land per commenter in the Inbox.
  </Step>
</Steps>

The private reply has hard limits worth designing around:

* **One per comment.** Only the first message of the run uses it. Each new comment is
  processed exactly once, so there is no way to get a second private reply out of the same
  comment.
* **Text only.** The private reply carries plain text — no images, cards or buttons. If the
  first message step in your flow is an image or a card, it skips the private-reply
  mechanism entirely and is sent as a normal DM instead, which may not reach a commenter
  who has never messaged you. **Make the first message a text message** containing what
  matters (the link), and put media after it.
* **Later messages are ordinary DMs.** A comment opens a 24-hour messaging window, so
  follow-up steps in the same flow are attempted normally — but their delivery is decided
  by Meta at send time, and a rejection shows up in [Logs](/troubleshooting/logs). Front-load
  the message that matters.

<Accordion title="Comment-to-DM on TikTok">
  Not possible. TikTok has no comment-to-DM mechanism: a **Send a DM** step in a
  **Video comments** flow can only deliver to someone who already has an open DM
  conversation with you (within TikTok's 48-hour window) — for a pure commenter it fails.
  TikTok also keeps commenters and DMers as separate contacts, so there is no thread to
  open.

  What works instead: put the payoff in the **Reply to Comment** step. The public reply is
  the only reliable way to answer a TikTok commenter, so use it to point people at your
  bio link or ask them to message you first.
</Accordion>

## Moderate comments automatically

Keyword-triggered hide and delete keeps spam and abuse off your posts without a human
watching the comments.

<Steps>
  <Step title="Trigger on the words you want gone">
    Create a comment-triggered flow with **Message contains a keyword** and list the terms
    you moderate — competitor links, slurs, crypto spam phrases. Keep the list specific:
    matching is a substring check, so a short keyword like `win` also matches "winter".
  </Step>

  <Step title="Choose Hide or Delete">
    They are genuinely different:

    * **Hide Comment** — "Hides the comment from everyone except its author." The commenter
      still sees their own comment and doesn't know it was hidden; everyone else stops
      seeing it. Good for spam and negativity, because it doesn't provoke a reaction.
      Facebook and Instagram only — on TikTok this step is skipped with a note in the
      thread ("Hiding comments isn't supported on TikTok — skipped."), because TikTok has
      no hide.
    * **Delete Comment** — "Permanently deletes the comment. Use sparingly — this can't be
      undone." Works on all three platforms. The commenter can see it's gone.

    There is no un-hide, un-like or restore step in a flow — hide is reversed manually on
    the platform, delete not at all.
  </Step>

  <Step title="Publish and watch the thread">
    Each moderated comment leaves a quiet system note in its Inbox comment thread — "Hid
    the comment" or "Deleted the comment" — so your team can see what the automation did
    and to whom.
  </Step>
</Steps>

## Message the commenter after moderating

You can chain moderation with a DM — hide or delete the comment, *then* privately tell the
person why: "We removed your comment because it broke our rules; here's how to reach us."

This works on Facebook and Instagram, because every comment step lets the flow continue —
a hide or delete (even a failed one) never stops the run, and the private-reply DM still
targets the original comment. Order matters, though:

* **Hide, then Send Message** — the safe chain. The comment still exists (hidden), so the
  private reply lands normally.
* **Delete, then Send Message** — risky. A private reply to a comment that no longer exists
  isn't something DMLY guards against, and Meta may reject it. If you want to delete *and*
  notify, put the **Send Message** step **before** the **Delete Comment** step: the DM is
  delivered first, then the comment is removed. Nothing in the builder enforces this
  ordering — it's on you.

On TikTok the notify half isn't possible at all (no comment-to-DM, see above): you can
delete the comment, but you cannot message the commenter about it.

## What works where

|                                         | Facebook              | Instagram                                    | TikTok                 |
| --------------------------------------- | --------------------- | -------------------------------------------- | ---------------------- |
| Trigger                                 | **Facebook comments** | **Post or Reel comments**, **Live comments** | **Video comments**     |
| **Reply to Comment** (public)           | Yes                   | Yes                                          | Yes                    |
| **Like Comment**                        | Yes                   | Yes                                          | Yes                    |
| DM the commenter (private reply)        | Yes                   | Yes                                          | No                     |
| **Hide Comment**                        | Yes                   | Yes                                          | No — step is skipped   |
| **Delete Comment**                      | Yes                   | Yes                                          | Yes                    |
| Commenter and DMer are the same contact | Yes                   | Yes                                          | No — separate contacts |

<Accordion title="Comment automations in the quick builder">
  The quick builder has the same triggers and equivalent actions — **Reply to comment**,
  **Send a DM**, **Like the comment**, **Hide the comment**, **Delete the comment** — with
  one difference in keyword matching: a flat comma-separated list, always
  contains-matching, no match-mode choice ("Comma-separated. Leave empty to trigger on any
  comment."). The DM action uses the same one-private-reply-per-comment mechanism.

  If both a published flow and a quick automation match the same comment, **the flow wins**
  and the quick automation does not fire. The quick builder also shows **Conditions** such
  as **Comment / message text** and **First-time contact** — these are saved but not
  applied while the automation runs as a quick automation; they only take effect after you
  convert it with **Edit in Flow Builder**. Prefer the flow builder for anything beyond a
  single canned reply.
</Accordion>

## Troubleshooting

<Accordion title="A comment step failed">
  A failed reply, like, hide or delete does two things: it writes a system note in the
  comment thread ("... failed — see Logs.") and records an error row in
  [Logs](/troubleshooting/logs) under the **Errors** status, with the comment id and the
  error Meta or TikTok returned. The flow itself keeps going — a failed comment action
  never cancels the rest of the run, so a failed hide doesn't stop the DM step after it.
</Accordion>

<Accordion title="The automation never fires">
  The usual suspects, in order of likelihood:

  * You tested with **your own account** — the Page's or business account's own comments
    are always ignored.
  * You **edited** an existing comment — only brand-new comments fire the trigger.
  * The bot is **paused for that contact** (a teammate took over the conversation).
  * **Only respond once per contact** is on and that person already triggered it once.
  * A previous run for that contact is **still active** on the same automation — a repeat
    comment during an active run is suppressed.
  * You expected **Specific posts** to include the post — post targeting is not enforced;
    check the keywords instead.

  The full checklist is at
  [Automation not triggering](/troubleshooting/automation-not-triggering).
</Accordion>

<Accordion title="The public reply worked but the DM never arrived">
  Check the first message step in the flow: if it's an image or a card, the private-reply
  mechanism is skipped and the send goes out as a normal DM, which can fail for someone
  who has never messaged you. Make the first step a plain text message. If it *is* text,
  look for a send failure in [Logs](/troubleshooting/logs) → **Errors**. And on TikTok,
  the DM step cannot reach a commenter at all — see the table above.
</Accordion>

<Columns cols={2}>
  <Card title="Triggers" icon="bolt" href="/automation/triggers">
    Every trigger, including the four comment triggers.
  </Card>

  <Card title="Flow builder" icon="diagram-project" href="/automation/flow-builder">
    The canvas, nodes and ports in full.
  </Card>

  <Card title="Publishing bots" icon="rocket" href="/automation/publishing-bots">
    Drafts, versions and the activation checks.
  </Card>

  <Card title="Logs" icon="list-check" href="/troubleshooting/logs">
    Where every send and comment action is recorded.
  </Card>
</Columns>
