Workflow Email Body

Hello,
I am working on a workflow that notifies support whenever a user changes lifecycle state from Active to Delete. The email contains several variables and all seem to fail with a JSON error. Is there documentation on configuring “Templating Context” and “Body?” I’ve tried different variations of the variables in HTML with the same result.

body

Here is a simple example

<p>Hello $firstname $lastname,</p>
{"firstname.$":"$.getIdentity.attributes.firstname","lastname.$":"$.getIdentity.attributes.lastname"}

You can create your own variables using the same approach

Hi,
Link to document would be very helpful. I need information on configuring “Templating Context” and variables. Is your top section “body” and bottom section “templating context?” Need more information.

Thank you,

Sorry I was not more specific earlier. Yes, top is part of email body and bottom template context for the variables used inside the email body. You can reproduce the same for any attributes that are available in the workflow

Here is the link for the SP documentation on this

I feel like I have accurately coded everything based on the document provided. Unfortunately, I’m still seeing JSONPath failures. Can anybody tell me what I’m missing?

code


validation

Hello David,

I would suggest that you should use ${id} instead of $id in the body of the email. Likewise for the other attributes ${displayName}, ${jobTitle}, ${managerName} and ${lastDay},
The following image might help:

2 Likes

Have you set the type for Body as ‘{Choose Variable}’? Change it to ‘Enter Value’

You have an extra ‘{’ in deptDescription and missing " at the end of same line

${name} is used when you need to add some text right next to name (say Peterx when name is Peter) so that the renderer can identify $name instead of trying to find $namex. Otherwise there is no need of using {} around the variable name.

I have good example of email template with body customization in end of this blog : Using IdentityNow Workflows to Send a List of Uncorrelated Accounts After Aggregation

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.