Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Triggers
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Planner
    • Outlook
    • SharePoint
    • Teams
  • Resources
  • Get help with flow
Menu

Trigger Power Automate flow on a specific working day (up to 5th)

Posted on December 11, 2022December 11, 2022 by Tom

“Can I apply the ‘first working day’ solution also to another specific day, e.g. trigger Power Automate flow on the 4th working day?”


The previous post described how to trigger a Power Automate flow on the first working day in a month, but what if you want a different day? If it shouldn’t be the first day as it’s often busy but a later day, e.g. the 4th day in a month? Can the solution be adjusted? How?

Note: this solution won’t skip holidays as I’m not aware of any way to check holidays before triggering a flow. It’ll also work only up to the 5th working day including max. 1 weekend.

The idea stays the same

The logic behind the trigger condition stays the same – if the day is in a weekday, trigger the flow. If it’s Saturday or Sunday, wait until the next Monday.

Power Automate trigger specific working day

Change the number for date

The only difference from the original article is in the numbers that identify the date.

and(equals(int(utcNow('dd')),<whichDay>),not(equals(dayOfWeek(utcNow(),6))),not(equals(dayOfWeek(utcNow(),0))))

To send it on the 4th day:

and(equals(int(utcNow('dd')),4),not(equals(dayOfWeek(utcNow(),6))),not(equals(dayOfWeek(utcNow(),0))))

Change it also for Sundays…

The same applies also to the conditions when the date was Saturday or Sunday – you must increment the date. If the day ends up being a Sunday, you want to send it on the following Monday, the planned date + 1 day.

and(equals(int(utcNow('dd')),<whichDay+1>),equals(dayOfWeek(utcNow(),1)))

For the 4th day it’ll be 5, e.g.

and(equals(int(utcNow('dd')),5),equals(dayOfWeek(utcNow(),1)))

… and for Saturdays

If it takes 1 extra day for Sundays, for Saturdays it takes 2. Take again the day number, and this time increment it by 2.

and(equals(int(utcNow('dd')),<whichDay+2>),equals(dayOfWeek(utcNow(),1)))

To follow with the 4th day example, the number will be 6 this time.

and(equals(int(utcNow('dd')),6),equals(dayOfWeek(utcNow(),1)))

Put it all together

All that’s left is to put all the conditions together in a single trigger condition.

@or(
   and(equals(int(utcNow('dd')),<whichDay>),not(equals(dayOfWeek(utcNow(),6))),not(equals(dayOfWeek(utcNow(),0)))),
   and(equals(int(utcNow('dd')),<whichDay+1>),equals(dayOfWeek(utcNow(),1))),
   and(equals(int(utcNow('dd')),<whichDay+2>),equals(dayOfWeek(utcNow(),1)))
)

Summary

If you want to trigger Power Automate on a specific working day, you have to use the various dates involved. The first one is the actual day, what’s the default scenario if it’s during the workweek. The second one is the date+1 for situations when the original date ends up being Sunday. And the last one is the date+2 to cover for Saturdays. Once you add these 3 numbers in the trigger condition you should be able to trigger the flow on any specific day working day in a month.

But don’t forget that this solution will work only for the 1st 5 working in a month as it includes only 1 weekend! A generic solution would look similar to this post, which I might cover in the future.


Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

1 thought on “Trigger Power Automate flow on a specific working day (up to 5th)”

  1. Johannes says:
    December 21, 2022 at 1:27 am

    great article thank you very much

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Do you know what to do, but not how to do it?

Get The Ultimate Power Automate expressions cheat sheet and translate your thoughts into flows with ease!


NEW! Master the HTTP requests to SharePoint with a new cheat sheet!

Do you struggle with the various expressions, conditions, filters, or HTTP requests available in Power Automate?

I send one email per week with a summary of the new solutions, designed to help even non IT people to automate some of their repetitive tasks.

All subscribers have also access to resources like a SharePoint Filter Query cheat sheet or Date expressions cheat sheet.

Zero spam, unsubscribe anytime.

Hello and welcome!

My name is Tom and I'm a business process automation consultant and Microsoft MVP living in the Czech Republic. I’ve been working with Microsoft technologies for almost 10 years, currently using mainly Power Automate, SharePoint, Teams, and the other M365 tools.

I believe that everyone can automate part of their work with the Power Automate platform. You can achieve a lot by "clicking" the flows in the designer, but you can achieve much more if you add a bit of coding knowledge. And that's what this blog is about.

To make the step from no-code Power Automate flows to low-code flows: using basic coding knowledge to build more complex yet more efficient flows to automate more of your daily tasks.

  • Use Power Automate to forward Outlook events upon registrationJanuary 29, 2023
  • Why the condition is false for the same numbers (Power Automate)January 25, 2023
  • How to forward event invitation to other calendar (Power Automate)January 22, 2023
  • Run ‘For selected item’ flow from non-default environment (Power Automate)January 18, 2023
  • Hide button in SharePoint list after Power Automate flow startedJanuary 15, 2023

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes