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 10:43 PM
Hi Addy,
The problem is both email notification was send even the hod 1 has not approved yet and hod 2 already receive an email notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 10:47 PM
Please use send notification activity in workflow, it will be simple and will work properly in your case.
Otherwise if you want to go with your existing work, you can write script in advanced condition and check if any approval for the current record has been approved or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:12 PM
Usually whenever approval is generated an OOTB email notification associated with approval.inserted event triggers
If you want content as per your ITEM then you should do this
1) ensure the OOTB email notification on sysapproval_approver doesn't trigger for your item
var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sysapproval);
gr.addQuery('cat_item.name', "Your Item name");
gr.query();
answer = !gr.hasNext();
2) create a new email on sysapproval_approver and it should trigger when "approval.inserted" event triggers and this should trigger for only your item. use advanced notification condition
var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sysapproval);
gr.addQuery('cat_item.name', "Your Item name");
gr.query();
answer = gr.hasNext();
Next you can attach email script to your newly created notification to handle different content based on level of 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:22 PM
Hi Ankur,
Do u mean the script need to be inserted in the emal notification "Advanced Condition"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2025 11:26 PM
correct in the advanced notification condition field of notification
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