Email Notification Trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 08:18 PM
Hai,
I have an issue in the email notification triggering in the workflow
1. i want to trigger an email to the request person who raised the request and also the approvers who needs to approve that request
2. And also i need after the RITM is in closed state i need trigger an email to the user, opened by and also watchlist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2024 06:16 AM - edited 07-20-2024 06:18 AM
Hi @LakshmanV
1. Trigger Email to Requestor and Approvers:
Create or Modify Notification:
- Table: sc_req_item
- Condition: When request item is created or approval status changes.
Recipients:
- Requestor: Use Requestor recipient type.
- Approvers: Use script to add approvers
var gr = new GlideRecord('sc_req_item');
if (gr.get(current.sys_id)) {
var approvers = gr.approver; // Adjust based on field
notification.recipients.add(approvers);
}
2. Trigger Email After RITM is Closed:
Create or Modify Notification:
- Table: sc_req_item
- Condition: current.state == <Closed State>
Recipients:
- Requestor: Use Requestor recipient type.
- Opened By: Add via script:
notification.recipients.add(current.opened_by.email);
- Watchlist: Add via script:
var watchlist = current.watch_list;
var userGR = new GlideRecord('sys_user');
while (watchlist.next()) {
userGR.get(watchlist.user);
notification.recipients.add(userGR.email);
}
Compose Email: Design email body with request details and completion info.
Save and test each notification to ensure correct operation.
……………………………………………………………………………………………………
Please Mark it helpful 👍and Accept Solution✔️!! If this helps you to understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2024 10:26 AM
Thanks for the Reply
i need this email notification through work flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2024 07:40 PM
Hi @LakshmanV
Please refer this:
https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/workflow-activities/...
https://docs.servicenow.com/bundle/washingtondc-build-workflows/page/administer/workflow-activities/...
…………………………………………..
Mark it helpful 👍and Accept Solution ✅!! If this helps you to understand.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2024 10:33 AM