Create a comment-to-DM automation (draft)
create_comment_to_dmThe most common automation: when someone comments on a post, DM them. Creates a draft; nothing goes out until enable_automation. How Meta works: a DM cannot be started by the account. The only automatic door is a private reply to a comment, one per comment, within 7 days of the comment, and once the person answers the 24-hour window opens for the rest. Instagram can check whether the person follows the account (requireFollow); Facebook cannot, so requireFollow is rejected there. Threads has no DMs at all; use create_automation with comment_public_reply. Files go through media_presign first and are passed as deliver.mediaId. post can be our post id, the post's own id on the platform, a link to the post, "any" for every post, or "next" for the next post you publish (or pass automation on publish to do both in one call). Only one enabled automation per account can wait for "next" (409 next_post_taken). Order when everything is on: opening DM (message + button) -> askEmail -> requireFollow -> deliver (text, up to three link buttons, file; clicks are tracked) -> followUp if no link was clicked. openingDm:false sends deliver as the private reply itself; then requireFollow, askEmail, followUp and files are rejected because the window never opens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| post | Yes | Our post id, the platform post id, a link to the post, "any", or "next". | |
| match | No | ||
| deliver | Yes | What to send after the tap: text, up to three link buttons, and/or a media id. | |
| enabled | No | Default false. Prefer leaving it off and calling enable_automation after the person confirms. | |
| message | No | The opening DM (private reply). One message. Required unless openingDm is false. | |
| askEmail | No | Ask for their email after the tap and store it in contact field `email`. Three tries, then continue without. | |
| followUp | No | Sent followUpAfterMinutes later if none of deliver.links was clicked. Needs openingDm and at least one link. | |
| keywords | No | Trigger words in the comment. Empty means every comment. | |
| accountId | Yes | Connected Instagram or Facebook account id from list_accounts. | |
| openingDm | No | Default true. false: deliver goes out as the private reply itself (no button, no window afterwards). | |
| emailRetry | No | ||
| buttonTitle | No | Button under the opening DM, at most 20 characters. | |
| publicReply | No | Optional public replies under the comment; one is picked at random. | |
| workspaceId | No | Which workspace this is for. Only needed when the account has more than one — the error tells you the ids when it matters. Leave it out if it is already decided; do not ask the person again. | |
| emailMessage | No | ||
| recheckTitle | No | ||
| requireFollow | No | Instagram only. Deliver only to followers; others are asked to follow and check again. | |
| notFollowingMessage | No | ||
| followUpAfterMinutes | No | 1 to 1380 (23 hours). Default 60. |