Email templates in Configuration

Overview

Email templates control the notification emails Kompass sends: who receives them, what they say and when they are sent. You manage them in Configuration, on the Templates tab of each section. You can add and edit templates, switch them on or off, preview them with a real record and send yourself a test.

Opening the templates

Templates belong to an organization. If you work in several organizations, switch to the one you want to change first: changes apply only to that organization.

  1. Open the user menu and choose Configuration.
  2. Choose the section the emails belong to, for example Projects, Invoices or Emails.
  3. Open the Templates tab.

Each kind of email template has its own card. These sections have email templates:

  • Projects: project emails, such as a quote being accepted.
  • Clients, Invoices, Purchase orders and Contacts.
  • Quote items, Diary, Tasks, Expenses and Leave.
  • Emails: account emails (invitations, password resets and similar), reply notifications, comment emails and activity emails.

The Templates tab of the Emails section, with a card for each kind of email template

The Templates tab shows only when you can add, change or delete at least one kind of template in that section. Permission to view templates alone does not show it, but you need it as well to load the templates on the tab. The same tab also lists the section's document templates (see Document templates in Configuration).

The template list

Each card lists its templates with their Name, Trigger (the event that sends the email, or "None"), whether they are Enabled and their Files.

The Templates tab of the Invoices section, showing the invoice email templates and the invoice document templates

  • Add template creates a new template of that kind.
  • The pen icon opens a template for editing.
  • The bin icon deletes a template after you confirm.

Each of these needs the matching permission (add, change or delete) for that kind of template, so a card can show without them. In the Emails picture above, for example, the account and activity email templates show no pen icon because that user may not change them.

Deleting a template cannot be undone. To stop a template sending but keep it, untick Enabled instead.

Account emails (invitation, password reset, password changed, lost authenticator and account linked) always exist. You can edit them, but not add, delete or disable them.

Editing a template

The dialog shows the template's settings on the left and the variables you can use on the right.

The Edit template dialog for an invoice email template

  • Name: how the template appears in lists and template pickers.
  • Enabled: untick to stop the template sending.
  • Send for integration changes: also send when the change came from an integration sync, not a person. Off by default. It currently applies to project and quote item templates only.
  • HTML file and Text file: the email body. A template needs at least one of them. Upload a file with Choose file, replace it the same way, or Download the current one to edit it on your computer. Both files must be UTF-8 text. Without a text file, Kompass builds the plain-text version from the HTML.
  • Subject: the subject line. It can use variables, for example {{ project.name }}.
  • CC and BCC: addresses copied on every email. Type an address and choose Add.
  • Sender template: the From address. Leave it as {{ kompass_notification_sender }} to send from the standard system address. When you send an invoice, a purchase order or a project document yourself, Kompass may use your own address instead, if your account can send from its domain. See Email templates: custom sender address.
  • Trigger: the event that sends the email. Some kinds have more settings here, such as a project Phase.
  • Recipients: who receives the email. Besides normal addresses, you can use the special addresses listed under the field, such as the person who created the record. When you send an invoice, a purchase order or a project document yourself, you choose the recipients in the sending dialog instead; the template's CC and BCC still apply.

Choose Save to keep your changes.

Variables

The Variables panel lists what you can use in the subject, the sender and the files, in three groups: In this template, For this trigger and In every template. Use the copy button next to a variable to copy it.

Templates support the usual template syntax: {{ variable }} to insert a value, {% if %} and {% for %} blocks, and filters. For safety, a template cannot call anything that changes data and cannot use attributes whose names start with an underscore. A template that renders an empty subject or body is not sent, so an {% if %} block can skip an email.

Previewing and sending a test

An existing template has a Preview panel under the variables.

  1. Pick a Record to render the template with. The list shows up to 20 records, usually the newest first; type to narrow it down. For comment emails, pick a Project first.
  2. Choose Preview to see the subject, sender, recipients, CC, BCC and both bodies.
  3. Choose Send test to me to send the email to your own address only, with "[Test]" in front of the subject. This works even while the template is disabled.

The preview shows some special recipient addresses as they are, such as the one for the people mentioned in a comment. Kompass replaces them with the actual recipients only when it sends the email.

Save your changes first: preview and test are unavailable while the dialog has unsaved changes. Both need permission to change the template and to view the chosen record. For project and quote item templates you also need permission to view project financials.

A test is only sent when email sending is switched on for your account, under Configuration > Banner and email > Send email from Kompass. If a test does not arrive, check that setting first.

When something goes wrong

  • A file this template refers to is missing from storage. Upload the HTML or text file again.
  • The template rendered an empty subject or body. With the chosen record, the template produced nothing to send. Check its {% if %} blocks, or pick another record.
  • A message with a line number means the template has an error at that line, such as a typo in the syntax, a variable that does not exist, or a blocked attribute.
  • Add an email address to your account before sending a test. Your user profile has no email address.
  • When you save, a Sender template that does not produce a valid address is rejected. Use a plain address or "Name" <address>.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us