- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 02:57 AM
My question is if I have to send lets say 3 reminder email for a particular RITM until it is approved , do i have to create 3 different notifications stating Reminder 1,2,3?
in the body or subject line we would like to add that it's a reminder email but i am not sure if there's any way where i can utilize current notification for reminder purpose also ,or do i have to create different template for all 3 reminders?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 03:24 AM
@Shivangi Singh2
In the param 1 or param 2, pass the stringified JSON objects.
{
"approver": "Approver detais",
"subject": "Reminder 1"
}
Then in your email script, parse the JSON and use it as required.
var obj = JSON.parse(event.param2);
var approver = obj.approver;
var subject = obj.subject;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2025 03:41 AM
Hello @Shivangi Singh2 ,
You only need a single Notification. You can pass the reminder number as a parameter and then based on whether it's 1, 2 or 3 you can have different subjects or messages in the email.
Example:
Create an Email Script, e.g. "my.approval.reminder":
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var parameters = JSON.parse(event.parm1);
var reminderNumber = parameters.reminderNumber;
email.subject = 'Reminder #' + reminderNumber;
if (reminderNumber === 1) {
template.print('This is the first reminder.');
}
})(current, template, email, email_action, event);
Include the above Email Script in the Message field of the Notification:
${mail_script:my.approval.reminder}
Then trigger the event that triggers the above Notification like this:
var parameters = {
ritmSysId: '...',
reminderNumber: 1
};
var approverSysId = '...';
gs.eventQueue('my.approval.reminder', current, JSON.stringify(parameters), approverSysId);
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2025 01:41 AM
Thank you all for the help!!