vRealize Automation Modifying Approval E-mails

One of the questions I get often asked by customers is how to modify vRA e-mail templates. To be honest the most one customers usually care to modify is the Approval e-mail to include more information than what is provided in the out of the box template. In this article, I will show you how to simply modify the vRA Approval e-mail to include additional custom properties. I will not drill into more advanced e-mail modification topics to keep this as simple as possible and get you straight to the point if that all you needed to do, though I will have more advanced vRA e-mail template modifications links at the end of this post.

First, you will need to upload the vRA e-mail templates to vRA using the below steps:

  1. Download the 2088805_vrealize_automation.tar.gz file from KB208805
    • Windows: Use a program such as WinSCP to copy the 2088805_vrealize_automation.tar.gz to the VMware vRealize Automation
    • Linux: Run these commands:scp 2088805_vrealize_automation.tar.gz root@vCAC VA:/
      ssh root@vCACVA
      cd /
      tar -xvzf 2088805_vrealize_automation.tar.gz
      find /vcac -type d -exec chmod o+rx {} \;
      find /vcac -type f -exec chmod o+r {} \;
  2. Restart VMware vRealize Automation by running this command:service vcac-server restart.

The above steps should get you to a position where you are ready to modify the vRA e-mail templates as needed, and changes to these templates going forward will take effect without needing to restart the service, but might take up to 2 minutes to see the changes.

Let’s move toward our target, I wanted to show you how you add custom properties to these e-mails. The template you will need to modify for this purpose is found at:  /vcac/templates/email/html/extensions/defaults/csp.places.iaas.forms.vm

To add a custom property to your approval e-mail all you have to do is to add something with similar syntax below to the end of the csp.places.iaas.forms.vm:

costcenter: #valueOf(‘costcenter‘)

In the above the part in Red is just text to indicate to the viewer what the value I am displaying is about, where the value in blue is the actual name of the custom property where it has to exactly match the way I have it in vRA. Below is what my Blueprint look like in vRA and then what the end of my csp.places.iaas.forms.vm file looks like:

vrealize automation 62 costcenter custom property

vRA 62 adding custom property to approval e-mail

Below is what my approval e-mail look like with the extra costcenter custom property value:

vRA approval request e-mail including the cost center custom property

As you can see my cost center has been added to the approval request e-mail, and while not pretty and out of format, I wanted to keep this post as simple as possible by showing only the required changed to add the value, but you can always add the html formatting afterward and get your added custom property to look exactly the same as the out of the box values.

Please note adding custom properties in this fashion to vRA e-mails is only supported in vRA 6.2 and higher.

There is ton of other more advanced changes/tricks you can do to e-mail templates in vRA 6.2 and higher and the below few articles/KBs that should get you started.

Additional Resources for more advanced e-mail customization:

VMware KB: Examples for customizing email templates in VMware vRealize Automation

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2088805

Enhancing User Experience: Customization of vRealize Automation 6.2.x Email Notifications | VMware vSphere Blog – VMware…

Comments

  1. Hi,

    Nice and helpful post..
    My concern is regarding the request id …i can’t see the request id in mail not in subject of mail..
    How can retrieve request id vale and Add in template ..

    Please provide me your input

  2. Hi Shilpa, Unfortunately, you can’t as its not a part of the request form. The only fields that you can incorporate in approval e-mails is the ones you see in the request form. Hope that help.

Speak Your Mind

*

Sponsors