Templates
A saved template gives several diagrams the same starting layout. Variables let you reuse that layout with different service names or other text.
Browsing templates requires templates:read. Creating a document from one requires docs:write, and saving or managing templates requires templates:manage.
Create a document from a template
- Open Templates in the sidebar and select Use template on a card.
- Fill in the variables. Fields marked with an asterisk are required. Select Next, even if the template has no variables.
- Set the Document name, then select Create and open.
The result is a new document you can edit. Changes to it don't update the template, and changes to the template don't update documents already created from it. Move the document into a space or folder after creating it.
Save your own template
For example, you could reuse a service diagram with $SERVICE_NAME$ in an ordinary text label, then enter Dispatch Service or Billing Service when creating each document.
- Prepare the canvas. Put variables in ordinary text using dollar signs, such as
$SERVICE_NAME$. Variable names start with an uppercase letter and contain only uppercase letters, digits or underscores. - Select Save as template in the canvas toolbar.
- Enter a Template name and a Description (optional). Select Create template.
- In Define variables, set each variable's Label and type. Add a Default value or check required where needed.
- Select Save definitions.
The type choices are STRING, NUMBER, BOOLEAN, URL, ENUM and DATE. For ENUM, enter Options (comma-separated) to give the person using the template a list of choices.
Substitution applies to ordinary canvas text, including text bound to a shape. It doesn't replace values inside structured cards. An optional variable left blank stays as its token in the new document. Write $$ for a literal dollar sign.