Edit an automation (replace its flow)
put_automationEdit an automation by replacing its whole document: for flows no template covers, or that were already edited on the canvas. If get_automation shows templateParams, change it with update_automation instead (only the params you pass change; an Instagram follow check is requireFollow, notFollowingMessage and recheckTitle). Replacing the document of a flow that still has its template form is refused with automation_is_template, because the person can no longer open it in the form afterwards; pass detachTemplate: true only when the change cannot be expressed as template params. Read it first with get_automation and pass the version you got; a stale version is refused with version_conflict so a concurrent edit is not overwritten. Node types: send (mode window | private_reply | public_reply), condition, action, delay, random, goto, ai. Waiting is a send node with buttons and next: null; the tapped button's next continues. A loop must pass through such a wait. A comment trigger's post.postId takes the post's link too; the server resolves it to the uplika post id. Validation problems come back with paths. Changing a live flow changes what goes out to people.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| doc | Yes | One automation flow. triggers start it, nodes are the steps, start names the first node. Waiting is not a node: a send node with buttons and next: null waits for the person to tap one, and that button's next continues. A loop must pass through such a wait. | |
| name | No | ||
| version | Yes | ||
| workspaceId | No | Which workspace this is for. Only needed when the account has more than one — the error tells you the ids when it matters. Leave it out if it is already decided; do not ask the person again. | |
| detachTemplate | No | Only for a flow that still has its template form: true turns it into a canvas-only flow the form can no longer open. Default false. |