Comment
11-13-2023
06:51 AM
- edited
11-13-2023
06:53 AM
11-13-2023
06:51 AM
- edited
11-13-2023
06:53 AM
For this, you would have to do a couple of things:
1. Create the image buttons - You can use an online https://www.photopea.com/ to create those buttons
2. Upload the images to the System UI -- Images
3. Create the 2 mail script to call those buttons
to Approve:
(function(smtpAddress, approvalFor, watermark) {
var instance = gs.getProperty('instance_name');
var emailaddy=instance+"@service-now.com";
var href = 'href="mailto:'+ emailaddy +'?subject=Re%3A%20'+ approvalFor +'%20-%20approve&body= I approve this request'+ watermark +'"';
var anchor = '<a '+ href +'> <img src="button_approver.png" width="182" height="66" alt="Approve"/></a>';
template.print(anchor);
})(gs.getProperty('glide.email.user'), current.sysapproval.getDisplayValue(), email.watermark);To Reject:
(function(smtpAddress, approvalFor, watermark) {
var instance = gs.getProperty('instance_name');
var emailaddy=instance+"@service-now.com";
var href = 'href="mailto:'+ emailaddy +'?subject=Re%3A%20'+ approvalFor +'%20-%20reject&body='+ watermark +'"';
var anchor = '<a '+ href +'> <img src="button_reject.png" width="182" height="66" alt="Reject"/></a>';
template.print(anchor);
})(gs.getProperty('glide.email.user'), current.sysapproval.getDisplayValue(), email.watermark);Then from the notification you called those mail script:
${mail_script:Custom-Approve} ${mail_script:Custom-Reject}