Task mails


This feature enables sending customizable email notifications for group and user tasks.
Emails are triggered based on user settings or tenant profile configurations.
This feature enhances the task notification system by providing flexible and customizable email notifications, ensuring that all stakeholders are informed and can access their tasks efficiently. The support for variables, HTML content, and deep links further improves the usability.


Activate task mails

The ‘Send e-mail if new task was assigned’ button can be enabled on the ‘Tenant’ page (only by admin user).
The option to "Send email if a new task is assigned" should be activated by default on the 'Tenant' page for all users. If a user chooses to override this setting in their profile by unchecking the checkbox, they will not receive any task-related emails.

Screenshot 2024-05-29 150233.png

Make sure to ‘save’ the changes by scrolling down and clicking the ‘save’ button at the bottom of the page.

Screenshot 2024-05-29 150355.png

The success pop-up message is displayed after the changes were saved successfully.

User task mails

If a task gets assigned, a new mail is created for the assigned user if he/she has activated the checkbox “send e-mail if new task was assigned”.
The user task mail is then displayed in the outbound email list and is only sent to the assigned user:

 


Group task mails

If a task is assigned to a group, all members of this group which have activated the checkbox “send e-mail if new task was assigned” will get an email. Those emails are displayed on the outbound email list too:

To check if the mail was sent to all the members of the group, you can check the group information modal which you can access via the group list.


Notify by group mail - for e-mail distribution lists

The ‘Notify by group mail’ button on the 'Tenant' page can be enabled so that only one e-mail is sent out to the defined group email-address.

  1. If true and the specific group has set an e-mail address: only one mail is sent to this group email address.

  2. If false or the specific group has set no e-mail address: all group members get an email.


Customizing task mail subject and text

The task mails can be customized for each task, process and language (also the hierachy) in the tim.properties and also for a single task in Workflow Design.

The following tim.properties show how this can be achieved for group or task mails.

  1. If you want to define a general subject and text for all languages, please use:
    group-taskmail-subject and taskmail-subject and group-taskmail-text and taskmail-text

  2. If you want to define a subject and text for a specific language (en) which overrides the general one (1.), please use:
    group-taskmail-subject-en and taskmail-subject-en and group-taskmail-text-en and taskmail-text-en

  3. If you want to define a subject and text for a specific language (en) and a specific process (Onboarding) which overrides the one from 2., please use:
    group-taskmail-subject-en-Onboarding and taskmail-subject-en-Onboarding and group-taskmail-text-en-Onboarding and taskmail-text-en-Onboarding

  4. If you want to define a subject and text for a specific language and a specific process and a specific node/task (Prepare file) which overrides the one from 3., please use:
    group-taskmail-subject-en-prepare-file and taskmail-subject-en-prepare-file and group-taskmail-text-en-prepare-file and taskmail-text-en-prepare-file

 

All spaces or special characters have to be replaced by “-”. All other characters have to be written in lower case. Example: Task name “Prepare file” becomes “prepare-file”



Hierarchy

For custom group task mails

group-taskmail-subject
    ├── group-taskmail-subject-[language]
        ├── group-taskmail-subject-[language]-[process-name-here]
            └── group-taskmail-subject-[language]-[process-name-here]-[node here]

  • If group-taskmail-subject-[language]-[process-name-here]-[node here] is specified, translation for this specific node is used if there is a match.

  • If not, then group-taskmail-subject-[language]-[process-name-here] is used.

  • If that is not specified, then group-taskmail-subject-[language] is used.

  • If none of the above are specified, group-taskmail-subject is used.


For custom user task mails

taskmail-subject
    ├── taskmail-subject-[language]
        ├── taskmail-subject-[language]-[process-name-here]
            └── taskmail-subject-[language]-[process-name-here]-[node here]

  • If taskmail-subject-[language]-[process-name-here]-[node here] is specified, translation for this specific node is used if there is a match.

  • If not, then taskmail-subject-[language]-[process-name-here] is used.

  • If that is not specified, then taskmail-subject-[language]- is used.

  • If none of the above are specified, taskmail-subject is used.

 

