Showing results for 
Search instead for 
Did you mean: 
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

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




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

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 😞

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'.


Level: Powered On

Re: Previous file modify date/time

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

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.




Helpful resources


Power Automate Community User Group Member Badge

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


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 364 members 5,972 guests
Please welcome our newest community members: