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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Why is recurring flow ...
Power Automate
Answered

Why is recurring flow not running the same way as it does during tests?

(0) ShareShare
ReportReport
Posted on by 38

Hi everyone

 

I'm looking for some help or advice on a recurring flow I have created to update file properties for particulars that are identified using an ODATA filter. The flow is running successfully (i.e. it's not failing), but I am not getting the same result when it runs on its own compared to when I run a test. 

 

Here are the Action details:

eellis1_0-1705461418313.png

1. Details of recurrence action:

eellis1_1-1705461461559.png

2. Get files (properties only) action - this action gets files from the relevant library using the following Filter Query to identify files with a 'Due for Review' date 90 days from now:

DueforReview eq 'formatDateTime(addDays(utcNow(), 90), 'yyyy-MM-dd')'

 

For each value:

3. Get file properties retrieves details from the files identified in the Get files (properties only) action.

4. Update file properties updates the 'Status' field to 'Due for Review'

END FLOW

 

The problem:

When I test the flow, it works perfectly and only updates the status of files with a Due for Review date 90 days from today. However, when I allow the flow to run as per its recurring schedule, it updates the 'Status' of ALL files with any date in the Due for Review column to 'Due for Review', regardless of when that date might be. 

 

How can I make sure my recurring flow behaves the same way it does during my test runs and only updates the relevant files? 

 

I have tried changing the date format in the fx expression above, adding timezone conversion to the fx expression above, neither make a difference. Looking at the run history, the recurring flow appears to identify the appropriate files, runs the for each the appropriate number of times (for the identified files only), but still updates the status of all files in the library that have any date in the 'Due for Review column' instead of just those identified files.

 

Any advice would be amazing, this has been doing my head in for a week. 

 

Thanks in advance!

Categories:
I have the same question (0)
  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    When you check the run history for a non-test run, what does the filter query look like?

  • eellis1 Profile Picture
    38 on at

    Hi WillPage, thanks for your reply. Here is a screenshot of the successful action with filter query from a non-test run. 

    eellis1_0-1705469490335.png

     

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    That looks fine. Click to download in the outputs section then search for DueforReview. Use Firefox for this if you can. You should see all the DueforReview dates. Make sure they all have a timestamp of 00:00:00.0000 or whatever (a bunch of zeros)

  • eellis1 Profile Picture
    38 on at

    I have just done as you have suggested (but in Microsoft Edge as that's all my work currently allows). The DueforReview dates do not have timestamps, they just display the dates. I have adjusted the DueforReview column to include date and time, and adjusted the fx expression to ensure it includes time too:

     

    formatDateTime(addDays(utcNow(), 90), 'yyyy-MM-ddT00:00:00') 

     

    Test run has worked perfectly again (as expected) and I'll wait and see if it makes a difference for the recurring flow. Do you think this could be the culprit? 

     

    Thanks again for your suggestions.

     

     

  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    It feels like it could be. SharePoint date columns have the option to include time when you create or edit them, but if you don't include time the data is still stored as a date/time value, only the time is set to 00:00:00.0000 (midnight). . Despite that you can still end up with times in the data anyway.
    Querying with yyyy-MM-dd just implies a timestamp of 00:00:00.0000.
    The workaround is to calculate the day you want and the day after then do your odata query like Reviewdate ge '2024-01-19' and Reviewdate lt '2024-01-20' for example, but obvs with dynamic content in there instead of hardcoded timestamps. That'll catch everything on the 19th with any timestamp.

  • Verified answer
    eellis1 Profile Picture
    38 on at

    Thanks very much for your help WillPage - I tried your suggestion and while it didn't solve the issue it did help me consider improvements to the flow. 

     

    I did manage to resolve the issue, it appears to have been a bug of sorts in the Recurrence trigger action. When I changed the 'start time' field from the default to a recent date, the issue was resolved. I have run several tests using manual trigger and several tests running on the set recurrence schedule and it's working perfectly now.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 305 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 155 Most Valuable Professional

Last 30 days Overall leaderboard