email template

sola2
Tera Contributor

I have created a personalized email template and email notification to trigger for the "ask approval" of a specified catalog item; however, when sent, it looks like this: 

sola2_0-1707836534254.png

If I use the already existing email template "change.itil.approve.role", it does look as it is supposed to:

sola2_1-1707836635078.png

 

Can someone provide advise on this?

Here is my email template:

<div>Short Description: ${sysapproval.short_description}</div>
<div>Requestor: ${sysapproval.variables.requested_by}</div>
<div> Project/Account: ${sysapproval.variables.project_account}</div>
<div>E-Voucher Type: ${sysapproval.variables.e_voucher_type}</div>
<div>E-Voucher Brand: ${sysapproval.variables.e_voucher_brand}</div>
<div>E-Voucher Amount: ${sysapproval.variables.e_voucher}</div>
<div>Quantity: ${sysapproval.variables.quantity}</div>
<div>E-Voucher Price: ${sysapproval.variablese_voucher_price}</div>
<div>Comments: ${sysapproval.variables.comments}</div>
<div>&nbsp;</div>
<div>
<div><hr /></div>
</div>
<div>${mail_script:change_request_summary}</div>
<div>&nbsp;</div>
<div>Comments:</div>
<div>${sysapproval.description}</div>
<div>
<div><hr /></div>
</div>
<div>${mailto:mailto.approval}</div>
<div>
<div><hr /></div>
</div>
<div>${mailto:mailto.rejection}</div>
<div>
<div><hr /></div>
</div>
<div>Approval Activity:</div>
<div>${mail_script:approval_activity}</div>
<div>
<div><hr /></div>
</div>
<div>Click here to view Approval Request: ${URI+&amp;sysparm_record_target=sysapproval_approver}</div>
<div>Click here to view ${sysapproval.sys_class_name}: ${sysapproval.URI}</div>

2 ACCEPTED SOLUTIONS

Servicenow34
Tera Guru

Hi @sola2 ,

Kindly try without <div> tag.

 

Kindly mark helpful if assists.

Thank you!

 

 

View solution in original post

Mark Manders
Mega Patron

You are writing your HTML text including the HTML tags, so that will create the text as you write it. In the existing one, you are looking at it from your own scope, in the message field (not the HTML message). The 'Message HTML' field will take care of all the formatting for you.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

View solution in original post

9 REPLIES 9

Did you try that? Is it working now?

Mark Manders
Mega Patron

Your email template is just showing your HTML as text. Where's the rest of the HTML code? Can you check with your existing one, what you are missing?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

@Mark Manders already checked it against the already existing one, but I do not see any differences. Please see the screenshots bellow:

This is the already existing one:

sola2_0-1707838581690.pngsola2_1-1707838617022.png

What is marked in blue, is what I added to the existing one. If I use that template on my notification it does work with out issues.

Here is the one I created:

sola2_2-1707838813015.png

sola2_3-1707838834499.png

As you can see, they are exactly the same. But for some reason the personalized one is not working.

Servicenow34
Tera Guru

Hi @sola2 ,

Kindly try without <div> tag.

 

Kindly mark helpful if assists.

Thank you!

 

 

Mark Manders
Mega Patron

You are writing your HTML text including the HTML tags, so that will create the text as you write it. In the existing one, you are looking at it from your own scope, in the message field (not the HTML message). The 'Message HTML' field will take care of all the formatting for you.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark