Email Template

Hi, I have requirement like, i need to send one email by using the configured template, and the template is like “Document Upload Notification   [%User_Full_Name%] has uploaded document for below exceptions on [%Date%],   [%ExceptionID%] of [%OrderNumber%]    Thank you!    This is an auto-generated message.” The above update is happening in a loop. Initially $RebuttalInfo_Email is set to empty string. And the final updated string $RebuttalInfo_Email replaces the token in the template. Note the initial data provided was a demo one, but the screenprint shows actual variable.   But the problem occurs when i have multiple Exceptions against different Order Numbers and the requirement is to send an email containing all those exceptions in the prescribed format by adding different exceptions one after another. Can anyone suggest how to replace this token ‘[%ExceptionID%] of [%OrderNumber%]’ one after another in order to fulfill the requirement?
2 answers


Two ways I can think of:

  • have one attribute in your domain that contains 1 or a list of Exceptions/Order Numbers.  Populate this attribute in your microflow before generating the email, then use a token for this single attribute
  • in your microflow, change the body of the email in a loop to add all of the Exceptions/Order Numbers.  You could do this either before or after the token replace action

Of the two options, I would pick the first.  Seems simpler.  BTW, if you haven’t done this before, when you are populating a text attribute, embedded new line characters will carry over into the generated text.  So if I set an attribute in this way:

$Entity/StringAttr + ‘
Exception ID: ‘ + $ExceptionID + ‘   Order Number: ‘ + $OrderNumber

while in a loop, I will get a list that looks like this:

Exception ID: 1   Order Number: 2

Exception ID: 3   Order Number: 4

Exception ID: 5    Order Number: 6

If you do it this way, check if the attribute value is empty before adding the first value.

Hope that helps,



 Passing a list of values is not possible, i think. You can build the text in the microflow that sends it and pass the text in a string attribute.