Showing results for 
Search instead for 
Did you mean: 

Dynamic Email Body for Email Notification in SAP BTP Workflow Management

0 Kudos


We want dynamic email body in our HTML file for the email notification in SAP BTP Workflow Management. To achieve the same, we are using a context variable ($.context.HTML_Block) which contains HTML block as below.

$.context.HTML_Block = `<br> <strong>ID: </strong> <a target="_blank" href="${context.Url}"

style="-webkit-text-size-adjust:none;-ms-text-size-adjust:none;mso-line-height-rule:exactly;text decoration:underline;color:#3d85c6;font-size:14px"> ${context.Id}</a>`;

And the same context variable ($.context.HTML_Block), we are using in HTML file for email body. But this is giving an error during deploy.

Am I missing something here? Or there is any other way to achieve the same?

Thanks in advance!

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos


you will likely not achieve what you want at all with that approach. See

> You can use expressions in the mail body and the subject. However, you cannot add HTML tags in the HTML mail body using expressions, because special characters in the expression results are escaped for security reasons.

This means for example that you cannot dynamically build an HTML table with the rows coming from array data. There might be ways of formatting to achieve a tabular display (e. g. pre-tag or perhaps some CSS mechanism), but you cannot build the mail HTML dynamically, introducing HTML tags through context expressions.