Urgent | Help me Write Business Rule. send a Email notification just after 2 hrs of INC creation.

Mayank_Mishra
Tera Contributor
I want to send a Email notification just after 2 hours of Incident creation time. Tried with Condition builder in "when to send " section of notification, also created Event and trying to create Business rule trigger this event just after 2 hours of incident creation. kindly suggest possible way to achieve this requirement either with Email Notification or Triggered by Firing a Event. Help write Business Rule to trigger event Just after 2 hrs of INC creation time.
3 REPLIES 3

Alp Utku
Mega Sage

You can consider using flow designer to satisfy your requirements.

 

https://www.youtube.com/watch?v=2Oy1td1H0BE 

 

https://www.youtube.com/watch?v=nYdhLaX2EOo 

If you want to support me then buy me a coffee- https://www.buymeacoffee.com/saaswnow This is ServiceNow Flow Designer Training. ServiceNow has been marketing themselves as low code platform and in one of the recent release they came up with flow designer feature which has totally changed the way
How to send emails from ServiceNow flow designer? Look no further :). In this short video we look at 3 ways to send emails from within a flow. 1. Email Action 2. Notification Action/Step 3. Trigger an Event (register the event) Send Email action: ...

Sai Kumar P
Tera Guru

Its best to go with Flow designer instead of a Business Rule. Follow the below steps and attaching the Images of the flow for your reference

1. Create a flow with Trigger condition as "Record Created" - Incident.
2. In actions, select "Wait for Condition" - Drag n Drop the Incident record, set conditions to active=true, add 2 hours.
3. In actions, select "send notification" - select the notification that you've created.
4. Complete the flow to automate the notification process.Flow 1.jpgFlow 2.jpg
Please mark as help if your query is resolved.

AnveshKumar M
Tera Sage
Tera Sage

@Mayank_Mishra 

Register an event in your event registry and create your notification with trigger as the event fired and select the event name you created earlier.

 

Then, you can use the following script in your after insert business rule.

 

(function executeRule(current, previous){

   var gdt = new GlideDateTime();

   gdt.addSeconds(7200);

   gs.eventQueueScheduled("YOUR_EVENT_NAME", current, "", "", gdt);

})(current, previous);

 

Please mark my answer helpful and accept as solution if it helped you 👍

Thanks,
Anvesh