How to Add Approve/Reject Buttons in Email Notification for RITM Approval?

tilekarnilesh
Giga Guru

Hi everyone,

I'm working on automating the approval process for RITMs (Request Items) and want to include Approve and Reject buttons directly within the email notification sent to approvers.

So far, I’ve created an email notification triggered when an RITM enters the "Waiting for Approval" state, but I'm unsure how to embed actionable buttons for approval and rejection that update the RITM approval status directly from the email.

Key goals:

Add functional Approve/Reject buttons inside the email.

Ensure action is captured correctly in the RITM approval record.

Avoid using generic script templates unless necessary.

If anyone has already implemented this or can share a clean and working method (mail script, link structure, or built-in feature), it would be a great help!

Thanks in advance!

5 ACCEPTED SOLUTIONS

Chaitanya ILCR
Kilo Patron

Hi @tilekarnilesh 

 

check this blog

Approve/Reject button in Approval notification

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

Ankur Bawiskar
Tera Patron
Tera Patron

@tilekarnilesh 

There is already an OOTB email which is sent when approval is requested for RITM, why to create new one?

You can check link shared by @Chaitanya ILCR to see how to include buttons instead of link in approval email.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hi @tilekarnilesh 

you can refer code of OOB notification as well
Requested item approval assigned

ChaitanyaILCR_0-1750078568919.png

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

View solution in original post

@tilekarnilesh 

then this is the existing OOTB email notification, make changes to it as per above link

AnkurBawiskar_0-1750078799388.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

Hi @tilekarnilesh ,

has instance received that email?
usually email reception and sending is disabled in sub prod instance

 

if your instance has received it check the email logs again

 

if you are still facing the issue could you please open a new thread (post a new question) 

and tag us there with few more details?

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

19 REPLIES 19

Ankur Bawiskar
Tera Patron
Tera Patron

@tilekarnilesh 

There is already an OOTB email which is sent when approval is requested for RITM, why to create new one?

You can check link shared by @Chaitanya ILCR to see how to include buttons instead of link in approval email.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar I want to add Approve and Reject buttons to the existing notification, not create a new on just modify the current one.

@tilekarnilesh 

then this is the existing OOTB email notification, make changes to it as per above link

AnkurBawiskar_0-1750078799388.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 
need a help 

tilekarnilesh_0-1750158299260.pngtilekarnilesh_1-1750158350456.png

tilekarnilesh_2-1750158389586.png

trying this but its not populated on email after calling in email script..

Hi @tilekarnilesh ,

have you created script include? with name =  renderMailtoButton

 

ChaitanyaILCR_0-1750159792816.png

 

code

function renderMailtoButton(image, response, emailbod){
	
	var instance = gs.getProperty("instance_name");
	var link = "https://" + instance + ".service-now.com";
	var mark = email.watermark;
	var number = current.number;
	var emailAddress = instance + "@service-now.com";
	if (current.getTableName().indexOf("sysapproval") != -1){
		number = current.sysapproval.number;
		}
			var mailLink = '<a href="mailto:'+ emailAddress + '?subject=Re:' + number + ' ' + response +'&body=' +  emailbod +  mark + '"><img src="' + link + image + '"></a>';
	return mailLink;
	
}

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya