Approve and Reject button on email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 09:51 PM
Can somebody help me to create Approve and Reject Button on email notification and on click of approve new email should get populated. How can we achieve this functionality.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 10:11 PM
Hello Roshani,
There is already an existing OOTB notification (check Approval request notification) which gives you links to approve and reject. Check how it works.
And in place of link, you can place mailto with your instance mail address so that a mail dialog opens when click on approve or reject.
Then you have to write an inbound action to handle the incoming mail and based on the subject, you either have to approve or reject.
Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.
Regards,
Asif
2020 ServiceNow Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 11:09 PM
Hi,
Check out the OOB "Update Approval Request" inbound action. All that it is doing is checking the email.subject for the word approve or reject. The links in SN for approvals are mailtos, auto generated reply emails, that have either approve or reject in the subject. If you want this rule to include reply emails that have approve or reject in the body just edit the following 2 lines:
------
if (email.subject.indexOf("approve") >= 0)
current.state = "approved";
if (email.subject.indexOf("reject") >= 0)
current.state = "rejected";
-----
if (email.subject.indexOf("approve") >= 0 || email.body.indexOf("approve") >= 0)
current.state = "approved";
if (email.subject.indexOf("reject") >= 0 || email.body.indexOf("reject") >= 0)
current.state = "rejected";
That should do what you are looking for.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2020 11:45 PM
Hello Roshani,
I can you already have posted same question and you got the answers as well from community members.
Please continue with the same thread that you opened already. It wont help you by creating duplicate thread/ questions.
Thank You!
Abhishek Gardade
ServiceNow MVP 2020
Abhishek Gardade