VMware Cloud Community
Czernobog
Expert
Expert

Editing e-mail notifications - velocity templates

Hi,

I know that this topic has been picked up before. Since vCAC 6 the old e-mail templates on the vCAC Server are, for the most part, not being used anymore. The notifications sent out by vCAC are composed usind the velocity templates, located on the vCAC Appliance under /usr/lib/vcac/server/webapps/notification-service/WEB-INF/classes/templates

The e-mail generated using those templates lack a lot of information and I would like to include some vm properties (like name, owner, dc location, vm folder etc) with them. So far I have succeeded only in adding some text into the /usr/lib/vcac/server/webapps/notification-service/WEB-INF/classes/templates/email/html/extensions/csp.places.iaas.forms.vm. After restarting the vcac service the new text is shown in the notifiaction e-mail. I've tried to include a new property in the e-mail, for example VirtualMachine.Admin.Name, the property is assigned to the VM as soon as the request is submitted. I've defined a new variable in the csp.places.iaas.forms.vm file, using the same syntax as the rest of them found in the file. After saving and resetting the vcac service the new notifications don't include the change. I've tried the same for the UUID and the VM Owner Name, with no success.

I don't really know my way around the templates (altohugh it seems simple) and the official documentation doesn't include any information about them.

Any useful information is greatly appreciated, this problem is driving me nuts lately:/

Reply
0 Kudos
5 Replies
derekattivio
Contributor
Contributor

Hi,

Did you ever figure this out? I'm trying to do the same (getting IP address added to the notification mail) and coming up nothing but frustrated.

Let me know!

Reply
0 Kudos
willonit
Hot Shot
Hot Shot

Curious if there has been anything else discovered on this topic. Is there a way to force it to use the old templates?

Reply
0 Kudos
derekattivio
Contributor
Contributor

it seems like the workaround is what is posted here:  Send Custom Notification   I haven't had a chance to get this to work yet as I'm still new to VCO workflows.  It's extremely frustrating to say the least.

Reply
0 Kudos
MacquarieCloudO
Contributor
Contributor

By any chance have you checked this out? VMware KB: Customizing email templates in VMware vRealize Automation

Also some of the velocity templates seem to have useful sections commented out, but can be used as reference. Not ideal but it's a good place to squeeze out info from.

Reply
0 Kudos
willonit
Hot Shot
Hot Shot

This thread was started with vCAC 6.0. To my understanding, the modifications in the KB are relevant to 6.2.

Reply
0 Kudos