rizamodocs

Comment automations

Everyone who comments a keyword, such as GUIDE, gets your link by private message.

A comment automation watches an Instagram account's or Facebook Page's comments, on one post, the next one or every post, and answers each one with a keyword by private message: your text, with your links behind buttons. Optionally it posts a public reply under the comment, and on Instagram it can ask the person to follow first.

Make one from your agent (MCP), the API (scope automations:write) or the web app (Automations). TikTok accounts are refused, as TikTok gives no private messages in the EEA, Switzerland or the UK (TikTok).

From an agent

Ask Claude, ChatGPT or another agent connected to Rizamo:

Prompt
On my latest Instagram reel, anyone who comments GUIDE gets
https://example.com/guide by DM. Ask them to follow first.
Reply publicly "Sent, check your DMs". Show me the message and
test it with a sample comment before you turn it on.

The agent finds the reel (list_network_posts), creates the automation paused (create_comment_automation), shows you what a sample comment would get (test_comment_automation), and turns it on (update_comment_automation) after your yes. list_comment_automation_runs then shows each comment and what it got.

From the API

curl https://api.rizamo.com/v1/comment-automations \
  -H "Authorization: Bearer $RIZAMO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "accountId": "acc_...",
    "networkPostId": "npost_...",
    "name": "Guide on the October reel",
    "keywords": ["guide"],
    "message": {
      "text": "Here is the guide. Enjoy!",
      "link": "https://example.com/guide",
      "button": "Get the guide"
    },
    "publicReplies": ["Sent it to your DMs!", "Check your messages"],
    "status": "paused"
  }'
  • Which comments: networkPostId for one post on the network (from GET /v1/network-posts), postId for a Rizamo post, which can still be scheduled (the automation starts once it is live), or neither for every post of the account, new ones too. nextPost: true waits for the next post on the account, published from anywhere, and then stays on it.
  • Keywords: any of them triggers it. match is word (the default, a whole word or phrase), contains (anywhere, even inside a longer word) or exact (the whole comment), always in any case and with or without accents. A comment with a word from exclude never triggers it. No keywords: every comment.
  • The message: with a link, up to 640 characters of text above a button; without one, up to 1,000 bytes. Every web address becomes a Rizamo short link that counts clicks, with UTM tags (utm) unless you set it to null.
  • More buttons and texts: moreButtons adds up to 2 link buttons, each with its own title, link and clicks. moreTexts adds up to 4 other ways to say the same: each person gets one, at random.
  • Their username: {{username}} in the message, the follow gate or a public reply becomes the commenter's Instagram username, or their name on Facebook. @{{username}} mentions them.
  • Recent comments too (answerRecent, off by default): matching comments from the last 7 days that no automation answered, at most the newest 500, sent slowly so new comments go first. Pass it when you create an automation or resume one.
  • Direct messages too (directMessages, off by default): someone who messages the account a keyword gets the same message there, once. It needs at least one keyword.
  • Once per person (oncePerPerson, on by default): someone who comments again gets nothing more.
  • Public replies: up to 5. After the private reply goes out, one is posted under the comment, picked at random, so they do not all read the same.
  • markDone: closes the comment's thread in the inbox once the private reply went out.

Create a comment automation lists every field.

Story mentions

messagesOnly: true answers direct messages with a keyword, and no comments: for "send us PRICES" in a bio or a story. It takes no post or public replies.

On Instagram, storyMentions: true answers people who mention the account in a story instead of comments: each gets the message by DM, once a day at most. It takes no keywords, post or public replies. Instagram tells about stories from public accounts, and from private ones the account follows.

Ask them to tap first

tapFirst sends a short text with a button and no link instead of the message. When they tap it, or write back, the message with its links goes out. It works on Instagram and Facebook, and not together with a follow gate, which asks first already.

"tapFirst": {
  "text": "{{username}}, your guide is ready",
  "button": "Send it to me"
}

Someone who sent a direct message gets the message at once. A run that waits for a tap has tapFirst: "asked", and expires after 7 days.

linkReminder sends one more message, once, to people who got the link and did not open it: your text, above the message's first link again, hours after (3 unless set, up to 20).

"linkReminder": { "text": "Did you see the guide? Here it is again.", "hours": 3 }

Networks take one message until the person answers, so it needs tapFirst, followGate, directMessages or storyMentions. Nobody who wrote back gets it. To know, each person's link ends in a code of their own, and Rizamo notes only whether it was opened.

The follow gate

On Instagram, followGate sends an ask instead of the message: follow the account, then tap the button (or reply). When they reply, Rizamo checks they follow and sends the message, or the reminder once. Facebook does not say who follows a Page, so the gate is Instagram's only.

"followGate": {
  "ask": "Follow us, then tap below to get the guide",
  "reminder": "Almost there: follow us, then tap below",
  "button": "I'm following"
}

Test it

Before you turn it on, see what a comment would get. Nothing is sent or recorded:

curl https://api.rizamo.com/v1/comment-automations/cauto_.../test \
  -H "Authorization: Bearer $RIZAMO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "text": "GUIDE please" }'

The answer says whether it matches and the messages it would send, with their Rizamo links. Then turn it on with PATCH /v1/comment-automations/cauto_... and { "status": "active" }.

Meta's rules

  • One private reply per comment, within 7 days of it. A comment that already got one, from Rizamo or any other tool, is skipped.
  • After that, 24 hours. Once the person replies, the account can message them for 24 hours after their last message. That is how the follow gate sends the link after the ask, and how a direct message with a keyword is answered.
  • Comments from others. The account's own comments do not count. On Instagram, a keyword in a reply under another comment counts too: that person gets the private message once, with no public reply. On Facebook, replies do not count.
  • From when it starts. Comments made before an automation starts, or while it is paused, are answered only with answerRecent.

Runs and numbers

Each matched comment, direct message or story mention is a run, with its trigger (comment, message or story_mention) (GET /v1/comment-automations/{id}/runs, list_comment_automation_runs): pending (going out within minutes), waiting (at the follow gate), sent, or skipped, failed and expired with a reason. An automation's stats count them, with link clicks and the follow gate's conversions.

Rizamo reads comments every few minutes, so messages go out within minutes. If Meta refuses a permission or a link of the message stops working, Rizamo pauses the automation, emails the team's owners and says why in pausedReason: fix it, then set status to active. Owners also get an email when most of an automation's messages failed in a day.

Webhooks and events tell your code as it happens: comment_automation.sent, comment_automation.failed and comment_automation.paused (Webhooks).

Limits

Each account sends up to 1,000 private messages in 24 hours through its automations, and 10 a minute: private replies, reminders and links together. More wait for room, within Meta's 7 days. Automations are on every plan, the free one included, and are never billed per person messaged.

On this page