web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Notification on overdu...
Power Automate
Suggested Answer

Notification on overdue items

(1) ShareShare
ReportReport
Posted on by 6
Hi,
 
I have a list created within my SharePoint. The list contains a number of task which includes column like Reference #, Key Contact, Due Date, Status, etc. I built a flow in Power Automate where an email is sent to the Key Contact person listed in the column when the task is 7 days before due date, 3 days before due date, and 1 days before due date. After it will continue to send an alert 1 day after, 3 days after, and 7 days after the due date. However, the flow I created counts only calendar dates and I want to change it to count Business dates. This has becoming a challenge and would like some assistant on this.
 
i have included my flow so far.
 
Thanks
Last part of the ...
Middle part of th...
Top part of the f...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Power Automate does not natively support business-day calculations, so the recommended approach is to maintain a separate business calendar (including weekends and holidays) and calculate reminder dates by selecting the nth business day relative to the due date.
     
    This ensures accurate and scalable handling of business-day-based reminders.
     
    My recommendation for you
    Go with:
    • Business Calendar list (best approach)
    • Daily scheduled flow
    • Lookup-based calculation
  • Suggested answer
    Sunil Kumar Pashikanti Profile Picture
    2,318 Moderator on at
     
    One of the most common challenges in Power Automate is sending notifications based on business days. Since the platform does not have a built-in function to skip weekends or holidays, we often end up with calendar-based logic that sends a “3-day reminder” on a Monday for a task due on Wednesday.
     
    The most reliable way to handle this is to run a daily flow that “walks” through the calendar day by day to calculate a true business-day gap.
     
    How it works
    Instead of pre-calculating dates, this flow runs every day, checks each active task, and calculates how many business days exist between today and the due date. If that count matches 1, 3, or 7, the email is triggered.
     
    Step-by-step build guide
    1. Global setup (top of flow)
    Start with a Recurrence trigger set to run every 1 day. Before entering any loops, initialize your variables at the top level:
    • varCount (Integer) – to store the business day count
    • varToday (String) – current date without time
    • varDate (String) – working date used in the loop
    • varDueDate (String) – due date of the task
    • varDirection (Integer) – controls forward or backward movement
    • varIsBefore (Boolean) – indicates if task is upcoming or overdue
    2. Get your tasks
    Add a Get items action from SharePoint. Use a filter query such as: Status eq 'Active'. This ensures you only process relevant tasks.
     
    3. Apply to each (process each task)
    Inside the loop, reset variables for the current item:
    • Set varCount = 0
    • Set varToday = startOfDay(utcNow())
    • Set varDate = variables('varToday')
    • Set varDueDate = startOfDay(item()?['DueDate'])
    • Set varDirection = if(less(variables('varToday'), variables('varDueDate')), 1, -1)
    • Set varIsBefore = less(variables('varToday'), variables('varDueDate'))
    4. Business day calculation (Do Until loop)
    Add a Do Until loop with the condition:
         equals(variables('varDate'), variables('varDueDate')) OR greaterOrEquals(variables('varCount'), 30)
    Inside the loop:
    Step A: Move date: Set varDate = addDays(variables('varDate'), variables('varDirection'))
    Step B: Check if working day: Use a condition to check dayOfWeek(variables('varDate')). If the day is not 0 (Sunday) and not 6 (Saturday), then Increment varCount by 1.
     
    5. Triggering the email
    Now apply your conditions.
    Before due date: Send email when varIsBefore is true AND varCount is 1, 3, or 7.
    After due date: Send email when varIsBefore is false AND varCount is 1, 3, or 7.
     
    Optional improvement (recommended)
    To prevent duplicate emails during retries or re-runs, add a SharePoint column (e.g., LastReminderKey). Before sending an email, check if the key (like BEFORE_3) already matches. After sending, update the column.
     
    Why this approach works well
    Accuracy: It correctly treats a Friday-to-Monday gap as 1 business day, not 3 calendar days.
    Flexibility: You can easily extend this to include holidays by checking against a holiday list.
    Simplicity: No need for complex wait actions. The flow simply asks: “Is today a milestone day for this task?” and acts accordingly.
     
    Let me know if it works!
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.

    Sunil Kumar Pashikanti, Moderator
    Blog:
     https://sunilpashikanti.com/posts/
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi @SW-12062302-0,
     
    I assume here is the structure of the notifcaiton you want to have:
     

    1. Trigger: Scheduled Recurrence: Use the Recurrence trigger to run the flow once daily (e.g., every morning).

    2. Get Tasks from SharePoint: Use the Get items action to retrieve tasks from your SharePoint list. Use an OData filter query to get tasks with Due Dates between 7 calendar days before and 7 calendar days after today, for example:

    DueDate ge '@{formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')}' and DueDate le '@{formatDateTime(addDays(utcNow(), 7), 'yyyy-MM-dd')}'

    3. Initialize Variables: Initialize an integer variable BusinessDaysCount to 0. Initialize a string variable Today with the current date in yyyy-MM-dd format:

    formatDateTime(utcNow(), 'yyyy-MM-dd')

    4. Loop Through Each Task: Use an Apply to each loop on the output of Get items.

    5. Calculate Business Days Difference

    Inside the loop for each task:

    • Initialize an integer variable BusinessDaysCount to 0.

    • Calculate the total calendar days difference between today and the Due Date:

      div(sub(ticks(item()?['DueDate']), ticks(utcNow())), 864000000000)
    • Use an Apply to each loop from 0 to the absolute value of the calendar days difference:

      • For each iteration i:

        • Calculate the current date by adding i days to today:

          addDays(utcNow(), i)
        • Use the dayOfWeek() expression on the current date to check if it is a weekday (Monday=1 to Friday=5):

          and(greaterOrEquals(dayOfWeek(addDays(utcNow(), i)), 1), lessOrEquals(dayOfWeek(addDays(utcNow(), i)), 5))
        • Optionally, check if the current date is in a holiday list (see step 6).

        • If it is a weekday and not a holiday, increment BusinessDaysCount by 1.

    • After the loop, BusinessDaysCount holds the number of business days between today and the Due Date.

    6. (Optional) Exclude Holidays: Maintain a SharePoint list or array variable with holiday dates. During the business day counting loop, check if the current date exists in the holiday list. If yes, do not increment BusinessDaysCount for that day.

    7. Send Reminder Emails Based on Business Days: Use a Condition or Switch action to check if BusinessDaysCount equals 7, 3, or 1. Also check if the Due Date is in the future (for before reminders) or past (for after reminders) by comparing dates.

    • If the condition matches, use the Send an email (V2) action:

      • Set To to the Key Contact email from the task.

      • Customize the Subject and Body with task details and reminder message.

    8. (Optional) Track Sent Reminders: Add columns to your SharePoint list like ReminderSent_7DaysBefore, ReminderSent_1DayAfter, etc. Before sending an email, check if the reminder was already sent. After sending, update the corresponding column to avoid duplicate emails.

     

     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!

     

  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,204 Super User 2026 Season 1 on at
    Hi,
     
    1. Create a list of business days or holidays
    In SharePoint, create a small list that stores holidays and optionally weekends. This helps your flow know which days to skip.
     
    2. Calculate business days using a loop
    Instead of subtracting 7 or 3 days directly, use a loop in your flow:
    Start from today’s date
    Move forward or backward one day at a time
    Skip Saturdays, Sundays, and any holiday from your list
    Count only valid business days
     
    3. Compare the calculated date with due date
    Once you get the correct business day difference, check if it matches (7, 3, 1 days before or after due date).
     
    4. Send email when condition matches
    If the condition is true send the reminder email to the key contact.
     
    If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
    Regards,
    Riyaz
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    Depending on what you want to do, you may find this expression helpful:
     
    addDays(utcNow(), add(if(or(equals(dayOfWeek(addDays(utcNow(), 10)), 0), equals(dayOfWeek(addDays(utcNow(), 10)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 10)), 0), 1, 2), 0), 10))
     
    It adds 10 days to the current date and checks if the resulting date is a Saturday or Sunday. If so, it adjusts it so it falls on Monday. If you want to add seven days, just replace 10 with 7 instead:
     
    addDays(utcNow(), add(if(or(equals(dayOfWeek(addDays(utcNow(), 7)), 0), equals(dayOfWeek(addDays(utcNow(), 7)), 6)), if(equals(dayOfWeek(addDays(utcNow(), 7)), 0), 1, 2), 0), 7))
     
    If you don't consider business days Monday through Friday, you'll need to adjust the logic. The dayOfWeek() expression uses these values for each day of the week:
    • 0 = Sunday
    • 1 = Monday
    • 2 = Tuesday
    • 3 = Wednesday
    • 4 = Thursday
    • 5 = Friday
    • 6 = Saturday
    I sometimes use this in a delay until action to pause sending a notification. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard