E-mail notification script Button not redirecting me to the respective record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 10:20 AM - edited 01-24-2025 11:26 AM
Hello
I have created e-mail notification script, to create a button and using in inbound actions. On click of button it is not redirecting me to the concern page
It is populating the URL twice as mentioned in screenshot.
Ex: dev111.service-nos.com/dev111.service-now.com/api/now...........
Could someone help me where I'm doing mistake
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 12:47 PM
We typically achieve this using a link (or a button) in the body of the email to send an email to the instance, then process the email with an inbound email action (see: https://www.servicenow.com/docs/bundle/xanadu-platform-administration/page/administer/notification/c...).
The email script would look something like this:
template.print('<a href="mailto:' + gs.getProperty('instance_name') + '@service-now.com?subject=Accept&body=Solution%20Accepted%0ARef:' + email.watermark + '">successful</a>');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 01:16 PM
subject=Accepted&body=Solution%Accepted%0Ref . What does this mean in not able to get this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2025 01:19 PM
I'm not sure if mailto links work in the forum here...try this: successful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2025 03:45 AM
Hello @anvitha ash
Do check my response over thread as this is same duplicate question asked.
Re: How to add button in email notification - Page 3 - ServiceNow Community
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.
Thanks & Regards
Viraj Hudlikar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 05:36 AM
Hello @anvitha ash
I believe you are doing well.
Did you check the response over thread I already shared. https://www.servicenow.com/community/developer-forum/how-to-add-button-in-email-notification/td-p/31...
If my response has helped you hit helpful button and if your concern is solved do mark my response as correct so it will benefit other community users.
Thanks & Regards
Viraj Hudlikar.