Workflows: step add
workflows_step_addAdd a step to a workflow by setting a unique key and JSON action parameters; the step remains unlinked until you mark a start step and chain the rest.
Instructions
Add a step to a workflow. Params are the action's settings as JSON, e.g. {"script":"return {}"} for RunScript or {"entity":"orders","data":{...}} for CreateData. The new step is unlinked: set start on the workflow's first step and chain the rest with workflows_step_link. For FileHandler or Integration steps, workflows_file_handler_add and workflows_integration_add build the params for you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Step key (unique identifier) | |
| name | No | Step display name | |
| start | No | Set as start step | |
| action | No | Action type: ReadData, CreateData, UpdateData, UpsertData, DeleteData, CallAnApi, RunScript, Condition, SendAnEmail, SendACommand, SendPushNotification, FileHandler, Integration (for Integration, prefer 'integration-add') | |
| params | No | Step parameters as JSON | |
| enabled | No | Enable step immediately | |
| workflow_id | Yes | Workflow ID. Find it with workflows_list. |