Publish or unpublish template
set-template-published-statePublishes a template, making it available to the whole account, or unpublishes it back to a draft.
Use this tool when:
A template is finished, the user has read it over and asks to publish it, release it or hand it to their colleagues
Documents are to be created from a template that is still a draft
The user asks to take a published template out of circulation
A published template's content has to be rewritten, which replace-template-content refuses until the template is a draft again
Publishing is what puts a template into service. list-templates shows a draft only to the users who manage templates, so until it is published nobody else can find it to create a document from. It also settles the body, which replace-template-content only writes while the template is a draft.
A template that was just authored is therefore left as a draft rather than published on the spot. Tell the user what was written, let them read it over, and publish once they say it is right. Confirm either direction with them: publishing offers the template to their colleagues, unpublishing takes it away from them.
Unpublishing changes nothing about the documents already created from the template. They keep the content they were created with; the template is simply no longer offered for new ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| published | Yes | true publishes the template, making it available to the whole account. false returns it to a draft, which only users who manage templates see and which replace-template-content can rewrite. | |
| template_uuid | Yes | UUID of the template to publish or unpublish. Use list-templates to find it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL to open the template in fynk. Only present when your user has template editing permission | |
| name | No | Name of the template | |
| uuid | No | Unique identifier for the template. Do not show to the user unless they ask for it | |
| locale | No | Locale code, e.g. en-GB, de-AT. Prefer describing the locale in natural language (e.g. 'British English') rather than showing the raw code. | |
| published | No | Indicates if the template is published (true) or a draft (false). Only published templates can be used by users without template management permission | |
| _entity_type | No | Only relevant for tooling. Do not show to the user | |
| document_type | No | If present, indicates what kind of document this template creates. Absent when the template has no type assigned |