save_dm_automation
Create or edit a DM or comment automation destructive
Description
Create (no id) or edit (id) an AUTO-DM / AUTO-REPLY automation: "when someone comments GUIDE on my posts, DM them my guide link", "reply to anyone who DMs PRICE with our pricing page", "reply to people who mention us on X". PAUSE one with {id, enabled:false}; PRACTICE MODE (dryRun:true) logs what it would send and sends nothing. Instagram/Facebook: a keyword comment (one post, the next post, any post; on Facebook also ads) gets a private reply in DMs/Messenger, a DM keyword or ig.me/m.me ref link gets a message, with optional link buttons and rotated public replies. X: a keyword @mention or a reply under your post gets a public reply, a DM keyword gets a DM (X allows an automated DM only after the person DMed you). TikTok, Threads, YouTube and LinkedIn company Pages: a keyword comment on your own posts gets a PUBLIC REPLY under that comment and nothing else; those platforms give an app no way to DM a commenter, so a DM, buttons, a follow gate and publicReplies are refused there, and comments are checked every 10 to 30 minutes instead of pushed. Once per person per post; a DM saying STOP opts that person out. Every channel except X is free; X is billed in credits for every mention, reply or DM X delivers to the account plus each reply or DM sent, and running out stops the X rules. It messages real people, so confirm the text first.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | rule id to edit; omit to create a new automation |
channel | "instagram" | "facebook" | "x" | "tiktok" | "threads" | "youtube" | "linkedin" | instagram (default), facebook (a Facebook Page: comments on its posts and ads, plus Messenger), x, or one of the four PUBLIC-REPLY channels: TikTok, Threads, YouTube or LinkedIn (a company Page) |
name | string | name of the automation, shown in the list |
account | string | the account on that channel: @handle (Instagram, X, Threads, YouTube), Page name/id (Facebook, LinkedIn); omit when only one is connected |
trigger | object | what starts the rule: {type, keywords, match, scope, mediaId, ...}; keywords are case-insensitive |
trigger.typerequired | "comment" | "dm" | "story_reply" | "ref" | "mention" | "live_comment" | comment (every channel; on X a reply under your post; the ONLY trigger on TikTok, Threads, YouTube and LinkedIn), dm (Instagram, Facebook, X), story_reply (Instagram), ref (ig.me/m.me link: Instagram, Facebook), mention (X), live_comment (Instagram: a keyword comment on your LIVE, answered by DM while the Live is on; needs a keyword) |
trigger.keywords | string[] | case-insensitive words/phrases; empty = any comment (DM and mention 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 | Instagram media id, Facebook post id (an ad: its effective_object_story_id), X post id, TikTok post id, Threads post id, YouTube video id or link, or LinkedIn post URN (urn:li:share:… / urn:li:ugcPost:…) |
trigger.mediaType | "REELS" | "FEED" | Instagram scope "next" only |
trigger.ref | string | ig.me/m/<handle>?ref=<ref> or m.me/<page>?ref=<ref> |
message | object | what the person receives: {text, buttons}; on X the text is the public reply, up to 280 characters |
message.textrequired | string | what they receive; on X the public reply (280) or, for a dm rule, the DM; on tiktok (1,200), threads (500), youtube and linkedin (1,000) the public reply under their comment |
message.buttons | object[] | up to 3 link buttons (Instagram, Facebook; X has none) |
message.buttons[].titlerequired | string | up to 20 characters |
message.buttons[].urlrequired | string | https link |
publicReplies | string[] | Instagram/Facebook comment rules: public replies under the comment, rotated |
followGate | object | Instagram only: followers get the content after tapping a button |
followGate.enabledrequired | boolean | true = non-followers see the follow prompt before the content (Instagram only) |
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/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_dm_automation.
MCP (tools/call)
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"save_dm_automation","arguments":{}}}
CLI
hermoso call save_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_dm_automationsDM automationstest_dm_automationTest a DM automationdelete_dm_automationDelete a DM automation