save_instagram_dm_automation
Create or edit an Instagram DM automation destructive
Description
Create (no id) or edit (id) an automation that DMs people automatically: a comment with a keyword on one post / the next post / any post gets a private reply, or a DM / story reply / ig.me link gets an answer. Optional link buttons, public comment replies, follow gate and dry run. Once per person per post; Meta allows private replies within 7 days of the comment. It DMs real people, so confirm the text first. Free, no AI on the send path.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | rule id to edit; omit to create a new automation |
name | string | name of the automation, shown in the list |
account | string | @handle or id of the Instagram account; omit when only one is connected |
trigger | object | what starts the rule: {type, keywords, match, scope, ...}; keywords are case-insensitive |
trigger.typerequired | "comment" | "dm" | "story_reply" | "ref" | comment (keyword on a post comment), dm (keyword in a DM), story_reply, or ref (ig.me link) |
trigger.keywords | string[] | case-insensitive words/phrases; empty = any comment/story reply (DM rules need one) |
trigger.match | "contains" | "exact" | contains (keyword appears in the text) or exact (whole text must equal the keyword) |
trigger.scope | "post" | "next" | "any" | comment rules: one post (mediaId), the NEXT post you publish, or every post |
trigger.mediaId | string | the post for scope "post" (list_instagram_media gives ids) |
trigger.mediaType | "REELS" | "FEED" | scope "next": only the next reel, or only the next feed post |
trigger.ref | string | ref rules: the ref in ig.me/m/<handle>?ref=<ref> |
message | object | what the person receives: {text, buttons}; up to 3 link buttons |
message.textrequired | string | the DM they receive |
message.buttons | object[] | up to 3 link buttons |
message.buttons[].titlerequired | string | up to 20 characters |
message.buttons[].urlrequired | string | https link |
publicReplies | string[] | comment rules: public replies under the comment, rotated (e.g. "Sent! Check your DMs") |
followGate | object | send the content only to followers: they tap a button first |
followGate.enabledrequired | boolean | true = non-followers see the follow prompt before the content |
followGate.ask | string | message asking the person to follow the account |
followGate.notFollowing | string | message sent to someone who does not follow yet |
followGate.button | string | label of the button the person taps once they follow |
cooldownHours | number | DM/story/ref rules: answer one person at most once per this many hours (default 24) |
enabled | boolean | false pauses the automation without deleting it |
dryRun | boolean | log what would be sent without sending |
Example call
Every required parameter is shown, filled from the schema where it gives a value and otherwise with a placeholder naming the type. Replace the placeholders with real values. The same call works on the MCP server, the CLI and POST https://app.hermoso.ai/v1/tools/save_instagram_dm_automation.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"save_instagram_dm_automation","arguments":{}}}
CLI
hermoso call save_instagram_dm_automation --json '{}'
Credits
Credits are spent only on two things: running an AI model (image, video, voice, text, planning, post-production) and Ad Spy research. See Credits & costs.
Related tools
list_instagram_dm_automationsInstagram DM automationstest_instagram_dm_automationTest an Instagram DM automationdelete_instagram_dm_automationDelete an Instagram DM automation