f81ca70ea6b9
latestOpenAPI 3.1.02026-08-105471692.1 MBCreate comment-to-DM automation
Create a keyword-triggered DM automation on an Instagram or Facebook account. When someone comments a matching keyword (or, with trigger: story_reply, replies to your Instagram story with one), they automatically receive a DM.
Triggers (trigger):
- comment (default): fires on keyword comments on a post or reel.
- story_reply: fires when someone replies to your Instagram story with a keyword, and answers them with a DM. Set platformPostId to a story media id to scope to one story, or omit it to match replies to any story.
Targeting (comment trigger):
- Per-post: set platformPostId to scope to one specific post (only one active per-post automation is allowed per post).
- Account-wide ("any post"): omit platformPostId (and postId). The automation evaluates every comment on every post on the account. You can stack unlimited account-wide automations, each with its own keyword set, and they all run independently. Per-post automations take priority on their post.
Audience (audience, Instagram only): restrict the automation to followers or non-followers, and/or to accounts above a follower count. Instagram only reveals the follow relationship for people who have messaged the account, so audience.whenUnknown decides what happens for everyone else - including verify, which sends a one-tap confirmation DM (followGate) and then delivers the real DM automatically. People we already know follow you skip the tap entirely.
Set alsoMatchInDms: true on a comment automation to also answer people who send a keyword as a direct message instead of commenting it. One automation then covers both doors, and each door is deduplicated separately (someone who already got the DM from their comment still gets it if they later DM the keyword). Requires at least one keyword.
Links in the DM's buttons can be click-tracked (linkTracking, on by default) and clickers optionally tagged (clickTag) for segmentation. Stats returned include delivered, read, and link clicks.
Request body
Response
Automation created