How To
ForgeRock Identity Cloud

How do I use ESVs in an email template in Identity Cloud?

Last updated Jan 17, 2023

The purpose of this article is to provide information on including Environment secrets and variables (ESVs) in email templates in ForgeRock Identity Cloud. For example, if you want to have different text, images or links based on the environment.


You can utilize ESV variables in email templates to easily present different text, images or links in an email template, depending on which environment the email is sent from.


Using ESV variables in email templates requires you to use the Advanced editor. Once you have swapped to the Advanced Editor, you cannot change back to markdown.

Adding ESV variables to an email template

This process assumes you have created your ESV variable(s) including values and have applied the updates as explained in the documentation: Environment secrets and variables (ESVs).

You can add ESV variables to an email template as follows:

  1. In the Identity Cloud admin UI, go to Email > Templates and click the name of the email template you want to update.
  2. Click Advanced Editor.
  3. Add the placeholder for one or more ESV variables to your template, for example:&{}
  4. Click Save.


This worked example refers to two ESV variables that have been created:

  • esv-test-link - which has a value of
  • esv-test-image - which has a value of (and is an image hosted online).

You can add the link and image as follows:

  1. Add the link using the ESV placeholder, where the link text is the URL:<p>For more information, go to our website: &{}</p>You can also add the link using the <a> tag with the href attribute, which is useful if you want to display different link text.
  2. Add the image using the ESV placeholder:<p> <img src="&{esv.test.image}">   </p>

The preview will show the ESV placeholder and an image placeholder rather than the actual link and image as these are only resolved when the email is sent:

  1. Send a test email to yourself to verify it is working. You should see the URL and image included in your email now:

See Also

How do I update email templates in Identity Cloud to include images and HTML formatting?

Using email templates

Copyright and Trademarks Copyright © 2023 ForgeRock, all rights reserved.