How to Schedule a Salesforce Flow Annually
Sep 08, 2024A colleague asked this week, "Can flows be scheduled to run annually? Or do I need an Apex Trigger for that?"
Good question.
At first glance, it looks like there is no annual option in a Scheduled Flow.
But there is a workaround!
Pretend we want our Flow to run once a year on Account records.
We can make a formula field on the Account object that returns TRUE when today is the day our Flow should run, and false every other day of the year.
With this formula created we can use it as a condition in our Scheduled Flow Start element:
That's it.
We configure our Flow to run daily and find any records where this formula field is true.
364 days a year it runs and finds zero records so it does nothing.
And on the 365th day, it runs and finds all the Accounts we want to perform some logic on, and runs the logic.
Magic!
We can of course add in additional entry criteria to better target certain records we're looking to run the Flow on — but the formula field remains the key.
And that's a wrap for this week.
Hope this helps you at some point in the future :)
Best,
Nick
SalesforceĀ Saturdays
Join the Salesforce Saturday newsletter. Every Saturday, you'll get 1 actionable tip on Salesforce technology or career growthĀ related to the Salesforce Industry.
We hate SPAM. We will never sell your information, for any reason.