# Email Template variables

**URL:** <https://developer.sailpoint.com/discuss/t/email-template-variables/217201>\
**Category:** SHF Discussion and Questions\
**Tags:** email-templates, access-requests, sailpoint-identity-security\
**Created:** [July 23, 2026, 7:38pm UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201 "2026-07-23T19:38:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_likeng](https://avatars.discourse-cdn.com/v4/letter/s/59ef9b/32.png) [@s\_likeng](https://developer.sailpoint.com/discuss/u/s_likeng)\
**Post date:** [July 23, 2026, 7:38pm UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201/1 "2026-07-23T19:38:22Z")

</div>

Hi Everyone,

Has anyone successfully included Access Request details, specifically the Access Request ID, in a SailPoint ISC email template?

I’m trying to populate the Request ID in an email template. I attempted to use $\_\_contentJson.accessRequestId, but it doesn’t appear to be working. If anyone has implemented this before, could you share how you retrieved the Request ID or any access request attributes?

Thanks in advance!

> ‼ Please be sure you’ve read the [docs](https://developer.sailpoint.com/idn/docs/) and [API specs](https://developer.sailpoint.com/idn/api/getting-started) before asking for help. Also, please be sure you’ve [searched](https://developer.sailpoint.com/discuss/search?expanded=true) the forum for your answer before you create a new topic.

## Please consider addressing the following when creating your topic:

- What have you tried?
- What errors did you face (share screenshots)?
- Share the details of your efforts (code / search query, workflow json etc.)?
- What is the result you are getting and what were you expecting?

---

<div class="post-metadata">

**Author:** ![punna0001](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/punna0001/32/42011_2.png) [@punna0001](https://developer.sailpoint.com/discuss/u/punna0001)\
**Post date:** [July 23, 2026, 7:57pm UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201/2 "2026-07-23T19:57:43Z")

</div>

Hello Samuel,

`$__contentJson` is only available in [version 2 templates](https://documentation.sailpoint.com/saas/help/common/emails/available_templates.html#version-2-templates). The Access Request Decision template uses [version 1 variables](https://documentation.sailpoint.com/saas/help/common/emails/et_ar_decision.html), and `accessRequestId` is not exposed as a template-specific attribute, so `$__contentJson.accessRequestId` will not resolve.

If you need the request ID in a notification, one way to do it is through a workflow using the [Access Request Decision](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/access-request-decision/) trigger. The trigger payload includes `accessRequestId` at the top level. In the Send Email action, you would map it in the templating context like this:

`{"accessRequestId.$": "$.trigger.accessRequestId"}`

Then reference it as `${accessRequestId}` in the email body.

---

<div class="post-metadata">

**Author:** ![Gopi2000](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gopi2000/32/21706_2.png) [@Gopi2000](https://developer.sailpoint.com/discuss/u/Gopi2000)\
**Post date:** [July 24, 2026, 3:20am UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201/3 "2026-07-24T03:20:11Z")

</div>

Hi @s_likeng ,

Implemented this using a custom workflow on the **Access Request Submitted** trigger with a **Send Email** action, referencing `{{$.trigger.accessRequestId}}` directly in the body/subject — this gives you the actual Request ID since it comes straight from the trigger payload, not the system template’s rendering context.  
Reference: [Access Request Submitted trigger](https://developer.sailpoint.com/docs/extensibility/event-triggers/triggers/access-request-submitted/)

To avoid duplicate emails, I suppressed the OOTB notification for that specific application by adding a check in its Subject field: if the object name contains “test”, it hits `#stop`, halting that template before it sends — so only my custom workflow email goes out for that case.  
Reference: [Using Email Templates](https://documentation.sailpoint.com/saas/help/common/emails/using_email_templates.html)

One thing worth flagging for anyone reusing this: `#stop` only prevents _that specific template_ from sending — if the requested item spans multiple applications/roles in the same submission, the OOTB email still sends normally for the others, since `#stop` halts the whole template render, not just the matched line. Also worth confirming your custom workflow doesn’t fire twice per request if the access item type triggers both Access Request Submitted and a downstream Provisioning event separately, depending on your source’s provisioning setup.  
Reference: [Send Email workflow action](https://documentation.sailpoint.com/saas/help/workflows/workflow-actions.html)

---

<div class="post-metadata">

**Author:** ![Gopi2000](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/gopi2000/32/21706_2.png) [@Gopi2000](https://developer.sailpoint.com/discuss/u/Gopi2000)\
**Post date:** [July 24, 2026, 3:24am UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201/4 "2026-07-24T03:24:44Z")

</div>

One additional thing to be aware of: if you’re using this approach to suppress the OOTB email by adding logic in the **Subject** field, keep the subject length within the supported limit. The rendered subject (including your conditional logic) should not exceed **250 characters** ; otherwise, the template may not behave as expected.

For example, if you want to suppress the email when the access request contains specific roles:

```auto
#set($roles = $requestedObjectNamesByType.get("Roles"))
#if($roles && ($roles.contains("test1") || $roles.contains("test2")))
#stop
#else
${requesterName} has requested access on your behalf.
#end

```

This approach checks whether the requested roles include **test1** or **test2**. If either role is present, `#stop` prevents the email from being sent; otherwise, the subject is rendered normally. This is also useful when you want to suppress notifications based on multiple requested roles in a single access request.

---

<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:** [September 22, 2026, 3:24am UTC](https://developer.sailpoint.com/discuss/t/email-template-variables/217201/5 "2026-09-22T03:24:48Z")

</div>

Closed on September 22, 2026, 3:24am UTC

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