create_automation
Create a DM/comment automation. It is created PAUSED; activate it with update_automation(status="active", user_confirmed=true) after the user approves.
Nothing is sent while it is paused. Read it back with get_automation, show the user the exact DM/reply text and which posts it covers, and activate it only once they have said yes. Activation re-runs the plan and conflict checks, so a conflict with another active automation is reported then.
trigger_type: "comment" (fires on comments), "live_comment" (keyword comments made during one of the account's Instagram Lives), "dm" (keyword-matched incoming DMs), "story_reply" (replies to a story), "reel_share" (someone sends a Reel into the account's DMs — see below), or "ai_dm" (every inbound DM gets a Gemini-generated reply from ai_goal/ ai_context — no post/keyword targeting applies to this type, post_target/ post_ids/keywords are ignored).
"reel_share" answers a Reel that someone shares into the account's DMs — the "share this reel to me and I'll send you the guide" mechanic. A shared Reel carries no text, so keywords are ignored. post_target must be "specific" with post_ids holding the Reels' Instagram media ids; "all" and "attach_later" are refused. Each person is answered once per Reel and automation, and the reply is an ordinary DM with the same buttons and follow gate as a keyword DM. A paid-plan feature. Tell the user it only fires for Reels sent as a DM, not for a Reel shared to a Story or a link pasted as text.
Recipients are told they are talking to an AI: the first AI reply in each DM thread carries an automatic AI-assistant notice, sent once per thread as its own message. It cannot be turned off; preview_ai_dm shows it. Inbound DM text is sent to Google Gemini to generate the reply (see reeldrop.io/privacy).
"live_comment" covers every Live the account runs, so post_target/post_ids are ignored; keywords work as for "comment". It sends the private DM only while the Live is running (Instagram refuses a private reply to a Live comment once the broadcast ends), each person is answered once per Live, and it has no public reply or follow-up. Tell the user that, since a Live cannot be tested after the fact. A paid-plan feature.
post_target is required — ask the user, never pick it for them. It says which content this applies to:
"all": every reel (feed posts/carousels too, Creator plan only — Free is reel-only for comment automations) for trigger_type "comment", or every story for "story_reply" ("reel_share" does not accept it; use "specific"). Never choose this on the user's behalf: use it only after they have explicitly asked for every reel or story to be covered. For trigger_type "ai_dm", "live_comment" and "ice_breaker", where targeting does not apply, pass "all" — it has no effect there.
"specific": post_ids required — Instagram media ids, not this tool's own post_id. Get them from get_reel_analytics/ list_scheduled_posts's ig_media_id field (browse and pick), or resolve_reel_by_link if the user gives you a link directly. Ask the user which reel(s) before calling this — don't guess. For a "story_reply" automation the media id is a story's: call list_live_stories to see the ones up right now. For a story that doesn't exist yet, schedule_story/publish_story's automation_id attaches it instead.
"attach_later": no post yet — pass the returned id as schedule_reel's automation_id when you schedule the reel this should apply to. It stays paused after the reel is attached, so activate it (with the user's confirmation) once the reel is scheduled.
public_reply_messages/private_dm_messages are rotated round-robin at send time; leave either empty to skip that action type. Never put a URL in private_dm_messages text — attach it with dm_link_button_url below, so the recipient gets a tappable button instead of a link they must copy. A URL left in the text is refused.
dm_link_button_url turns the DM into a tappable link-button card (Meta's button-template) instead of the URL sitting as plain text in the message — set this whenever the DM's purpose is to hand over a link; don't paste the URL into private_dm_messages as well. Requires https://, and only applies to private_dm_messages (Instagram has no button-template equivalent for public replies).
dm_link_button_label is the button's visible text. Only pass it when the user has literally told you what the button should say. Never derive it from the link — not from the URL, the domain, the page title, the file name, or the brand: leave it unset and the button reads "Click here", which the user can change any time by telling you the wording they want.
dm_buttons is the full form of the DM card's buttons — use it instead of
dm_link_button_url when the DM needs more than one link, a PDF button, or a
reveal-on-tap product carousel. Each entry is {kind, title, url?, cards?}:
kind "link" (a web link), "pdf" (a link to a PDF you first uploaded with
get_pdf_upload_url — pass that call's public_url as url), or "cards" (a
"reveal the cards" button; tapping it sends cards as a product carousel,
url ignored). At most 3 buttons; a carousel holds at most 10 cards. The
same label rule applies — never invent a title from a URL. When dm_buttons
is given, dm_link_button_url/_label are ignored.
trigger_type="ice_breaker" configures the up-to-4 tappable questions Instagram shows at the top of a brand-new DM thread. Pass them in ice_breakers; keywords/post_target are ignored. Max 4 questions, about 80 characters each. Give each question its own reply with ice_breaker_replies — a list index-aligned with ice_breakers, each entry {messages, dm_buttons} (dm_buttons has the same shape as above; text up to 640 characters). A question with no reply entry, or an empty one, sends the shared private_dm_messages reply instead, so pass private_dm_messages too unless every question has its own reply. Tell the user the three conditions the API cannot check or report on: the buttons render only in the Instagram MOBILE app, only in a thread with no previous messages, and only if the account owner has turned on Settings → Messages and story replies → Message controls → Connected Tools → "Allow access to messages". A successful create means Meta accepted the questions, not that anyone can see them — read ice_breakers_sync_error on the result to check the push itself.
follow_up_enabled/follow_up_delay_seconds/follow_up_message set a second DM, sent once if the person has not replied by then — a nudge, e.g. "Did the link come through?". It needs follow_up_message (an enabled follow-up with no text is never sent) and a delay of 1800–82800 seconds (30 minutes to 23 hours; Instagram refuses a DM more than 24 hours after the person last interacted, so nothing longer can work). It is armed when the first DM is delivered, so it only applies to automations that send a private DM. A paid-plan feature: the reply names the plan when it is not included.
Refuses if this would let two active automations race to send Instagram's one-private-reply-per-comment limit on the same post/ keyword, or (ai_dm) if another ai_dm automation is already active on this account, or (ice_breaker) if another ice_breaker automation already owns this account's questions — Instagram stores one set per account and every write replaces it. Relay the conflict message to the user rather than retrying blindly, it names which existing automation to pause first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"ig_account_id": "<ig_account_id>",
"name": "<name>",
"trigger_type": "<trigger_type>",
"post_target": "<post_target>"
},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| ai_goal | No | ||
| ai_link | No | ||
| ai_tone | No | friendly | |
| keywords | No | ||
| post_ids | No | ||
| ai_context | No | ||
| dm_buttons | No | ||
| post_target | Yes | ||
| ice_breakers | No | ||
| trigger_type | Yes | ||
| workspace_id | Yes | ||
| ig_account_id | Yes | ||
| keyword_match | No | contains | |
| ask_for_follow | No | ||
| ai_exit_condition | No | ||
| follow_up_enabled | No | ||
| follow_up_message | No | ||
| dm_link_button_url | No | ||
| follow_gate_message | No | Hey! Follow us first and I'll send you the link 🙌 | |
| ice_breaker_replies | No | ||
| private_dm_messages | No | ||
| dm_link_button_label | No | ||
| public_reply_messages | No | ||
| follow_up_delay_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| name | Yes | ||
| stats | No | What happened after this automation ran. `dms_failed` is a send that was tried and did not land (dead token, Meta rate limit, policy rejection) — read it next to `events_received` before concluding an automation 'works'. | |
| status | Yes | ||
| ai_goal | Yes | ||
| ai_link | Yes | ||
| ai_tone | Yes | ||
| stalled | No | ||
| dms_sent | Yes | ||
| keywords | Yes | ||
| post_ids | Yes | ||
| next_step | Yes | ||
| ai_context | Yes | ||
| dm_buttons | No | ||
| post_target | Yes | ||
| ice_breakers | Yes | ||
| trigger_type | Yes | ||
| keyword_match | Yes | ||
| ask_for_follow | Yes | ||
| ai_exit_condition | Yes | ||
| follow_up_enabled | No | ||
| follow_up_message | No | ||
| dm_link_button_url | Yes | ||
| follow_gate_message | Yes | ||
| ice_breaker_replies | No | ||
| private_dm_messages | Yes | ||
| public_replies_sent | Yes | ||
| dm_link_button_label | Yes | ||
| public_reply_messages | Yes | ||
| follow_up_delay_seconds | No | ||
| ice_breakers_sync_error | No |