Update DM automation
update_dm_automationChange a DM automation: name, trigger, steps (the whole list, as returned by list_dm_automations; keep the step ids of steps you don't change so people in the flow carry on), reentry, or pause/resume it with active. Only the fields given change. Get the id from list_dm_automations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | A name for the automation (default: from the trigger) | |
| steps | No | Steps run in order; each is one of: - {"type":"message","text":"...","button":{"title":"Get the guide","url":"https://..."}}: text up to 1000 bytes (640 characters with a button). {username} becomes their @handle on Instagram (first name on Messenger), {first_name} their first name. Optional link button (title up to 20 characters); clicks are counted. - {"type":"message","text":"Which one?","choices":[{"label":"Pricing","steps":[...]},{"label":"Demo","steps":[...]}],"otherwise":{"afterMinutes":60,"steps":[...]}}: up to 13 quick-reply choices (labels up to 20 characters), each with its own steps; otherwise = a typed answer that isn't a choice, or no answer within afterMinutes. A message has a button or choices, not both. - {"type":"wait","minutes":30}: up to 1380 (23 h). - {"type":"condition","check":"replied|keyword|clicked|follows","keywords":["yes"],"withinMinutes":60,"yes":[...],"no":[...]}: waits up to withinMinutes for a reply, a reply containing a keyword, or a click on an earlier link button; follows (Instagram only) checks at once whether they follow the account ("follow to get the link"). - {"type":"handoff","note":"Wants a quote"}: flags the conversation in the Breakreach Inbox for a person on the team and ends the flow. A message with choices, a condition and a handoff must be the last step of their list: put what comes next inside their branches. Up to 40 steps, branches 6 levels deep. Meta only allows replies within 24 hours of the person's last message: a message due later is not sent and the run ends. | |
| active | No | false pauses it (people in the flow stop) | |
| reentry | No | once (default) = a person goes through it once; always = every time they trigger it, at most once per cooldownHours | |
| trigger | No | What starts the automation. When several match a DM: ref, story, exact keyword, contains, then any_message; the oldest wins a tie | |
| workspace | No | Workspace slug (optional) | |
| automationId | Yes | Automation id from list_dm_automations | |
| cooldownHours | No | With reentry always: hours before the same person can start it again (default 24) |