Create a workflow from a template
create_workflow_from_templateCreate a new workflow in the team by copying a prebuilt template. The workflow is created inactive; call activate_workflow to publish it. Prefer this over building a workflow field by field.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional workflow name (max 75 chars). Defaults to the template name. | |
| steps | No | Optional. Approval steps to wire into the clone. Omit or pass an empty array to leave approvers blank — that is a supported setup, and the person submitting picks the approver on the form. Resolve every approver to a TeamUser id with `search_team_users` BEFORE calling — never pass names or emails. For sequential approvals (e.g. manager → finance) pass multiple steps in order. For value-based routing ('under $1,000 to Julia, $1,000+ to Serge') give each branch its own step and put the rule in that step's `conditions`. | |
| add_fields | No | Extra fields to append beyond the template's (plain fields, no OCR binding). | |
| template_id | Yes | Template id from `list_workflow_templates`. | |
| remove_fields | No | Labels (or bindings) of template fields to drop, e.g. 'Cost center'. On OCR templates, removing the invoice-file field disables extraction. | |
| rename_fields | No | Rename template fields while keeping their bindings (so OCR survives). | |
| template_name | No | The template's name exactly as `list_workflow_templates` returned it, e.g. 'Bill Approval'. ALWAYS pass this alongside `template_id` — the name is what the user said, and if the two disagree the name wins. Passing the id alone has created the wrong workflow when the id was misremembered across turns. |