cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
NBMS_2019
Level: Powered On

Recurring flow to find a file in a document library

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.

3 REPLIES 3
NBMS_2019
Level: Powered On

Re: Recurring flow to find a file in a document library

The HILL document library's path is located at

 

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

Community Support Team
Community Support Team

Re: Recurring flow to find a file in a document library

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

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
WDRC
Level: Powered On

Re: Recurring flow to find a file in a document library

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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Users Online
Currently online: 77 members 3,765 guests
Please welcome our newest community members: