Update Workflow
workflow.updateEdit a workflow's draft: rename it, replace its trigger, add, change or remove steps (branches included), or revert: true to discard the draft. Read it with workflow.read first and name nodes by their ref; never guess one. New steps are Steps workflow steps, and {{steps.<ref>.<path>}} may name an existing node's ref or a new step's ref. If the action fails: update: [{ref, onError}] sets stop, continue (skip failed items) or fallback_path (error branch) on integration_action, agent, transcribe and run_workflow steps; then add: [{after: ref, port: "error", steps}] puts steps on the error branch, in the same call or later (a step added in this call gets onError in a later call, by the ref workflow.read shows), and failed items reach them with the reason in {{ $input.error }}. Leaving fallback_path removes the steps only the error branch led to. On a workflow that is on, the change goes live only after workflow.publish.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | Steps inserted between `after` and what followed it | |
| name | No | ||
| remove | No | Refs to remove; an if or switch takes the steps under its branches along | |
| revert | No | Discard the draft and go back to the published version | |
| update | No | ||
| trigger | No | A Steps trigger; replaces the trigger's type and config and keeps what follows it | |
| workflowId | Yes | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| note | No | ||
| added | Yes | Names of the steps added | |
| removed | Yes | ||
| updated | Yes | ||
| isActive | Yes | ||
| reverted | No | ||
| workflowId | Yes | ||
| triggerChanged | Yes | ||
| hasDraftChanges | Yes |