Use case: We want to send out a different mail for a specific process “Onboarding” and another mail for a specific task “Account setup” within this process. Let us define in tim.properties :

In the first two rows, we configure to send ‘Hello User’ as subject and ‘This is the body text…’ as text if the task is assigned to a group.

The third and fourth row define that in all other tasks, the mail subject must be 'Hello User - level Process Definition' and the text ‘This is the body text - level Process definition…’ for group task mails.

 

group-taskmail-subject-en-onboarding-account-setup=Hello User group-taskmail-text-en-onboarding-account-setup=This is the body text... group-taskmail-subject-en-onboarding=Hello User - level Process definition group-taskmail-text-en-onboarding=This is the body text - level Process definition #lets define german as well group-taskmail-subject-de-onboarding-account-setup=Hallo Benutzer group-taskmail-text-de-onboarding-account-setup=Dies ist der Fließtext... group-taskmail-subject-de-onboarding=Hallo Benutzer - Prozessdefinition auf Ebene group-taskmail-text-de-onboarding=Dies ist der Fließtext - Prozessdefinition der Ebene...

The first 4 rows were for English (en) and rows 7-10 are for users which have selected German as their language (de).


After uploading tim.properties inside the resources folder using the adequate privileges. Then when you assign task “Fill Employee Information“ to the group

The email containing the text ‘Hello User- level Process definition’ are sent successfully.

EN version

DE version for users who have selected German as their language

But when assigning the ‘Account Setup’ task to the group the email with the text “Hello User” is sent

EN version

DE version


Including variables from forms

Use case: We want to extend the use case from above so that the mail subject will contain variables from the form. In this case, we want to add the first name of the new employee to the task mail subject of “Account setup”. This can be achieved by changing the tim.properties in row 1:

group-taskmail-subject-en-onboarding-account-setup=Hello ${first-name}

 

Variables can be easily included it like this. You can find out the variable name e.g. in Form Designer.

After uploading the new tim.properties and reassigning the task, the email with the subject 'Hello Arlinda' is sent successfully.


HTML

Use case: We can define mail text via tim.properties or via workflow design properties for a specific node.
Let us define in tim.properties the property taskmail-text.

taskmail-text=<html><head> <style> body {font-family: Arial, sans-serif; color: #323232; background-color: f1f7f7;  }table { width: 480px; margin: 16px auto; border-collapse: collapse; } th, td {  padding:7px; border: 1px solid #ddd; text-align: left;   vertical-align: top; } th { background-color: f1f7f7;   font-weight: bold;  font-size: 15px;   line-height: 20px;  }  a {  text-decoration: none;  background-color: #04AA6D;  color: white !important;  padding:15px;  display: inline-block;  border-radius: 4px;  } </style> </head><body>  <table><thead><tr><th colspan="2">Company: ${SYS.CURRENT_USER_COMPANY} </th> </tr> </thead> <tbody> <tr>  <th>ID</th>  <td>${SYS.TASK_ID}</td>  </tr> <tr> <th>TASK NAME</th>  <td>${SYS.TASK_NAME}</td> </tr> <tr><th>Date of Assignment</th> <td>${SYS.NOW}</td> </tr> <tr>  <th>Priority</th> <td>High</td>  </tr> <tr>  <th>Workflow</th <td>${SYS.PROCESSDEFINITION_NAME}</td> </tr> </tbody></table> <p style="text-align: center;"> <a href="${SYS.TASKLINK}" target="_blank">Go to Task</a>  </p></body></html>


In activity level it is configured to receive text the HTML content. as soon as the task is assigned.

Code example: how the HTML mail is structured can be seen below.


The HTML can also be configured via properties on the workflow for a specific node, on the task mail text field.


After uploading the file on Resources → admin or configuring the HTML via properties, the task can now be assigned.

 

After the mail is send to user email, it receives a nice looking email as we have provided in the HTML template

 

The HTML email received


If you click on “Go to Task” button, the link will redirect to the task.