Customize the Notification Email Body

You can update the default email body template to include task details, reviewer instructions, values from the workflow payload, and other relevant information that assignees may need to act on the task.

  1. Select the Task element in your workflow.
  2. Open the Edit task pane using either of the following options:
    • Select the task and click Switch view icon on the side of the canvas.
    • Select the task, click Actions Actions icon and then select Configure.

    The Edit task pane appears.

  3. Select the Notifications tab.
  4. Update the email body template for task assignment or reminder notifications.
  5. In the Message Body field, click in the position where you want to update the HTML template.
  6. Type double open curly braces {{ to bring up a suggestion box where you can select predefined variables available for task notifications.

    To view a complete list of predefined variables that can be used for task notifications, see Predefined Variables for Task Notifications.

    Note:

    Notification templates don’t support direct access to the payload variable for retrieving task details from the workflow's start event payload. To access a start event attribute, use the following template expression:

    {{#payload}}{{#messageStartArgs}}{{AttributeName}}{{/messageStartArgs}}{{/payload}}

    For example, if the start event payload contains:

    {
      "messageStartArgs": {
        "request_description": "Purchase Order 12345"
      }
    }

    Then, the expression {{#payload}}{{#messageStartArgs}}{{request_description}}{{/messageStartArgs}}{{/payload}} resolves to Purchase Order 12345

  7. Select Insert.

Predefined Variables for Task Notifications

The following table lists the predefined variables that you can use in a task notification email template. Note that the variable names are case-sensitive.

Variable Description Syntax
assignee User name of the task assignee. {{assignee}}
approverComment Stores the last comment against the task . {{approverComment}}
assigneeDisplayName Display name of the task assignee. {{assigneeDisplayName}}
actions List of actions. {{ actions }}

For example:

{{# hasActions }}
    <div class="button-container">
        <div class="label">Actions</div>
        <div class="buttons">
            {{# actions }}
                <a class="action-button" href="{{workspaceURL}}">
                    <span title="{{actionDisplayName}}">{{actionDisplayName}}</span>
                </a>
            {{/ actions }}
        </div>
    </div>
{{/ hasActions }}
actionDisplayName Display name of the action. For example, Approve, Reject.

You can define the action display name as shown in the following syntax:

{{# hasActions }}
    <div class="button-container">
        <div class="label">List of Task Actions</div>
        <div class="buttons">
            {{# actions }}
                <a class="action-button" href="{{workspaceURL}}">
                    <span title="{{actionDisplayName}}">{{actionDisplayName}}</span>
                </a>
            {{/ actions }}
        </div>
    </div>
{{/ hasActions }}
createdDate Date of creation of the task. {{createdDate}}
commentStr

Contains the comment provided during the approval or rejection of the current task. It does not include comments from previous task approvals, and displays a value in the task completion email.

commentStr
creatorDisplayName Stores the display name of the creator. {{creatorDisplayName}}
creatorName Stores the username of the creator. {{creatorName}}
dueDate Due date for completing the task. {{dueDate}}
expirationDate Expiry date of the task. {{expirationDate}}
externalUIURL Stores the URL of the external user interface used by the task. {{externalUIURL}}
fromUserDisplayName Stores the display name of the user.
  • On Assign: Creator of the task.
  • On Complete: Approver of the task.
  • On Reassign: Origin user.
  • On Escalation: Origin user.
  • On Request Info: Origin user.
{{fromUserDisplayName}}
fromUserName Stores the user name of the user. {{fromUserName}}
hasActions A boolean value that indicates if an action is configured for a task. {{hasActions}}
instanceId ID of the process instance in which the task is present. {{instanceId}}
logo Product logo {{logo}}
outcome The outcome of the task. {{outcome}}
priority The priority of the task. {{priority}}
payload Root element that stores all message start variables. {{payload}}
processName Name of the process in which the task is present. {{processName}}
processVersion Version of the process in which the task is present. {{processVersion}}
shortSummary Summary of the task. {{shortSummary}}
state The current state of the task like whether it is assigned or completed. {{state}}
subState The current substate of the task. For example, this variable can indicate if the task is expired. {{subState}}
taskId The task ID. {{taskId}}
title Title of the task. {{title}}
url URL for accessing the task details in runtime. {{url}}
updatedBy Display name of the user who updated the task. {{updatedBy}}
updatedById Stores the username of the user who has updated the task. {{updatedById}}
updatedDate Date on which the task was last updated. {{updatedDate}}