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

Previous file modify date/time

Hello, I'm a complete beginner to MS flows and I'm trying to build a Flow that posts a message in a Yammer group when a sharepoint library file is created or modified. However it generates loads of posts because of the AutoSave function being turned on when editing files. Do we have access to the previous modified date/time of the file to check how close it is to the current trigger ? Any help appreciated. Thanks

4 REPLIES 4
Super User
Super User

Re: Previous file modify date/time

Flow will not natively allow you to access prior versions of a document (it takes an API call...).

 

As an alternative, you might consider running a Flow on a schedule (once a day? twice a day?) that loops through your library looking for docuemnts which have been updated within the last X number of hours.  When you find one, post a Yammer message.  When you retrieve the file properties, you'll want to use the Filer Query option to limit what you get back to just those files that meet your criteria.

 

Please post here of you need an example

 

Scott

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Highlighted
Emma2
Level: Powered On

Re: Previous file modify date/time

Thanks Scott. An example would help, yes please. I tried a schedule of 5 minutes recurrence (for testing), chose the action Get files (properties only) with the filter query LastModified gt addMinutes(utcNow('yyyy-MM-ddTHH:mm:ssZ'),-5).

I don't get any dynamic content for 'Filter Query' nor for 'Limit Columns by view' by the way. As an outcome to that I added an Apply to each loop with an email notification.

However I get the following failure Smiley Sad

ActionConditionFailed. The execution of template action 'Apply_to_each' is skipped: the 'runAfter' condition for action 'Get_files_(properties_only)' is not satisfied. Expected status values 'Succeeded' and actual value 'Failed'.

 

Emma2
Level: Powered On

Re: Previous file modify date/time

Hi Scott, would you mind give me an example ? thanks

Bizzo
Level 8

Re: Previous file modify date/time

Hi @Emma2,

 

Something like this might get you started. Your trigger would be Recurrence. Set the recurrence for the same duration as you set the timestamp (so in my example, timestamp is from an hour ago so you'd run the flow every hour). You'd get all the items from the Library, and then do an Apply to each. Inside the apply to each you'd post in Yammer.

 

 

microsoft-flow_timestamp

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us 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!

Top Kudoed Authors
Users Online
Currently online: 83 members 4,502 guests
Please welcome our newest community members: