Email Notification Templates

Email Notification Templates

Overview

The Message Templates tab in global setting allows administrators to customize the automated emails sent by the app. It enables you to customize your notifications with dynamic content using OlivLang. Personalize the sender details, subject, and message content (both text and HTML versions) for each template to better reflect your brand and communication style.

image-20260305-171726.png
📍 Path: Global Settings → Message Templates

Customization Options

Select Template

Choose the specific email type you wish to edit:

  • Call for Action

  • Call Delegates for Action

  • Notification

  • Automatic Reminder

  • Call for Vote / Call for Vote Delegated

  • Voting Ended (Call for Action / Delegated)

  • Voting Expired (Call for Action / Delegated)

  • Voting Moderator Notification

  • Voting Moderator Notification Delegated

  • Custom Reminder

  • Dynamic Step User Added

  • Dynamic Step User Removed

  • External Approver Call For Action

  • External Approver Notification

Activate/Deactivate Customization

Turn on or off customization for each notification type.

Editable Fields

  • From: Define the sender's name and email (e.g., Sender Name <sender@example.com>).

  • Subject: Set the email subject line.

  • Text Message: Write or edit the plain text version.

  • HTML Message: Write or edit the rich text (HTML) version.

  • Restore Defaults:
    Each field has an option to revert to its default value if you need to reset your changes.


Custom Reminder

Frame 68 (1).png

Custom Reminder template exclusively supports Markdown formatting.

  • Single Field Design: A single text field is provided for simplicity.

  • Auto-Conversion: If the recipient's email client supports HTML, the Markdown will be automatically converted; otherwise, it will remain as plain text.

  • Usage: This content serves as the default message when sending manual notifications via the mailbox icon in the approvals list.


Dynamic data placeholders

Your email templates can include dynamic placeholders that are automatically replaced when the email is sent:

  • Sender Information:
    {{ senderEmail }}

  • User who started approval:
    {{ approvalOriginator }}

  • Approval properties:
    All approval fields can be found here in our API documentation.
    Examples:
    {{ approval.name }}, {{ approval.status }}, {{ approval.steps }}

    Screenshot 2025-05-08 at 16.06.10.png
    Web API docs containing all Approval fields
  • Work item fields:
    All work item properties can be found here in the Atlassian docs.
    Examples:
    {{ issue.key }}, {{ issue.fields.summary }}, {{ issue.fields.project.key }}

    Screenshot 2025-04-01 at 15.29.08.png
    Atlassian docs containing all IssueBean fields under the Responses section
  • Link to approval:
    {{ approvalLink }}

  • Application name:
    {{ appName }}

  • Optional fields:
    {{ delegatorName }} and {{ action }} (approval/consent) if available

 

Depending on the field type, you can use the following access patterns in your templates:

Field Type

Syntax

Example

Rich Text / Description

{{ issue.renderedFields.description }}

Full HTML (headings, tables, lists, links)

System Dates

{{ issue.renderedFields.created }}

Locale-formatted date (e.g., 10/May/26 4:42 PM)

Time Tracking

{{ issue.renderedFields.timespent }}

Human-readable duration (e.g., 1 hour, 30 minutes)

Standard User Fields

{{ issue.fields.reporter.displayName }}

User's full display name

Multi-User Custom Fields

{{ issue.fields.customfield_10190[0].displayName }}

Access specific user from a list using index

Select List Custom Fields

{{ issue.fields.customfield_10520.value }}

Selected option value text

OlivLang

OlivLang is a templating language that allows you to add dynamic elements to your emails.

Template Structure

  • Literal text is emitted as-is.

  • Expression blocks evaluate a value and print it:

    Hello {{ user.name }}
  • Statement blocks introduce control‐flow, loops, function & var declarations, but don’t auto-print their result:

    {{ if (condition) }}…{{ end }} {{ for (var x of list) }}…{{ end }} {{ var total = a + b }}

Expressions & Data Access

Variables & property access

  • Simple variable:

    {{ approval.name }}
  • Nested fields:

    {{ issue.fields.summary }}
  • Map lookup by key:

    {{ myMap.someKey }}

Operators

Category

Syntax

Notes

Category

Syntax

Notes

Arithmetic

+, -, *, /

 

Comparison

<, <=, >, >=

Numeric comparisons

Equality

==, !=

 

Logical

and, or, !

Short‑circuit;
and returns the first falsy operand,
or returns the first truthy

Defaulting

a or b

Returns a if truthy, otherwise b

Control Flow

Conditionals

{{ if (a == 1) }} A is one {{ else }} {{ if (b == 2) }} B is two {{ else }} Neither {{ end }} {{ end }}

Logical short-circuiting

Use and / or for compound tests; both short-circuit:

{{ if (a == 1 or b == 2) }} ... {{ end }} {{ if x == "foo" and (y != "bar" or z > 5) }} {{ // parentheses control evaluation order }} {{ end }}
  • or: returns first truthy operand

  • and: returns first falsy operand

Iteration

For-of Loop

Iterate arrays or iterables:

{{ for (var item of collection) }} {{ index }}: {{ item }} {{ end }}

Classic For Loop

Initializer; condition; increment:

{{ for (var i = 0; i < 5; i = i + 1) }} {{ i }} {{ end }}

Functions & Variables

Defining Functions (fun)

Reusable subtemplates:

{{ fun bold(text) }} **{{ text }}** {{ end }}
  • Defines a named sub‐template you can call:

    {{ bold("Hello") }}

Declaring Variables (var)

Local bindings:

{{ var x = expression }}

Defaults & Fallbacks

Protect against null or missing values:

Hello {{ user.name or "there" }}
  • If user.name is null or undefined, prints "there".

Comments

{{ // This is a comment – ignored by the engine }}
  • Anything after // inside an expression block is dropped.

Working with Jira Custom Fields

Jira’s issue.customFields is an array of { id, value }. Here is an example of looping through an array and filtering fields by ID:

{{ for (var cf of issue.customFields) }} {{ if (cf.id == "customfield_10048" or cf.id == "customfield_10024") }} {{ cf.id }} - {{ cf.value }} {{ end }} {{ end }}

Example OlivLang code

{{ // Example helper method to display some basic step fields }} {{ fun displayStep(step) }} - Display name: {{ step.displayName }} - Type: {{ step.type }} - Status: {{ step.status }} - Decision date: {{ step.decisionDate }} {{ end }} {{}}Hello, {{ approvalOriginator }}! Sender: {{ senderEmail }} Approval data: Name: {{ approval.name }} Status: {{ approval.status }} Steps details: {{ for (var step of approval.steps) }} Step {{ index }}: {{ displayStep(step) }} {{ // Let's display more step fields conditionally }} {{ if (step.type == "USER") }} - User ID: {{ step.userId }} {{ end }} {{ end }} Issue data: Key: {{ issue.key }} Summary: {{ issue.fields.summary }} Project key: {{ issue.fields.project.key }} {{ if (approval.status == "SUCCESS") }} Approved {{ else }} {{ if (approval.status == "IN_PROGRESS") }} In progress {{ else }} Rejected {{ end }} {{ end }} {{ var pct = (approval.stepsDone / approval.stepsCount) * 100 }} Approval progress: {{ pct }}%

Testing your templates

A dedicated testing area allows you to preview the rendered output of your templates. Simply select the field you want to test (From, Subject, Text Message, or HTML Message), supply the necessary context, and view the results. If an error occurs during rendering, an error message will guide you through troubleshooting.

image-20260305-171901.png
Successfully rendered template
image-20251210-050323.png
Rendering error with the message