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

Maddysunil
Kilo Sage

@sola2 

Please try updated code below

<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.variables.e_voucher_price}</div>
<div>Comments: ${sysapproval.variables.comments}</div>
<div>&nbsp;</div>
<div><hr /></div>
<div>${mail_script:change_request_summary}</div>
<div>&nbsp;</div>
<div>Comments:</div>
<div>${sysapproval.description}</div>
<div><hr /></div>
<div>${mailto:mailto.approval}</div>
<div><hr /></div>
<div>${mailto:mailto.rejection}</div>
<div><hr /></div>
<div>Approval Activity:</div>
<div>${mail_script:approval_activity}</div>
<div><hr /></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>

 

Please mark my response correct/Helpful if it helps you.

Thanks

sola2
Tera Contributor

@Maddysunil Just test it as recommended, but same issue

sola2_0-1707838385378.png

 

@sola2 

There should be a button switch to rich text, click on that and the copy the code from OOO email template and paste in your email template, then validate once.

sola2
Tera Contributor

@Maddysunil it is