Create Workflow
create_workflowCreate a complete ServiceNow workflow from a single specification, including activities, transitions, and optional publishing.
Instructions
Create a complete ServiceNow workflow from a single specification. Orchestrates: create workflow record -> create version -> create activities -> create transitions -> optionally publish.
Activities are referenced in transitions by their id field (if set) or their array index (as a string like '0', '1', etc.).
IMPORTANT: This creates multiple records on the ServiceNow instance (workflow, version, activities, transitions). Review the specification carefully.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| name | Yes | Name of the workflow. | |
| table | Yes | Target table for the workflow (e.g., "incident", "change_request"). | |
| description | No | Description of the workflow. | |
| activities | Yes | List of workflow activities to create. | |
| transitions | No | Transitions between activities. | |
| publish | No | Whether to publish the workflow after creation. Requires start_activity to be specified. | |
| start_activity | No | Activity id or index to use as the start activity. Required when publish is true. | |
| condition | No | Workflow trigger condition. | |
| access | No | Workflow access level. | |
| template | No | Whether the workflow is a template. | |
| active | No | Whether the workflow version is active. |