Skip to main content

Managing Templates

A template is reusable text with placeholders, such as a JSON request body or an email, that a workflow fills with data at run time. You write and version templates once under Settings and reuse them in any workflow through the Template activity.

note

This page is about the templates under Settings > Workspace > Templates. It is not about application and workflow templates or resource templates, which copy a whole application, workflow, or resource.

How it works​

  1. You create a template and write its text with {{field}} placeholders. Studio checks the text as you type.
  2. You save a draft while you work, then publish it. A published version never changes.
  3. In a workflow, you add the Template activity and pick the template. The activity stays on the version you picked until you choose another.
  4. When the workflow runs, the activity fills the placeholders with the values you mapped and returns the result in useTemplateOutput.output.

Template types​

TypeThe result isPlaceholder escaping
JSONA JSON document{{x}} is escaped as the inside of a JSON string.
XMLA well-formed XML document with one root element{{x}} is escaped for markup.
HTTP (HTML)An HTML document{{x}} is escaped for markup.
TextPlain textNothing is escaped.

In the type list, HTTP is shown as HTTP (HTML) and Text as Text. For the full syntax, see Template Syntax.

Levels​

LevelWho can use it
WorkspaceWorkflows in the workspace where you created it.
OrganizationWorkflows in every workspace of your organization.

You choose the level when you create a template and cannot change it in the editor afterward. You can promote a workspace template to the organization later, but you cannot reverse it.

Template names are unique per organization for Organization level templates, and per workspace for Workspace level templates. Capitalization does not make a name different. The Template name field accepts up to 256 characters.

Versions​

  • A template has at most one draft at a time.
  • Publishing turns the draft into the next version: v1, v2, and so on.
  • Editing a published version never changes it. Your changes save as a draft and publish as the next version number.
  • A workflow keeps using the version it picked, so publishing a new version does not change running workflows.

Where to go next​

I want toGo to
Create and publish my first templateCreating a Template
Edit, promote, or delete a templateManaging Template Versions
Look up placeholders and helpersTemplate Syntax
Have Koodisi AI write the templateGenerating a Template with Koodisi AI
Use a template in a workflowUsing a Template in a Workflow
Copy a worked exampleTemplate Examples
Fix an errorTroubleshooting Templates