How to add button in email script

avinashdube
Tera Guru

Hi i AM TRYING TO ADD A BUTTON IN EMAIL SCRIPT AND  then adding a email script on the button 

but it is not working 

the button should be clickabale

 

  <div style='height:30px;'>&nbsp;</div> <div><span style='color: #324450;'><button style='color: #324450;'> ${mailto:mailto.approval.accept}</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='color: #324450;'>${mailto:mailto.rejection.accept}</button></span></div>  
2 REPLIES 2

Simran Gadodiya
Mega Sage

Hi @avinashdube 

 

In notification script you can add html as below

template.print('<a href="LINK HERE" >button</a>');

 

email notification script documentation for reference:

https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/new_to_servicenow/app_store_lear...

 

Thanks.
Mark This helpful and correct if it helps you.

Learn how to build configurable workspaces from scratch in ServiceNow in this informative session. Whether you're working with App Engine Studio or starting fresh, we provide essential steps and use cases for creating custom workspaces that meet your needs. #Servicenow #Workspaces #AppEngineStudio

shyamkumar VK
Mega Patron

@avinashdube , 

 

Try this 

<div style='height:30px;'>&nbsp;</div>
<div>
    <span style='color: #324450;'>
        <a href='mailto:mailto.approval.accept'><button style='color: #324450;'>Accept</button></a>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <a href='mailto:mailto.rejection.accept'><button style='color: #324450;'>Reject</button></a>
    </span>
</div>

Also Refer to this Article 

https://www.servicenow.com/community/itsm-blog/approve-reject-button-in-approval-notification/ba-p/2....

 

Regards,

Shyamkumar