create_workflow
Create a new ERPNext workflow with states and transitions, using standard mode or smart mode with validation for reliable setup.
Instructions
Create a new Workflow in ERPNext (unified – use mode = 'standard' | 'smart')
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_type": "<document_type>",
"workflow_name": "<workflow_name>",
"states": "<states>",
"transitions": "<transitions>"
},
"name": "create_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Creation mode: 'smart' (default) or 'standard' (legacy). Smart mode performs validation. | smart |
| states | Yes | States | |
| is_active | No | Whether workflow is active (1/0, optional, defaults to 1) | |
| transitions | Yes | Transitions | |
| document_type | Yes | Target DocType | |
| workflow_name | Yes | Workflow name | |
| send_email_alert | No | Send email alerts on state changes (1/0, optional) |