How to trigger Flow yearly basis ?

Mahesh23
Mega Sage

Hello community,

Is this possible to trigger flow yearly basis ? 

For example : Flow should trigger on Jan 1 at 12 PM every year.

 

Thanks

6 REPLIES 6

Stewe Lundin
Mega Guru

But you can only trigger repeat 'n' days.

If you choose repeat every 365 days, the next run happens in the coming 365 days from the date of flow creation, it doesn't solve for the need to trigger every year on a particular date.

Do you have a solution to it please ?

-Swetha.CN

Hello,

You can use below steps.
Trigger : Run on 1st day of every Month.
Use If condition action as a first step and use below script

 

var currentDate = new GlideDateTime();

if (currentDate.getMonthLocalTime() == 1 && currentDate.getDayOfMonthLocalTime() == 1) {
    //code to run on January 1st of every year
    return true;
}

return false;

 

 You can adjust script and trigger according to your need.

I hope this solves your issue.

Hi, did you find the solution to make your flow run 1x per year on a certain date?  The IF action doesn't have a place for a script; only a data pill.  Thank you for any help!