Avoid duplicate record creation in flow designer

Vinith Perla
ServiceNow Employee
ServiceNow Employee

Hi Team,

 

I need help figuring out a logic of how to avoid the duplication of records with a daily flow.

 

The flow runs daily at a set time and checks for all the employees within a set cost center and also whose hire date is 5 days from now(today). It then creats a record in a notification table and sends email notification. Now if this runs daily, I want to avoid duplication of record creation.

Any suggestions on how to avoid that? I tried playing around with the look up records but was unsuccessful in my endeavour. thanks in advances

 

Flow designer.png

2 REPLIES 2

Anup Desai1
Mega Sage

Hi @Vinith Perla 

 

For hire date you can add condition like-

Hire Date is ⬇️

var hire_d = new GlideDateTime();
hire_d.addDays(5);
return hire_d;

 

Voona Rohila
Kilo Patron
Kilo Patron

Hi @Vinith Perla 

Can you share the lookup records condition you used.

You need to check exact 5 days from today records instead of all the records which are greater than 5 days to avoid duplicate sending of emails.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP