Maintain automations
Change an existing Stunt Double workflow or checklist without losing run history.
- Find and read:
search(workspace_id, query),list_workflows,list_checklists.get_workflow(workflow_id)shows steps, connections,execution_orderandunreachable_step_ids; read it before changing anything. - Trigger and details:
update_workflow(workflow_id, name?, description?, trigger_config?). For a schedule send{ cron, timezone }with the timezone fromget_me. - Steps:
update_workflow_step(step_id, config)replaces the config in full: send every key.add_workflow_step(...)appends and connects;remove_workflow_step(step_id)repoints its inputs at its outputs.reorder_workflow_steps(workflow_id, step_ids)sets one linear order. Pass every id (one left out is disconnected); it flattens branches.
- Branches:
connect_workflow_steps(workflow_id, source_step_id, target_step_id, branch). On a condition stepbranchis'true'or'false'; otherwisenull. A step appended after a condition lands ontrue;falseis unconnected by default, so a failed condition ends the run unless you connect it.source_step_id: nullis the trigger;target_step_id: nulldisconnects. - Checklists:
get_checklist(checklist_id), thenupdate_checklist(checklist_id, checks=[…])sending each existing check with itsid. A kept id keeps run history; a dropped check is deleted with its results. Also adjustable:instructions,url,actor_id,pass_threshold,run_mode. - Verify:
get_workflowagain (all steps inexecution_order, none unreachable), thenrun_workfloworrun_checklistonce. - Pause or retire: prefer
toggle_workflowto pause.delete_workflowanddelete_checklistdiscard all run history, so use them only when the user asks.
Example, notify only on failure: add_workflow_step(workflow_id, step_type="condition", config={ field: "previous_step.failed", operator: "gt", value: 0 }), then add_workflow_step(workflow_id, step_type="notification", config={ channel: "email", recipients: { type: "all_members" }, template: "failed" }).