Create a comment-to-DM automation
create_comment_to_dmInstagram and Facebook only: when someone comments a keyword on a post (or replies to a story), the connected account automatically sends that person one private reply with what they asked for. It is created ACTIVE and answers every matching comment from then on, so confirm with the user the accounts, the posts, the keyword and the messages first; turn it off with set_automation_active. Meta allows exactly ONE message after a comment (text plus up to 3 buttons, no media): media, a second message or asking for data need the person to reply first, which is what welcomeMessage/requireFollow are for. On Facebook only comments from personal profiles get a private reply (never ones made as a Page), so the user must test from a personal profile (on Instagram, from another account). Write it for THIS post: message says what they get and why it is worth it, each button names the thing ("Get the guide", never "Open" or "Click here") and its url is the exact page that delivers it (ask the user if you do not know it). Before creating one, read get_working_rules("comment-to-dm"): what a good one looks like, the scopes and post links.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| tags | No | Tags added to the contact, silently. | |
| scope | No | Which posts it watches: "any" = every post; "next" = the next post actually PUBLISHED (a draft or a scheduled post does not claim it); "existing" = the posts in `postIds`; "scheduled" = one unpublished Ignix post (`scheduledPostId`), answered once THAT post goes out. For a post not out yet, offer "scheduled" first (tie it to its draft, or create the draft now); only a post published outside Ignix needs "next" or "existing". Details: get_working_rules("comment-to-dm"). | |
| askKind | No | Ask for an email or a phone before delivering (lead magnet pattern). | |
| buttons | No | Link buttons on the delivered message, [{"title":"Get the guide","url":"…"}]: every URL goes here, never in `message`. Where buttons cannot render, Ignix appends them as text. | |
| message | Yes | The direct message they receive: text ONLY, never the URL (it goes in `buttons`; putting it in both shows it twice). | |
| postIds | No | Required for scope "existing": the post URLs (https://www.instagram.com/reel/ABC123/) or native ids; Ignix resolves them. Do not fetch the URL yourself (Instagram blocks it). | |
| carousel | No | A carousel instead of a message: [{title, subtitle, imageUrl, buttons:[{title,url}]}]. Not with mediaUrl. | |
| keywords | No | Words that trigger it. Empty = any comment. | |
| mediaUrl | No | Attachment sent with the delivery. | |
| mediaType | No | image | |
| accountIds | Yes | Instagram/Facebook accounts it applies to. | |
| askMessage | No | How you ask for it. | |
| sequenceId | No | Drip sequence to enrol them in. From list_sequences. | |
| varyWithAi | No | AI-worded variants of every message (same meaning, links and codes) so each person gets a different copy. Needs AI on in the plan; otherwise ignored. | |
| publicReply | No | Optional public reply to the comment ("check your DMs!"). | |
| triggerKind | No | "story" reacts to story replies: they arrive as a DM, so the 24h window is open and nothing is restricted. | comment |
| askFieldSlug | No | Contact field where it is stored. From list_custom_fields. | |
| askRetryText | No | Sent when what they typed is not valid. | |
| followButtons | No | Link buttons on the gate, e.g. [{"title":"See profile","url":"…"}]. | |
| followMessage | No | Message of the follow gate. | |
| oncePerPerson | No | Default true on comments: no second DM to the same person (repeats get accounts restricted by Meta). false only if the user asks. | |
| requireFollow | No | Instagram only: ask for a follow before delivering, again until they follow. Also opens the 24h window. | |
| idempotencyKey | No | Optional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice. | |
| welcomeButtons | No | Button labels for the welcome. Tapping one opens the window and moves on. | |
| welcomeMessage | No | Opening message with a button; it opens Meta's 24h window. Without it (or requireFollow), no media, carousel or asking for data on a comment trigger. | |
| scheduledPostId | No | Required for scope "scheduled": the Ignix id of the unpublished post (create_post `post.id` or list_posts). Its accounts must include accountIds; deleting the post deletes the automation. | |
| followReplyLabels | No | Labels that trigger the follow check, e.g. ["I already follow you"]. | |
| publicReplyVariants | No | 2-3 alternative wordings of the public reply; one is picked per comment. |