update_automation
Change a comment-to-DM automation: pause or resume it (status), new keywords or match, a new DM text or public replies, new limits, or move it to another post (post_id, instagram_media_id or facebook_post_id). Only the fields you pass change. The platform cannot change: to move to another channel (Instagram, the Facebook Page or X), create a new automation. Turning an X automation on (status 'active') needs X DMs on for the workspace, else 409 x_dms_off. A 'completed' automation starts again when its limits or trigger change.
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' stops it without deleting it; 'active' resumes it (on X only while X DMs are on for the workspace). | |
| 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. | |
| max_sends | No | Stop after this many DMs (the automation becomes 'completed'). null = no limit. | |
| automation_id | Yes | The automation id (from list_automations). | |
| 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. | |
| 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. |