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 the first working day in a month

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

“Is there a way to trigger Power Automate flow only once a month on the first working day, no matter what day it is?”


There’re already posts on trigger a flow on a specific day in a specific week in a month, or by the end of a month. What about another alternative in the form of a first weekday in a month? If the 1st is a weekday, send in on that day, but if it’s Saturday or Sunday, wait for Monday.

Start from 1st

The easiest situation would be if the 1st is already a weekday. You don’t have to evaluate anything, you just run the flow. Let’s add it as the first condition, and to make it shorter let’s reverse it – it’s the 1st day and it’s not Saturday nor Sunday.

Firstly, check that the day part from today’s date is 1.

equals(int(utcNow('dd')),1)

Secondly, check that the day is not Saturday.

not(equals(dayOfWeek(utcNow(),6)))

Thirdly, check that the day is not Sunday.

not(equals(dayOfWeek(utcNow(),0)))

Now combine it all together using the and(…) expression.

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

Send it on 2nd if 1st was Sunday

The other situation that could happen is that 1st is on Sunday, therefore, the flow should be triggered on Monday.

Check if the day part of the date is 2.

equals(int(utcNow('dd')),2)

And at the same time the day is Monday, otherwise it’d trigger on every 2nd day.

equals(dayOfWeek(utcNow(),1)

Again, put it together using the and(…) expression.

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

Send it on 3rd if 1st was Saturday

The last situation is if the 1st day was Saturday, in that case you want to send it on Monday 3rd. Following the same logic as before, check that the day is 3…

equals(int(utcNow('dd')),3)

…and the day is Monday.

equals(dayOfWeek(utcNow(),1)

Combining them together:

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

Build the final trigger conditions

The conditions above covered all situations:

  1. If it’s the 1st day and it’s not Saturday and Sunday, run the flow
  2. If it’s the 2nd day and it’s Monday, run the flow as 1st day was Sunday
  3. If it’s the 3rd day and it’s Monday, run the flow as 1st day was Saturday

This time you must connect them with the OR(…) expression as it must always fit into one of the options:

or(
   and(equals(int(utcNow('dd')),1),not(equals(dayOfWeek(utcNow(),6))),not(equals(dayOfWeek(utcNow(),0)))),
   and(equals(int(utcNow('dd')),2),equals(dayOfWeek(utcNow(),1))),
   and(equals(int(utcNow('dd')),3),equals(dayOfWeek(utcNow(),1)))
)

Add the @ before the expression and use it as a trigger condition.

Power Automate trigger first working day

Summary

You can trigger Power Automate flow on the first working day in a month if you check all the possible situations. If the 1st day is a working day, trigger the flow right away. The only situations when it should be delayed is if it’s Saturday or Sunday, in that situations you want to send it on Monday. Either Monday the 2nd or Monday the 3rd.


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.

5 thoughts on “Trigger Power Automate flow on the first working day in a month”

  1. Seb says:
    December 7, 2022 at 9:10 pm

    Awesome, Tom! Best Power Automate collection out there.

    Reply
  2. Joseph says:
    December 9, 2022 at 3:26 pm

    Hello Tom, would it be possible to modify this set up so that it only triggers on certain working days in the month instead of the 1st (for example: the 3rd or 4th working day in the month)? I’m interested to see if this is possible.

    Thank you!

    Reply
    1. Tom says:
      January 9, 2023 at 3:33 pm

      Hello Joseph,
      there’s an article to do the same for up to 5th working day in a month, after that it gets a lot more complicated: https://tomriha.com/trigger-power-automate-flow-on-a-specific-working-day-up-to-5th/

      Reply
  3. Chris says:
    December 19, 2022 at 3:03 pm

    When reading this I originally assumed you set the recurrence to trigger on 1st of the month, but am I right in thinking that if the 1st is a Saturday or Sunday it will trigger on the 1st, assess the conditions and then because it is not a Monday it will exit, then not trigger again until the 1st of the following month? So essentially only running the full flow if 1st is a Monday?

    I now presume you need the recurrence to be daily, then when one of the conditions is true (only one can be true per month) it will then trigger the full flow? Appreciate your clarification.

    Reply
    1. Tom says:
      January 9, 2023 at 3:48 pm

      Hello Chris,
      it’s exactly as you described, daily recurrence in the trigger and the condition will let it run only once per month.

      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