Power Automate: How to Trigger Flows on the First Workday of the Month

🔥 Problem Solved

We need a flow that:

✅ Runs only on the first workday of each month

✅ Skips weekends (if the 1st is Saturday/Sunday)

✅ Optionally excludes holidays


🛠 The Solution

1. Decision Tree

Decision tree on the first wordday of the month
Decision tree on the first wordday of the month

2. Core Trigger Condition

Build a scheduled cloud flow. For the flow trigger, set the frequency to 1 day and set the trigger condition as below:

@or(and(equals(int(utcNow('dd')),1),greater(dayOfWeek(utcNow()),0),less(dayOfWeek(utcNow()),6)),and(or(equals(int(utcNow('dd')),2),equals(int(utcNow('dd')),3)),equals(dayOfWeek(utcNow()),1)))
Trigger
Trigger

Explanation on the trigger condition:

@or(
  // Case 1: 1st is a weekday (Mon-Fri)
  and(
    equals(int(utcNow('dd')), 1),       // Day = 1
    greater(dayOfWeek(utcNow()), 0),    // Not Sunday (0)
    less(dayOfWeek(utcNow()), 6)        // Not Saturday (6)
  ),
  // Case 2: 1st was weekend → Run next Monday
  and(
    or(
      equals(int(utcNow('dd')), 2),     // 2nd = Monday if 1st was Sunday
      equals(int(utcNow('dd')), 3)      // 3rd = Monday if 1st was Saturday
    ),
    equals(dayOfWeek(utcNow()), 1)      // Must be Monday
  )
)

3. Debugging Tips

  “Day”: int(utcNow(‘dd’)),

  “DayOfWeek”: dayOfWeek(utcNow()),

  “DayName”: if(equals(dayOfWeek(utcNow()), 0), “Sunday”,””)

Compose Action
Compose Action

4. Enhanced Condition with Timezone

If you want to convert the timezone, consider below as an example:

// For timezone-adjusted flows (e.g., China Standard time)
@or(
  and(
    equals(int(formatDateTime(convertTimeZone(utcNow(), 'UTC', 'China Standard time'), 'dd')), 1),
    and(greater(dayOfWeek(convertTimeZone(utcNow(), 'UTC', 'China Standard time')), 0),
        less(dayOfWeek(convertTimeZone(utcNow(), 'UTC', 'China Standard time')), 6))
  ),
  // ... rest of condition
)

5. Handling Holidays (Advanced)

  1. Create a SharePoint List named Holidays with columns
    • Date (single line of text, format “MM-dd”, e.g., “12-25”)
    • Name (holiday description, e.g., “Christmas Day”)
  2. Modify Condition:
and(
  @or(...), // Original condition
  not(contains(
    join(outputs('Get_Holidays')?['body/value'], ','),
    formatDateTime(utcNow(), 'MM-dd')
  ))
)

❌ Common Pitfalls

MistakeFix
Cannot retrieve the day of the monthUse utcNow(‘dd’) or int(utcNow(‘dd’)) as the first returns a two-digit string and the last returns the day number of the month. Do not use utcNow(‘d’) as it returns ‘M/d/yyyy’
Mixup functions in ExcelPower Automate has no day() function (unlike Excel)
Flow runs on weekendsVerify dayOfWeek() checks (0=Sun,6=Sat)
Condition too complexTest sub-conditions individually

💡 Pro Tips

  1. Set the recurrence to “Run every 1 day” and let the condition handle the scheduling – it’s more reliable than monthly triggers!
  2. Test with future dates by temporarily overriding utcNow():
// Debug example for Feb 1, 2025 (Saturday)  
and(equals(int('02'), 1), equals(dayOfWeek('2025-02-01'), 6))  
  1. Document your logic in a flow comment for future updates.

How to Use This Guide

  1. Copy/paste the trigger condition
  2. Adapt for timezones if needed (convertTimeZone(utcNow(), …))
  3. Extend with holiday lists for full reliability

Leave a Reply

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