flow to send notification

abhi159
Kilo Sage

in table i have date field on this basis i want to create a flow to send notification before 30 days of the selected

date and also 15 days before 

3 REPLIES 3

Tai Vu
Kilo Patron
Kilo Patron

Hi @abhi159 

Let's try these steps.

1. Create a Flow with Trigger on Daily.

2. Add the Look Up Records action. Set condition as Date relative before 30 (15) days ago.

3. Add flow logic For Each records from step 2.

4. Use the Send Notification or Send Email action.

 

Cheers,

Tai Vu

ITS NOT SEND NOTIFICATION IT IN  WAITING  STATE FOR 30 DAYS BRFORE THE SELECTED DATE LIKE I SELECTED DATE IS 3 DEC SO NOTIFICATION WILL SEND ON 3 NOV BUT IN FOR EACH ITS SHOWS 0 RECORDS OR I AL READY INSERTED THE DATA WITH 3 DEC DATE BUT STILL WAITING FOR NOTIFICATION

 

Hey @abhi159 

Try to replace the condition in your step Look Up Records by the script below.

var gdt = new GlideDateTime();
gdt.addDaysUTC(30);
//Replace the resolved_at below by your date field
var query = "resolved_atON{date}@javascript:gs.dateGenerate('{date}','start')@javascript:gs.dateGenerate('{date}','end')";
query = query.replaceAll('{date}', gdt.getDate());
return query;

 

Check out my test case.

TaiVu_0-1699002267193.png

TaiVu_1-1699002271158.png

 

Cheers,

Tai Vu