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 / Configure a loop until...
Power Automate
Suggested Answer

Configure a loop until today's date is greater than the due date in a SharePoint list

(0) ShareShare
ReportReport
Posted on by 68
Hi,
 
I would like to setup a reminder system using PowerAutomate, and send me reminders in due dates.
the problem is that some "Due Dates" are far away, e.g. 1 year from now...
 
in PowerAutomate, I cannot use the "Delay until" for more than 30 days, that is my plan setup in O365..
 
so, I would like to create a loop in Power Automate and keep pausing for 1 week every time if "today's Date" is less than the "due date" mentioned in a SharePoint (Date\Time) field..
 
I used the (Do Until) with the following expression but it's not working..
 
greater(ticks(formatDateTime(utcNow(), 'yyyy-MM-ddTHH:mm:ssZ')), ticks(triggerOutputs()?['body/The_x0020_Reminder_x0020_Date_x0']))
 
please find attached screenshot.
 
can you please advice what might be the issue here? any idea?
 
thank you!
Screenshot 2025-12-21 220838.png
Categories:
I have the same question (0)
  • EdMoh Profile Picture
    68 on at
    screenshot attached
    Screenshot 2025-12-21 220838.png
  • Suggested answer
    Kalathiya Profile Picture
    2,353 Super User 2026 Season 1 on at
    Hello @EdMoh
     
    Based on your requirement, if the goal is to send a notification on the due date, you actually don’t need to use Delay or Do Until at all.
     
    Instead of keeping the flow “waiting” until the due date, you can use a Scheduled (Recurrence) flow that runs daily (or at any interval you prefer) and simply compare Today’s date with the Due Date field in SharePoint.
     
    How this works
    1. Create a Scheduled flow that runs once per day (for example, every morning).
    2. Use Get items from SharePoint and apply a filter to retrieve only the relevant records:
    • Filter items where Due Date = Today
    • Optionally include ReminderSent = No (use this only if you are tracking whether a reminder was already sent).
              3. Use Apply to each to process only the filtered items returned by SharePoint.
              4. Send the email notification for each matching item.
              5. (Optional) Update the item to set ReminderSent = Yes so the same reminder is not sent again.
     
     
    If this solution works for you, please let me know and feel free to ask if you need more help.
     
    📩 Need more help? Mention@Kalathiya anytime!
    ✔️ Don’t forget to Accept as Solution if this guidance worked for you.
    💛 Your Like motivates me to keep helping
  • EdMoh Profile Picture
    68 on at
     
    thank you for your suggestion.
     
    I will give it a try. 
     
    I have a question: I would like to write an expression that check if today's date is "greater" than the due date, can you please advise if you have a working expression?
     
    I tried: greater(ticks(formatDateTime(utcNow(), 'yyyy-MM-ddTHH:mm:ssZ')), ticks(triggerOutputs()?['body/The_x0020_Reminder_x0020_Date_x0']))
     
    but that didn't work.
  • Kalathiya Profile Picture
    2,353 Super User 2026 Season 1 on at
    Hello @EdMoh
     
    In Power Automate, you don’t actually need to use ticks() to compare dates. Date/time values can be compared directly as long as both sides are valid DateTime values.
     
    greater(
      formatDateTime(utcNow(), 'yyyy/MM/dd'),
      formatDateTime(triggerOutputs()?['body/The_x0020_Reminder_x0020_Date_x0'], 'yyyy/MM/dd')
    )
    
    If today’s date is greater than the due/reminder date, the expression will return true else false. 
     
     
     
    Output
  • Suggested answer
    Riyaz_riz11 Profile Picture
    4,191 Super User 2026 Season 1 on at
    Hi,
     
    Your expression compares today > due date, but in a reminder loop you want to keep looping while today < due date, then exit once it’s reached.
    Use this in the Do until condition: lessOrEquals(ticks(utcNow()), ticks(triggerOutputs()?['body/The_x0020_Reminder_x0020_Date_x0'])) and keep the right‑hand value as true.
    Inside the loop, just have a Delay – 1 week; the loop will re‑check the condition after each delay.
    Also increase the Do until – Change limits (timeout and max iterations) so it can run long enough to cover up to a year.
     
    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

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
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard