Skip to main content

Template overview

Templates are reusable pieces of text with placeholders for dynamic content. You can use them, for example, to generate mails or notes from a package.

You can also link them to a service to serve dynamic or static HTML pages. In this way, you can even build a full-blown web application.

Templates are stored in the Templates tab. Each template has:

  • A name used to identify the template
  • A render mode for dynamic content
  • A subject, text, and/or HTML

Render modes

The automator supports three template styles:

StyleSyntaxUse case
Comment style<!--# expr #-->HTML templates edited in an external HTML editor
Curly style{{ expr }}Concise templates (not compatible with frameworks like Angular.)
ASP style<%= expr %>Templates needing full JavaScript control flow

Each template has a render mode field that controls which style(s) are processed.

ModeDescription
Comment, Curly, ASPProcesses all three styles in sequence: Comment → Curly → ASP. Allows mixing styles in one template.
Comment styleComment style only
Curly styleCurly style only
ASP styleASP style only
NoneFor templates without any dynamic content

When the render mode is set to Comment, Curly, ASP, the template is processed through each renderer in order. This means you can combine styles in a single template, but you should be aware that the output of one renderer becomes the input for the next.

Accessing data

Templates can reference global variables (variables starting with $) defined in the script. For example, if the script defines $workflow, the template can use $workflow.subject to access the subject of the workflow.

See Variables for details on global and local variables.