cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dan_B
Helper I
Helper I

How to build a flow that will only trigger when 10 days has been reached, excluding weekends

Hello Powerautomate gurus,

 

Myself and a colleague are currently trying to build a flow in power automate.

 

It's a chaser e-mail, and the idea is that once the 'Info requested' field is 10 days old, and the 'Info returned' field is null, it will send an e-mail template containing dynamic data to the primary contact.

 

Initially the spec was just 10 calendar days, but they are now asking for 10 working days.

 

We're trying to initialize variables for the day count, and then use a Do loop, to get this up to 10, but currently we can't quite get it functioning as we need.

The crux of it is that the values for Saturday and Sunday are 0  & 6, so if a day comes up with that value it is not counted.

If it is, then it increments the variable, until it reaches 10.

And also we haven't even begun to tackle the issue of bank holidays at all.

 

Is there any method people on here have used with success, as I suspect this must be a fairly common requirement?

 

Thanks in advance

 

Dan

3 REPLIES 3
MarvinBangert
Super User
Super User

Hey @Dan_B 

unfortunately, we don't have a trigger for this yet (as far as I know), but I once had a similar question and wrote a short Blog article about how to calculate and exclude weekends: Power Automate - Add Business Days to Date (Excludes Weekends) | CLOUD KUMPEL

 

So, you would need to run the flow every day, calculate the days without the weekends as in the article and then use a condition.

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

Dan_B
Helper I
Helper I

Thankyou @MarvinBangert, I will have a look at that over the next day or so, but it looks like it might well be exactly what we need 🙂

 

I will feedback in due course 👍

takolota
Super User
Super User

@MarvinBangert & @Dan_B 

 

And if you’re doing this with a lot of records, you could put that formula in the left side of a Filter Array conditional with item()?[‘DateColumn’]. And set that conditional to greater than 9.

 

That way it’s much faster & more efficient.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,227)