how to send 2 different email to different people.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 10:02 PM - edited 04-16-2025 10:08 PM
I have an issue to create a workflow and notification as per below scenario.
scenario 1
1. user submit catalog request.
2. 1st email approver is to HOD number 1 with different email content.
3. Approved by the 1st email approver which is the HOD number 1.
4. 2nd email approver is to HOD number 2 with different email content.
5. Approved by the 2nd email approver which is the HOD number 2.
6. email notification send to the requester.
I have created 2 email notification.
1st email approver is HOD number 1.
2nd email approver is to HOD number 2.
I attach the workflow and notification for your reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:51 PM
you are already having condition then don't give any script in advanced notification script section
I forgot that part.
Simply create email script and add in your new notification and print the content based on 1st approval or 2nd approval
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:54 PM
Hi Ankur,
How do I do that? please advise.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2025 01:43 AM
in email script check if the current approval is the 1st one, if yes it means you can add your content 1
In email script check if how many approval records are there excluding the current one, if you get count as 1 it means the email has triggered for 2nd approval so give content 2
something like this but please enhance
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
var gr = new GlideRecord("sysapproval_approver");
gr.addQuery("sysapproval", current.sysapproval);
gr.query();
var count = gr.getRowCount();
if (count == 1) {
// this is for 1st approval
// content 1
} else {
// this is for 2nd approval
// content 2
}
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 12:33 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader