Skip to main content

Creating a Template

Create a template when several workflows need the same JSON body, XML payload, HTML page, or text message. This page covers creating one in Studio, and saving it as a draft or publishing it.

Before you begin​

  • Open the workspace where the template will first be used. A Workspace level template belongs to the workspace you are in.
  • Have the text you want to use, or plan to generate it with Koodisi AI.
  • If you do not see Templates under Workspace in Settings, your organization does not have it turned on.

Create the template​

  1. In the left toolbar, select Settings.
  2. Select Workspace > Templates.
  3. Select Create Template.
  4. Enter a name in the Template name field.
  5. Select a type from the Type list: JSON, XML, HTTP (HTML), or Text.
  6. Select a level from the Level list: Workspace, which shows your workspace name in parentheses, or Organization.
  7. Optionally, enter a Description of up to 1,000 characters.
  8. Enter the template text in the Template editor. Use {{field}} where a value goes. To see the forms you can use, select Syntax.

The editor checks the text a moment after you stop typing. The line under the editor reads No problems found, or it counts the problems and warnings and names the first one with its line number. Errors are marked in red and warnings in amber.

Save or publish​

Choose one:

  • Select Save draft to keep working. A draft is not available to the Template activity.
  • Select Publish to make the template available to workflows as v1.

If the template has an error, Studio does not save it and shows the error under the field or the editor. A warning never blocks. A draft can be empty, but a published template cannot.

How you know it worked​

The drawer closes and a message appears: name published, or name saved as draft. The template appears in the Templates list. A published template shows its version, such as v1. A template with a draft shows a Draft v1 tag.

When it does not work​

SymptomCauseWhat to do
Name is requiredThe Template name field is empty.Enter a name.
Name can be at most 256 charactersThe name is too long.Shorten it.
Add the template before publishingThe editor is empty.Enter the template text, or select Save draft.
A red message under the editorThe text has a syntax or format error.Fix the line the message names. See Troubleshooting Templates.
A template named name already exists in this workspace, or in this organizationAnother template at the same level has that name. Capitalization is ignored.Choose a different name.

Leave without saving​

Select Cancel, the close icon, or press Escape. If you changed anything, Studio asks Discard your changes?. Select Keep editing to return, or Discard changes to close. Nothing is asked when you only viewed a template.

Next steps​