- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 05:03 AM
Hi All,
Requirement : A notification needs to be triggered when ever a automation case gets created, this table is a custom table which extends the task table and it should be below format.
Dear Requestor,
Your Case has been opened: <Automation number>.
Your list of Automation Cases is accessible here <link>.
---This is automated alert mail from automated mailbox, please do not answer ---
Best Regards
Automations.
Here in the notification, I have to provide a link which have the list of Automation cases raised for that particular user (requested for should be that user). I'm not sure how to achieve this. Can anyone please guide me on this.
Thanks in Advance,
Nagashree.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 06:51 AM
Hello @Nagashree5
To make a clickable hyperlink via a notification script, refer to the example below:
sample notification script:
(function runMailScript(current, template, email, email_action, event) { // Build the link format var attachLink = '<a href=/sp?id=ticket&sys_id=' + current.sys_id; attachLink += '&table=' + current.getRecordClassName(); attachLink += '>Portal</a>'; // Print the link text template.print(attachLink); })(current, template, email, email_action, event);
And yes. Triggering the email when the event is fired is the best approach in such scenarios.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 02:01 AM
Hi @SatyakiBose ,
Thanks for the response.
I have written the email script like below.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var sid = current.variables.assignment_group;
var url = gs.getProperty('glide.servlet.uri') + 'x_932770_automation_case_list.do?sysparm_query=active=true^assignment_group=' + sid;
template.print(url + "<br />");
})(current, template, email, email_action, event);
And I have created the Notification like below.
${mail_script:listofautomationcases}
Dear Assigned to: ${assigned_to},
Your Case has been opened: Number: ${number}.
Your list of Automation Cases is accessible here url.
---This is automated alert mail from automated mailbox, please do not answer ---
Best Regards
Automations.
I have called the email script in the notification like above, How do I place the URL in the list of automation cases above in the notification, Also, do I need to create an event and BR to trigger this. Could you please guide me .
Thanks so much,
Nagashree.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 02:04 AM
Hi @SatyakiBose ,
Thanks for the response.
I have written the email script like below.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var sid = current.variables.assignment_group;
var url = gs.getProperty('glide.servlet.uri') + 'x_932770_automation_case_list.do?sysparm_query=active=true^assignment_group=' + sid;
template.print(url + "<br />");
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 02:05 AM
Hi,
Thanks for the response. I have used the above same code and wrote a email script and I have created the Notification like below.
${mail_script:listofautomationcases}
Dear Assigned to: ${assigned_to},
Your Case has been opened: Number: ${number}.
Your list of Automation Cases is accessible here url.
---This is automated alert mail from automated mailbox, please do not answer ---
Best Regards
Automations.
I have called the email script in the notification like above, How do I place the URL in the list of automation cases above in the notification, Also, do I need to create an event and BR to trigger this. Could you please guide me .
Thanks so much,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 08:08 AM
Hello @Nagashree5 ,
To Complete this Post , Please use the notification script in your notification
You need to call the notification script : ${mail_script:script name}
This will work then.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 02:02 AM
Hi @SatyakiBose / @Amarjeet Pal
Thanks for the response.
I have written the email script like below.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
var sid = current.variables.assignment_group;
var url = gs.getProperty('glide.servlet.uri') + 'x_932770_automation_case_list.do?sysparm_query=active=true^assignment_group=' + sid;
template.print(url + "<br />");
})(current, template, email, email_action, event);
And I have created the Notification like below.
${mail_script:listofautomationcases}
Dear Assigned to: ${assigned_to},
Your Case has been opened: Number: ${number}.
Your list of Automation Cases is accessible here url.
---This is automated alert mail from automated mailbox, please do not answer ---
Best Regards
Automations.
I have called the email script in the notification like above, How do I place the URL in the list of automation cases above in the notification, Also, do I need to create an event and BR to trigger this. Could you please guide me .
Thanks so much,
Nagashree.