Let's POWER Automate

From no-code to low-code

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

Trigger Power Automate flow on the first working day in a month

Posted on December 7, 2022March 15, 2023 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.

16 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
  4. Keith says:
    February 1, 2023 at 4:57 pm

    This bit of code is exactly what I have been looking for, however when attempting to run as a trigger it generates an error: Cannot read properties of undefined (reading ‘properties’)

    Cope copy and pasted exactly as above.

    The following trigger to run on specific days works fine: @or(equals(utcNow(‘dd’), ’01’),equals(utcNow(‘dd’), ’15’),equals(utcNow(‘dd’), ’16’),equals(utcNow(‘dd’), ’30’),equals(utcNow(‘dd’), ’31’))

    Any idea why your code would generate the error?

    Reply
    1. Tom says:
      February 9, 2023 at 9:56 pm

      Hello Keith,
      I don’t think it’s the trigger’s fault as it doesn’t read properties of anything, I’d try to move the trigger into a ‘Compose’ action after the trigger to check if still returns the value and if it evaluates correctly. Other than that I’d try to google it.

      Reply
      1. Keith says:
        February 10, 2023 at 8:25 pm

        Good suggestion. Tried google, ChatGPT, but didnt find anything that would explain why it doesnt work. Will look at your approach. Thanks!

        Reply
  5. Tamara says:
    February 17, 2023 at 4:22 pm

    I had the same problem as Tom. Flow worked fine until I added this trigger. Has anyone figured this out? I seem to have this problem no mater what I put in for a condition with a recurrence trigger.

    Reply
    1. Tamara says:
      February 17, 2023 at 4:22 pm

      Sorry, same issue as Keith.

      Reply
      1. Tamara says:
        February 17, 2023 at 5:26 pm

        I tried the compose action and both input and output were false. Flow will only run if I remove the condition from the Recurrence trigger.

        Reply
        1. Tom says:
          February 22, 2023 at 7:50 pm

          Hello Tamara,
          that’s correct, if the conditions return ‘false’ the flow won’t even start. It’ll start only if the condition is evaluated as ‘true’.

          Reply
  6. Sindhusha Grandhi says:
    February 24, 2023 at 10:18 am

    Hi Tom, thank you for the wonderful logic here.
    But i have a quick question- can you please tell me what should be the fields set to on the trigger now? should I make the ‘Interval’ as ‘1’ and ‘Frequency’ to ‘Month’?
    Thank you in advance! and keep inspiring.

    Reply
    1. Tom says:
      March 1, 2023 at 11:08 pm

      Hello Sindhusha,
      the trigger is a recurrence every day. Every day it’ll check if the condition is satisfied, and if it is (once a month), it’ll let the flow start.

      Reply
  7. Damian says:
    March 1, 2023 at 2:17 pm

    Hi Tom, i think some of the “equals” function are wrong.

    For example: equals(dayOfWeek(utcNow(),1)

    You missed a ‘)’ to close the dayOfWeek function. This happens on anothers functions too, take a look.

    Thank you for the article, it helped me a lot!

    Reply
    1. Tom says:
      March 15, 2023 at 4:13 pm

      Hello Damian,
      thank you for noticing that, I hope I fixed all the missing brackets.

      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!


There's also the HTTP requests to SharePoint cheat sheet to help you overcome limitations of some standard actions!

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.

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with 1000s of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2023 Let's POWER Automate | Theme by SuperbThemes