create_automation
Create a comment-to-DM automation on the connected Instagram account (default), on the connected Facebook Page (platform 'facebook') or on the connected X account (platform 'x'): when somebody comments one of the keywords on the post (or sends it in a DM, or in an Instagram story reply, see triggers), the account DMs them dm_text once, and optionally posts one of public_replies under the comment. On Facebook the DM lands in Messenger. Before creating one, show the user the keyword(s) and the exact DM text and get a yes: the DM goes out in their name. Meta rules, the same on Instagram and Facebook: one private reply per comment, within 7 days of the comment; an automatic message only within 24 hours after the person's last DM, button tap or quick reply (a comment does not open that window); OmniSocials caps sends at 700 DMs an hour per account and platform, and an answer over the cap waits in a queue and goes out as soon as there is room (for up to about a day). For scope 'post' pass one of post_id (an OmniSocials post, scheduled or live), instagram_media_id (an Instagram post published outside OmniSocials) or facebook_post_id (a Page post published outside OmniSocials). On X the automation answers DMs only: triggers ['dm'] (the default there; X allows an automated DM only after the person wrote first), so a DM to the X account with a keyword, or any first message with match 'any', gets dm_text once per person; no post fields and no public replies. An X automation runs only while X DMs are turned on for the workspace in OmniSocials (Social Inbox, X DMs card, or the automation editor): an active create without them answers 409 x_dms_off, so tell the user where to turn them on, or create it with status 'paused'. 409 x_not_connected means the workspace has no X account. Every X answer ends with the line 'Reply STOP to stop automatic messages.', and a person who replies STOP gets no automatic DM from that X account again (the stop list belongs to the account: it holds after the automation is deleted, for later automations and in every workspace with that account). X takes at most 15 answers per 15 minutes and 450 a day per account; more wait in the queue for up to an hour. X does not give apps the messages of an encrypted X Chat conversation, so those get no answer. Follow first (follow_gate true, Instagram only): the link in dm_text goes out only to people who follow the account. On a comment the private reply is a short first message with one button; the tap makes OmniSocials ask Instagram whether the person follows: a follower gets dm_text, anybody else gets not_following_text with a button to tap again after following (a DM or story reply trigger checks at once). Texts hold 640 characters and buttons 20; leave them out for the defaults, and show the user the texts before creating it. Facebook and X have no follow status (400 follow_gate_instagram_only). Follow-up (follow_up_text, Instagram and Facebook): one more DM follow_up_delay_hours (1 to 23, default 23) after the answer, with an optional link button (follow_up_button_title + follow_up_button_url). On an Instagram comment with Follow first off, the first DM becomes a tap step with one button (follow_up_tap_text, follow_up_tap_button; defaults "Tap the button and I'll send you the link π" and "Send me the link"): the tap sends dm_text and opens Meta's window, and people who never tap get neither the link nor the follow-up, so tell the user. A DM or story reply trigger needs no tap step; on Facebook only people who answer the DM get the follow-up. It is skipped when the person said stop, a team member answered them by hand, or their last tap or message is older than about 24 hours. X has none (400 follow_up_not_supported). Show the user the follow-up text and the delay before creating it. To attach automations to a NEW post, pass comment_dm_automation on create_post instead (Instagram and Facebook).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "create_automation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A label for the automations list, e.g. 'Free guide'. | |
| match | No | word (default): the keyword stands on its own ('guide', 'Guide!' match; 'linkedin' does not match 'link'). contains: the keyword appears anywhere. any: every comment or message with text (ask the user before using it). | |
| scope | No | For the comment trigger (Instagram and Facebook; an X automation has no post): 'post' (default) = one post (pass post_id, instagram_media_id or facebook_post_id), 'next_post' = the next post the workspace publishes on this platform, 'any' = every post of the account or Page. | |
| status | No | 'paused' creates it without turning it on (default 'active'). A paused X automation saves even while X DMs are off; turn it on later with update_automation. | |
| dm_text | No | The DM sent to the person (max 1000 characters), once per person. On Facebook it lands in Messenger. On X, OmniSocials adds the line 'Reply STOP to stop automatic messages.' under it. Required on create. Confirm the text with the user before creating the automation: it goes out in the account's name. | |
| post_id | No | For scope 'post' (Instagram and Facebook): the OmniSocials post id (from list_posts) that goes to the automation's platform. A scheduled post starts listening once it is live. One automation per post and platform: a post that goes to Instagram and Facebook can have one of each. | |
| stop_at | No | Stop at this time (ISO 8601). null = no end. | |
| keywords | No | Keywords that start the automation (up to 20, matched case-insensitively), e.g. ["guide", "link"]. Required unless match is 'any'. | |
| platform | No | Where the automation runs: 'instagram' (default) = the connected Instagram account, 'facebook' = the connected Facebook Page (the DM lands in Messenger), 'x' = the connected X account (it answers DMs only; see create_automation). instagram_media_id implies 'instagram', facebook_post_id implies 'facebook'. It cannot change after create. | |
| triggers | No | What starts the automation. 'comment' (default on Instagram and Facebook) = a comment on an Instagram post or reel, or on a Facebook Page post; 'dm' = a keyword in a DM to the Instagram account, in a Messenger message to the Facebook Page, or in a DM to the X account; 'story_reply' = a keyword in a reply to an Instagram story (Instagram only: Facebook has no story replies). On X only 'dm' exists, and it is the default there. One automation can listen to several. | |
| follow_up | No | Follow-up (Instagram and Facebook): true = one more DM (follow_up_text) goes out follow_up_delay_hours after the answer. Meta allows an automatic message only within 24 hours after the person's last DM, button tap or quick reply, and a comment does not open that window: so on an Instagram comment (with Follow first off) the first DM becomes a tap step, a short message with one button (follow_up_tap_text, follow_up_tap_button), and the tap sends the DM text and opens the window; people who never tap get no link and no follow-up. A DM or story reply trigger needs no tap step. On Facebook only people who answer the DM get the follow-up. When it is due it is skipped if the person said stop, a team member answered them by hand, or their last tap or message is older than about 24 hours. false switches it off and keeps the texts. X has no follow-up: true there answers 400 follow_up_not_supported. | |
| max_sends | No | Stop after this many DMs (the automation becomes 'completed'). null = no limit. | |
| follow_gate | No | Instagram only. Follow first: true = the link (the DM text) goes out only to people who follow the account. On a comment the person first gets a short message with one button (follow_gate_text, follow_gate_button), and the public reply goes out at once as always; the tap makes OmniSocials ask Instagram whether they follow. A follower gets the DM text; anybody else gets not_following_text with its button and can tap again after following. On a DM or story reply trigger the check runs at once. When Instagram gives no answer the link goes out anyway. false switches it off and keeps the texts; the texts alone do not switch it on. Facebook and X have no follow status: true there answers 400 follow_gate_instagram_only. | |
| follow_up_text | No | Follow-up: the message (max 1000 characters, 640 with a button). Giving it switches the follow-up on unless follow_up is false. Required to switch it on when none is stored. Confirm the text with the user: it goes out in the account's name. | |
| public_replies | No | Optional public replies posted under the comment (one is picked at random per comment), e.g. ["Sent you a DM!", "Check your inbox"]. Comment trigger only (Instagram and Facebook; X has none). An empty array turns the public reply off. | |
| facebook_post_id | No | For scope 'post' on Facebook: the id of a Facebook Page post that was NOT published through OmniSocials ({page-id}_{post-id}, or the post id alone). OmniSocials reads it from Facebook to check it belongs to the connected Page. Implies platform 'facebook'. Pass only one of post_id, instagram_media_id or facebook_post_id. | |
| follow_gate_text | No | Follow first: the first message, sent with one button (max 640 characters). Default: "Tap the button and I'll send you the link π". Confirm the text with the user: it goes out in the account's name. | |
| follow_gate_button | No | Follow first: the label of the button on the first message (max 20 characters). Default: "Send me the link". | |
| follow_up_tap_text | No | Follow-up, Instagram only: the tap step's message, the first DM of a comment answer when Follow first is off (max 640 characters). Default: "Tap the button and I'll send you the link π". Confirm the text with the user. | |
| instagram_media_id | No | For scope 'post' on Instagram: the numeric Instagram media id of a post or reel that was NOT published through OmniSocials. OmniSocials reads it from Instagram to check it belongs to the connected account. Pass only one of post_id, instagram_media_id or facebook_post_id. | |
| not_following_text | No | Follow first: the answer to a tap from somebody who does not follow yet, sent with its own button (max 640 characters). Default: "Almost there! Follow us first, then tap the button again." Naming the account reads better, e.g. "Almost there! Follow @yourbrand first, then tap the button again." Confirm the text with the user: it goes out in the account's name. | |
| follow_up_button_url | No | Follow-up: the web address of that button (https:// or http://, max 2000 characters). Pass it together with follow_up_button_title; null (either one) removes the button. | |
| follow_up_tap_button | No | Follow-up, Instagram only: the tap step's button label (max 20 characters). Default: "Send me the link". | |
| not_following_button | No | Follow first: the label of the button on that answer (max 20 characters). Default: "I follow now". | |
| follow_up_delay_hours | No | Follow-up: hours after the answer went out, 1 to 23 (default 23, the end of Meta's 24-hour window). | |
| follow_up_button_title | No | Follow-up: the label of an optional link button under the follow-up (max 20 characters). Pass it together with follow_up_button_url; null (either one) removes the button. |