create_comment_trigger
Set up comment triggers that match keywords on Instagram or Facebook posts, stories, or Live, then send public replies and/or DMs. Save incomplete triggers as paused drafts before they go live.
Instructions
Create a comment trigger. Creates a trigger. It goes live at once unless the plan's live-trigger cap is reached, in which case it is saved paused and created_paused is true (never refused). Buttons are optional, up to three. A reply button is still worth adding: its tap opens the conversation so follow-ups can be sent. Story and Live triggers are Instagram only and never post-scoped. Send draft: true to save an incomplete trigger paused, skipping the template and button requirements. It goes live at once and starts DMing real commenters. Confirm with the user first, or send draft: true to save it paused. A paused trigger stays paused through edits until you send active: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| draft | No | Save incomplete, paused. Skips the template and button requirements. | |
| tag_id | No | Tag applied to the commenter when the trigger fires. Pro plans and above; silently ignored below. | |
| buttons | No | Buttons under the DM. Optional, three at most. | |
| post_id | No | Scope to one post (an id from GET /recent-posts). Null means every post. Ignored for story and live. | |
| keywords | Yes | Any one of these matches. | |
| platform | No | both | |
| post_url | No | Label only; post_id is what scopes the trigger. | |
| dm_use_ai | No | Let the AI write the DM from dm_ai_goal, the knowledge base and the configured tone. Needs dm_ai_goal. | |
| dm_ai_goal | No | What the AI-written DM should achieve. | |
| match_type | No | exact = whole word; contains = anywhere in the text; fuzzy = tolerates a typo or two. | contains |
| dm_file_url | No | https PDF attached to the DM. | |
| source_type | No | comment = post and Reel comments; story = replies to your stories; both = either; live = comments during an Instagram Live. story and live are Instagram only. | comment |
| dm_image_url | No | https image attached to the DM. | |
| dm_templates | No | Up to five DM variations. Required when the mode includes a DM unless dm_use_ai is true. | |
| response_mode | No | both = public reply and DM; public_only; dm_only. | both |
| public_replies | No | Up to five variations, one is picked per fire. {name} is the commenter. Required when the mode includes a public reply. | |
| exclude_keywords | No | If any of these appear the trigger does not fire. | |
| hide_comment_after_dm | No | Hide the comment once the DM is sent (post comments only). |