Create DM automation
create_automationDM a link to followers who comment keyword on the post: a published page
(page_id) or a web address the user gives (url).
These DMs speak in the user's name. Unless they already said what to write or asked you to handle it, consider asking how each message should read: their own words, or drafts you propose in their tone. Confirm the post, keyword and messages with the user before calling this.
The follower gets opening_message and its button, then link_message with the
link's button and any extra_link_buttons; with follow_gate, non-followers get
follow_request_message instead of the link. Write every message and button label
(20 characters) in the user's language: the defaults are English. Remind the user
to put the keyword in the caption.
If activation fails, the automation stays a draft and the result says why: fix that, then activate_automation; never create a second one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Or the web address the DM links to, instead of a page | |
| keyword | Yes | The word or short phrase followers comment, e.g. GUIDE. Matched in any case, anywhere in the comment, as whole words: 'Recipes please 🙌' triggers RECIPES, 'myrecipes' does not. Accents and emoji must match exactly. Saved in lowercase. Replies count, the account's own comments never do, and the longest matching keyword on a post wins. | |
| page_id | No | The published page the DM links to; or give `url` instead | |
| activate | No | Turn it on right away | |
| url_name | No | With `url`: a short name for it, shown in the user's automations | |
| account_id | Yes | From get_account | |
| follow_gate | No | Only send the link to followers of the account | |
| link_message | No | The DM that carries the link, sent once the follower taps the first button. Same language and voice as opening_message. | Here it is! |
| public_reply | No | Optional public reply under the comment, e.g. 'Sent you a DM!' | |
| opening_message | No | The first DM, sent right after the comment, with a button asking for the link. In the user's language and voice: the wording is theirs to choose. | Thanks for your comment! Want the link? |
| link_button_label | No | The button that opens the page or address. Same language. | Open the page |
| provider_media_id | No | The post (from list_instagram_posts); omit to use the next post | |
| extra_link_buttons | No | Up to 2 more buttons on the link message, after the page's button: each opens another published page of the user's site (page_id) or any web address (url), e.g. a shop or a YouTube channel. Same language as the other messages. | |
| opening_button_label | No | The first DM's button: tapping it sends link_message. Same language. | Send me the link |
| follow_request_message | No | Only used when follow_gate is true: the DM asking a non-follower to follow first. Same language as the other messages. | Follow me first, then tap the button below and I'll send it. |
| follow_request_button_label | No | Only used when follow_gate is true: the button the follower taps once they follow. Same language as the other messages. | I'm following |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||