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 / Recurring flow to find...
Power Automate
Unanswered

Recurring flow to find a file in a document library

(0) ShareShare
ReportReport
Posted on by 59

I have a recurring flow scheduled every Monday at 5pm to find the LAST MODIFIED file in the document library. The recurring action is pretty forward but I need help about finding the last modified file.

 

The goal is once the flow find this last modified file it will make a duplicate copy with a different filename which I know how to do. Thank you in advance.

Categories:
I have the same question (0)
  • NBMS_2019 Profile Picture
    59 on at

    The HILL document library's path is located at

     

    https://admin.sharepoint.com/sites/REST/Mountain/HILL

  • v-bacao-msft Profile Picture
    on at

    Hi @NBMS_2019,

     

    I have made a test on my side and the flow works well. Please take a try with the following workaround to find the last modified file:

    Convert the Modified value to a value using the ticks() function, then add it to an array.

    Append to array variable-Expression: 

    ticks(items('Apply_to_each')['Modified'])

    4.PNG

    Use the max() function to find the maximum value of the array, which is the value of the most recent modified time conversion.

    Then determine which Moidfied this value is, and then find out the relevant information for that file.

    Compose action-Expression: 

    max(variables('Modified'))

    Condition action-Expression: 

    ticks(items('Apply_to_each_2')['Modified'])

    5.PNG

    The flow works successfully as below, 'yu' is the name of the file that was last modified before the time set by my trigger:

    6.PNG

    According to the information obtained in the above step, you can make a duplicate copy with a different filename which you know how to do.

    Please take a try and feel free let me know if you have any question.

     

    Best Regards,

    Barry

  • WDRC Profile Picture
    247 on at

    All,

     

    I am an intermeadiate user of flow, so here goes with a query.

     

    I have a Sharepoint List, that I want to trigger and action on like send email containing a CSV file.  I am okay with the sending an email with a CSV attachment but I want to get the flow to run every three days from the start time and then end after a number of occourances, say 10 or when the feedback of the event has dried up i.e. 10 days.  The flow should then terminate and stop running. 

     

    I am have not used any expressions in flow yet so the above maybe possible with that but it is the actual flow diagram I need.  We can split the flow into multiple sections if required if that would help the logic.

     

    Any guidance would be helpful.

     

    Regards,

     

    Andrew

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard