Automations
Someone comments a keyword, they get your DM with a link button, and a public reply if you want one. Each person is answered once per automation.
Create an automation
curl -X POST https://api.72-62-237-85.sslip.io/v1/automations \
-H "Authorization: Bearer $FIFTYEIGHT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": "ACCOUNT_ID",
"name": "Free guide",
"keywords": ["guide"],
"dm_message": "Hey {{first_name}}! Here is the guide.",
"button_title": "Get the guide",
"button_url": "https://example.com/guide",
"public_replies": [
"Sent you a DM, {{first_name}}!",
"Check your DMs, {{first_name}}",
"It's on its way to your inbox"
]
}'fiftyeight automations create --account ACCOUNT_ID --name "Free guide" -k guide \
--dm "Hey {{first_name}}! Here is the guide." --button "Get the guide=https://example.com/guide" \
--reply "Sent you a DM, {{first_name}}!" --reply "Check your DMs, {{first_name}}" \
--reply "It's on its way to your inbox"| Field | What it does |
|---|---|
keywords | Words that trigger it. Empty: every comment. match_mode word (default) or contains. |
platform_post_id | Limit to one post (the platform's id). Omit for every post of the account. |
dm_message | The message the person receives in DM, written by you. Instagram and Facebook only, 640 characters. |
button_title / button_url | Optional link button in the DM (title up to 20 characters). |
public_replies | Up to 3 different replies under the comment, 1,000 characters each. One is picked at random for each comment. Required on TikTok, YouTube, LinkedIn and Threads. |
public_reply | A single reply under the comment: the same as public_replies with one entry. Responses return both, public_reply being the first reply. |
trigger | comment (default), story (Instagram story replies, Creator plan and up), live (Instagram lives, Pro and up). |
Write two or three replies and each comment gets one of them at random, so the replies under your post don't all look the same. Blank and repeated replies are left out. To change them, send the full list again with PATCH /v1/automations/{id}; an empty list removes the public reply. The DM stays one message: the one you wrote in dm_message. Imported automations, which run in another tool, post a single reply.
{{first_name}}, {{name}} and {{username}} are filled from the commenter, in the DM and in whichever reply is picked. Turn an automation on and off with PATCH /v1/automations/{id} and {"enabled": false}; see what it did with GET /v1/automations/{id}/events.
Conversation steps
On Instagram and Facebook, the DM can be the end of a short conversation instead of the first message. Each step is optional; they always run in this order, and the last message is your dm_message with its link button.
curl -X POST https://api.72-62-237-85.sslip.io/v1/automations \
-H "Authorization: Bearer $FIFTYEIGHT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"account_id": "ACCOUNT_ID",
"name": "Free guide",
"keywords": ["guide"],
"opening_dm": { "message": "Hey {{first_name}}! Want the guide?", "button_title": "Send me the link" },
"follow_gate": { "message": "Follow us first, then tap below.", "button_title": "I’m following" },
"email_capture": { "message": "Where should I send it? Reply with your email." },
"dm_message": "Here it is, {{first_name}}!",
"button_title": "Get the guide",
"button_url": "https://example.com/guide",
"follow_up": { "message": "Did you get a chance to look at the guide?", "delay_hours": 4 },
"public_replies": ["Sent you a DM, {{first_name}}!"]
}'fiftyeight automations create --account ACCOUNT_ID --name "Free guide" -k guide \
--opening "Hey {{first_name}}! Want the guide?" --ask-follow --ask-email \
--dm "Here it is, {{first_name}}!" --button "Get the guide=https://example.com/guide" \
--follow-up "Did you get a chance to look at the guide?" --follow-up-hours 4| Step | What happens |
|---|---|
opening_dm | Two-step DM. The first DM goes out with a button (default "Send me the link"). When the person taps it, or answers with any message, the next step starts. |
follow_gate | Instagram only, needs opening_dm. After the tap we check whether the person follows the account. If not, they are asked to, with a button (default "I'm following") that checks again, up to 3 times. The link comes only once they follow. |
email_capture | Asks for their email address. The reply is checked (an address must be in it); if not, invalid_message asks again, up to 3 times. The address is kept for this automation, then the link is sent. On Facebook, needs opening_dm. |
follow_up | If the link wasn't opened after delay_hours (1 to 23, default 4), one more DM with the same link. Needs a link button, link tracking and opening_dm or email_capture (opening_dm on Facebook). |
- Every text, button titles included, takes
{{first_name}},{{name}}and{{username}}. Button titles are 20 characters at most, messages 640. - Instagram only tells whether someone follows you once they have messaged your account, which is why the follow check comes after the first tap. When the answer isn't available, the person is not treated as a non-follower: they get the link.
- Instagram and Facebook let an automation message someone only within 24 hours of their last message. Replies to a tap or an email are always inside that window; a follow-up whose time falls outside it is skipped, and shows as such in the history. That is also why a follow-up needs a step the person answers first.
- Each person goes through an automation once. A step that gets no answer for 7 days is closed. Taps and replies are handled once, even when they arrive twice.
- Pausing an automation stops new comments and follow-ups; people already in a conversation still get the next step when they answer.
Click tracking
With link_tracking (on by default), the link button points to a short link on https://api.72-62-237-85.sslip.io/r/…, unique to each person. Opening it records one click for that person, however many times they open it, and redirects to your button_url, and only there. Link previews from apps and crawlers are not counted. Automations created before click tracking keep sending your URL as is until you turn it on with {"link_tracking": true}.
Which posts
| post_scope | Answers comments on |
|---|---|
any | Every post of the account (default). |
post | The post in platform_post_id. |
next_post | The next post published on the account after the automation is created. It binds to that post when it goes out (platform_post_id and bound_at are then set); until then it answers nothing. |
Drafts, live and paused
status is live, paused or draft. A draft is saved but answers nothing, and may be incomplete (no DM text yet, for example). Set {"status": "live"} to go live: everything is checked then, as for a new automation. enabled still works: true is live, false is paused. In the CLI, --draft on create, then fiftyeight automations enable ID.
Stats and history
Each automation comes with stats: runs (comments answered, what counts against the quota), dms_sent (every DM of every conversation), links_sent, clicks, ctr (clicks / links_sent, from 0 to 1), emails and followups_sent. GET /v1/automations/{id}/history lists what it did, newest first: comments answered or skipped, taps, follow checks, emails collected, links sent, clicks and follow-ups (fiftyeight automations history ID).
Collected emails
GET /v1/automations/{id}/emails returns the addresses collected by an automation; /emails.csv downloads them as a CSV file (email, name, username, collected_at), and fiftyeight automations emails ID --csv emails.csv does the same from the terminal.
Quotas
| Plan | Replies a month | Per video | Triggers |
|---|---|---|---|
| Solo | 100 | 10 | comments |
| Starter | 500 | 25 | comments |
| Creator | 2,000 | 50 | comments, stories |
| Pro | 7,500 | no limit | comments, stories, lives |
| Agency | 25,000 | no limit | comments, stories, lives |
- A reply is one answered comment (DM, public reply or both). Comments skipped by a limit are recorded with the reason and are not counted.
- A conversation counts as one reply: the opening DM, the follow and email questions, the DM with the link and the follow-up that come after it are not counted again.
- Past the quota, replies keep going and use credits: 1 credit per 20 DMs, taken at the 1st, 21st, 41st... paid DM. With no credits left, replies stop until a top-up. A plan is required: without an active one, nothing is answered.
GET /v1/automations/usagereturns the replies used this month, the quota, the per-video limit,paid_dmsandcredits_this_month.
Imported automations
A workspace whose accounts were linked from another tool may already run that tool's comment automations. GET /v1/automations/native lists them with their stats (runs_on: "zernio"); PATCH and DELETE /v1/automations/native/{id} pause, edit or remove them. They are not counted in the workspace's replies, and a comment one of them answers is never answered twice. New automations always run on Fifty Eight.