# 📃 Templates

**Parent page:** Orchestrator › Mail **Audience:** System Administrators, Developers **Prerequisites:** Admin or Developer role


---

## Overview

The **Mail › Templates** screen defines templates for the mail subject and body. Templates are used in two places:

* **Company templates:** The New User, New User Welcome, Password Reset and Notification templates selected in [Admin › Companies](/doc/companies-oX7hd1oDTR) determine the text of system mails.
* **Robot mails:** When robots send a templated mail, they select the template by name and pass the variables as parameters.

On this page you will learn:

* The list and filters
* Creating a template and using variables
* The variables passed to company templates
* The delete rule


---

## List

 ![Templates List](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/a406920a-3878-4f5f-8f8b-7593ba62e617/914e6fbc-cc0f-44a2-80a3-286f716c8fb1/mail-templates-list.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261123T234500Z&X-Amz-Expires=86400&X-Amz-Signature=5b9d93f507286bcf6d90c2328ed4de68841cdd57a223cdaca3ba67b0c5c0da28&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =2232x1376")

| Item | Description |
|------|-------------|
| New Record | Opens the **Mail Template Create** window. |
| Export | Downloads the selected records, the active page or the active filter as a file. |
| Enable / Disable | Enables or disables the selected templates in bulk. |
| Edit / Details / Delete | Row actions. |
| Info | Shows who created and modified the record. |

Default columns: Name, Description, Subject, Template Type, Created User, Created Date. The **Template Filters** window has Name, Description, Template Type and date ranges.


---

## New Template

| Field | Required | Description |
|-------|----------|-------------|
| Name  | Yes      | Unique. Robots select the template by this name. |
| Description | No       |             |
| Subject | Yes      | The subject of the mail. Can contain variables. If no subject is given when sending, this subject is used. |
| Template Type | Yes      | **HTML** (the body is sent as HTML) or **TEXT** (plain text). Cannot be changed after saving. |
| Template | Yes      | The body of the mail. |

The form also has a **Test Data** field for sample data and a **Result** field for the preview.

### Variables

Templates use Scriban syntax. The parameters given when sending arrive as `model`, with the first letter of their names in lower case: the `Name` parameter becomes `{{ model.name }}` in the template. Scriban expressions such as conditions and loops can also be used.

```
<p>Hello {{ model.name }} {{ model.surname }},</p>
<p>To activate your account, <a href="{{ model.link }}">click here</a>.</p>
```

If robots give a template name without parameters, the error "Send Mail Template Parameters required" is returned; if the template is not found, "Mail Template not found." is returned.


---

## Template Details

Clicking **Details** in the list opens the **Mail Template Details** window.

 ![Mail Template Details — New User Template](https://outline-production-attachments.s3-accelerate.amazonaws.com/uploads/a406920a-3878-4f5f-8f8b-7593ba62e617/ebbedc1a-1cbc-4a2d-bff1-03f3b6463b8e/mail-template-details.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA4EOUDTOVUICLPZ4P%2F20261123%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261123T234500Z&X-Amz-Expires=86400&X-Amz-Signature=42f7dfe3d8abf4abd8cf0495f3c9d55ec6bfa0d32747a81ac883b5b0705e864f&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject " =2520x652")

Fields: Name, Description, Subject, Template Type, Template. Top buttons: Disable / Enable, Delete, Edit, Previous / Next, Close. Template Type cannot be changed when editing.


---

## Variables of Company Templates

| Company template | When it is sent | Variables |
|------------------|-----------------|-----------|
| New User Template | Activation mail to a new user | `username`, `name`, `surname`, `year`, `link` (activation link, valid for 7 days) |
| New User Welcome Template | When the user activates their account | `username`, `name`, `surname`, `year`, `link` (sign-in page) |
| Password Reset Template | On a Forgot Password request | `name`, `surname`, `year`, `link` (reset link, valid for 10 minutes) |
| Notification Template | Mail copy of notifications | `name`, `surname`, `description` (notification text), `notificationTitle`, `year`; the subject is the notification title |

For user mails see [User › Users](/doc/users-z8TpALpmBU), for notification mails [Notify › Notifications](/doc/notifications-gkcF2NZf2x).


---

## Delete and Roles

* A template selected as a company template cannot be deleted: "Mail template can not be deleted because it is set as company template."
* The screen is available to the **Admin** and **Developer** roles.
* Templates are company-wide; they are not filtered by branch.