Create a workflow template, or a new version of one.
Saves the details, the builder canvas and the steps as a template, or as a new version on top of parent_workflow_template_id, which then runs. The canvas and the steps must agree: every step is on the canvas with the same node_id and type. A new step takes a new node_id, and previous_node_id names the step it continues. A canvas without steps goes through POST .../compile. A credential sent as the redaction marker (a Password, Token, TokenSecret or auth_request_config input, a header value in a Headers input, a canvas credential key) keeps the credential the step it continues stores, in a version of the template parent_workflow_template_id names; a marker on a step with none is refused.
| |
|---|
| Scope | workflows:author |
| Asynchronous | No |
| MCP tool | create_workflow_template |
| Portal permissions | create_workflow_templates |
Parameters
| Name | In | Type | Required | Description |
|---|
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
Responses
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
WorkflowTemplate
| Field | Type | Required | Description |
|---|
current_workflow_template_version_id | string | Required | The version that runs now; a workflow started from the template runs it. |
entity_sub_type | string | Required | The document type the template applies to; empty for any. |
entity_type | string | Required | The entity the template applies to; empty for any. |
is_active | boolean | Required | false when the template cannot be started. |
name | string | Required | |
project_id | string or null | Required | The project the template applies to; null for any project. |
workflow_template_group_id | string or null | Required | The template group it sits in; null for none. |
workflow_template_id | string | Required | |
| Field | Type | Required | Description |
|---|
canvas | object | Required | The builder canvas (format workflow_canvas, version 1): an object with nodes, edges and sections. |
entity_sub_type | string or null | Optional | The document type the template applies to; absent for any. |
entity_type | string or null | Optional | The entity the template applies to; absent for any. |
name | string | Required | The template's name, up to 500 characters. |
parent_workflow_template_id | string or null | Optional | Save this as a new version of the template this ID names (any of its versions); null or absent for a new template. |
project_id | string or null | Optional | The project the template applies to; null or absent for any. |
steps | array of WorkflowTemplateStepInput | Required | The template's steps. A canvas without steps goes through POST .../compile instead. |
workflow_template_group_id | string or null | Optional | The group to file it in; null or absent for none. |
| Field | Type | Required | Description |
|---|
inputs | array of WorkflowTemplateStepSettingInput | Optional | |
label | string or null | Optional | |
node_id | string | Required | |
node_type | string | Required | The step type, as list_node_types names it (for example StartNode). |
original_node_id | string or null | Optional | A source step in the visible parent lineage whose unchanged credentials may be retained, independent of step identity. |
outputs | array of WorkflowTemplateStepOutputInput | Optional | |
previous_node_id | string or null | Optional | The step's node_id in the version it was copied from, so it keeps its identity; null for a new step. |
| Field | Type | Required | Description |
|---|
response_node_id | string or null | Optional | |
type | string | Required | |
value | string or null | Optional | |
| Field | Type | Required | Description |
|---|
redacted | boolean | Optional | true when the value is a redacted credential the read replaced. Send it back as the marker to keep the credential the step it continues stores (previous_node_id); a marker on a step with no stored credential is refused. |
type | string | Required | |
value | string or null | Optional | |