Buttons in Email which update fields in my custom table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 08:40 AM
Hi all,
i have requirement, i need to send email to user, the email will contain two buttons, yes and no, if user click on yes or no there is a field in my custom table will be updated. How i can do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 09:10 AM
Hello,
Take a look at OOB notification on Incident table, you'll have a mailscript called take_me_to_incident.
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 09:19 AM
i have created custom email notification in which i attach the link of article, for this i used flow designer, but i want to add buttons to the same email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 09:21 AM - edited 10-05-2023 10:42 AM
Hi @Mahmood Ahmad ,
1. Create two email templates "email.yes" & "email.no"
2. In your notification, add ${mailto:email.yes} & ${mailto:email.no} to click on both responses.
3. Create two inbound actions to capture both responses. Below screenshot shows Yes response.
Under Actions in inbound email action, select your field which has to be updated
User will receive both links in email and after clicking any one, he/she has to send the email. And that should update your record.
Please mark my answer as correct or helpful, if it helped.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2023 10:34 AM
Hi @Mahmood Ahmad ,
I can relate to your requirement where we want to take consent of user in the Yes or No buttons and it should update the necessary info into the ServiceNow.
But unfortunately there is no OOTB functionality for this. we do have something called as actionable Outlook items which will allow users to react from the email itself like approve/reject. But making your own action will require efforts and will be out of scope.
For more information - Outlook actionable messages
As a work around, I can suggest a solution which we implemented. you can create a static links which will create a new draft mail and then have a inbound action in system which works on the subject of email, e.g. as follows:
<a class="btn btn-danger btn-opt-out" role="button" href="mailto:your_instance@service-now.com?subject=Opting out of Survey&body=Hi,%0DI have decided to opt out of the survey. Kindly remove me from the reminder list.%0D%0DNote: Pease don’t modify/delete the subject of email. It is important to record your response.">Opt-out</a>
You can also dynamically pass the data in subject and body while sending notification as follows
<a class="btn btn-primary btn-accept" href="/nav_to.do?uri=%2Fassessment_take2.do%3Fsysparm_assessable_type=ff6a9e4547ac7d10890774ab716d4385%26sysparm_assessable_sysid=${sys_id}">Accept and Proceed</a>
Here I am passing the sys_id dynamically, you can pass any data such as the record sys Id which you want to update from custom table.
Please mark my answer as helpful/correct if it resolves your query.
---
Nilesh Wahule