# Workflow Email Body

**URL:** <https://developer.sailpoint.com/discuss/t/workflow-email-body/30129>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, identity-security-cloud, notifications\
**Created:** [February 12, 2024, 4:28pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129 "2024-02-12T16:28:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidballew](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@davidballew](https://developer.sailpoint.com/discuss/u/davidballew)\
**Post date:** [February 12, 2024, 4:28pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/1 "2024-02-12T16:28:25Z")

</div>

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](https://global.discourse-cdn.com/sailpoint/original/2X/2/237cf5ba13fc78953fc4548467b2b205817e5387.png)

 ![variables](https://global.discourse-cdn.com/sailpoint/original/2X/c/cbbf8aabe1ee91a2177a585502e105fab51da8a1.png)

---

<div class="post-metadata">

**Author:** ![iamology](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamology/32/6964_2.png) [@iamology](https://developer.sailpoint.com/discuss/u/iamology)\
**Post date:** [February 12, 2024, 4:44pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/2 "2024-02-12T16:44:48Z")

</div>

Here is a simple example

```auto
<p>Hello $firstname $lastname,</p>

```

```auto
{"firstname.$":"$.getIdentity.attributes.firstname","lastname.$":"$.getIdentity.attributes.lastname"}

```

You can create your own variables using the same approach

---

<div class="post-metadata">

**Author:** ![davidballew](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@davidballew](https://developer.sailpoint.com/discuss/u/davidballew)\
**Post date:** [February 12, 2024, 5:03pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/3 "2024-02-12T17:03:11Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![iamology](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamology/32/6964_2.png) [@iamology](https://developer.sailpoint.com/discuss/u/iamology)\
**Post date:** [February 12, 2024, 5:30pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/4 "2024-02-12T17:30:02Z")

</div>

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

> **[Actions - SailPoint Identity Services](https://documentation.sailpoint.com/saas/help/workflows/workflow-actions.html#send-email)**
>
> SailPoint Identity Services Documentation

---

<div class="post-metadata">

**Author:** ![davidballew](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@davidballew](https://developer.sailpoint.com/discuss/u/davidballew)\
**Post date:** [February 12, 2024, 6:24pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/5 "2024-02-12T18:24:28Z")

</div>

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](https://global.discourse-cdn.com/sailpoint/original/2X/4/4e036263a96c8bd1a1ed00f2d546fb7149743f8f.png)

 ![var_fail](https://global.discourse-cdn.com/sailpoint/original/2X/6/61d01261f3127dd52a69b68447da456ba6d5ad71.png)  
 ![validation](https://global.discourse-cdn.com/sailpoint/original/2X/2/20e91f8d88d49c59990b568aa7d0a1611058cfe5.png)

---

<div class="post-metadata">

**Author:** ![mehuljogi](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/mehuljogi/32/8264_2.png) [@mehuljogi](https://developer.sailpoint.com/discuss/u/mehuljogi)\
**Post date:** [February 12, 2024, 7:13pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/6 "2024-02-12T19:13:32Z")

</div>

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:

 ![Email-template](https://global.discourse-cdn.com/sailpoint/original/2X/b/b34fa19212fe25dc7e687455f26b83b9449ef0cb.jpeg)

---

<div class="post-metadata">

**Author:** ![iamology](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamology/32/6964_2.png) [@iamology](https://developer.sailpoint.com/discuss/u/iamology)\
**Post date:** [February 12, 2024, 8:40pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/7 "2024-02-12T20:40:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![iamology](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/iamology/32/6964_2.png) [@iamology](https://developer.sailpoint.com/discuss/u/iamology)\
**Post date:** [February 12, 2024, 8:43pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/8 "2024-02-12T20:43:26Z")

</div>

${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.

---

<div class="post-metadata">

**Author:** ![baoussounda](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/baoussounda/32/13095_2.png) [@baoussounda](https://developer.sailpoint.com/discuss/u/baoussounda)\
**Post date:** [February 12, 2024, 9:26pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/9 "2024-02-12T21:26:41Z")

</div>

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](https://developer.sailpoint.com/discuss/t/using-identitynow-workflows-to-send-a-list-of-uncorrelated-accounts-after-aggregation/24010)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [April 12, 2024, 9:27pm UTC](https://developer.sailpoint.com/discuss/t/workflow-email-body/30129/10 "2024-04-12T21:27:01Z")

</div>

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