cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
keremtsc
Helper I
Helper I

Scan Sharepoint and check for the last time it has been changed

Hello everyone,

 

is it possible to scan every file inside a Sharepoint and check for the last time it has been changed? If so please explain how.

 

I want to check that and afterward send out an Email for example and ask the Owner of the file & the person that changed last time if it is still needed. IF the file has been changed 12 months ago for the last time.

 

Thanks

Kerem

1 ACCEPTED SOLUTION

Accepted Solutions
happyume
Solution Sage
Solution Sage

You can create a recurring/schedule Flow and then Get Files from your SharePoint Document Library

To make sure you only get files which were Modified 365 days ago, use Filter query as seen in screenshot below:

 

Modified lt '@{addDays(utcNow(),-365)}'

 

 

happyume_0-1630490238186.png

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

8 REPLIES 8
happyume
Solution Sage
Solution Sage

You can create a recurring/schedule Flow and then Get Files from your SharePoint Document Library

To make sure you only get files which were Modified 365 days ago, use Filter query as seen in screenshot below:

 

Modified lt '@{addDays(utcNow(),-365)}'

 

 

happyume_0-1630490238186.png

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

keremtsc
Helper I
Helper I

Hi @happyume,

 

I am getting this errorcode:

The expression "ModifiedIt 2020-09-01T11:28:06.0630813Z" is not valid. Creating query failed.


@keremtsc wrote:

Hi @happyume,

 

I am getting this errorcode:

The expression "ModifiedIt 2020-09-01T11:28:06.0630813Z" is not valid. Creating query failed.


There should be a space between Modified and lt

Also, the date needs to be within single quotes

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

keremtsc
Helper I
Helper I

@happyume 

 

The expression "Modified It @{addDays(utcNow(),-365)}" is not valid. Creating query failed.

 

Sorry if I do some simple things wrong. I put it in single quotes.

From my original solution, please see screenshot below on how it should look:

 

happyume_0-1630496597562.png


To add the expression for addDays(), use the Dynamic content window:

happyume_1-1630496641307.png

 

Are you able to share your screenshot on how you are writing this syntax, so that we can troubleshoot it?

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

@happyume 

Thank you again! I see what I did wrong there.

This time though it should be right but it still gives me the error: The expression "Modified It '2020-09-01T11:48:51.4363547Z'" is not valid. Creating query failed.


 

aaa.PNG

 


@keremtsc wrote:

@happyume 

Thank you again! I see what I did wrong there.

This time though it should be right but it still gives me the error: The expression "Modified It '2020-09-01T11:48:51.4363547Z'" is not valid. Creating query failed.


 

aaa.PNG

 


The keyword after Modified is lt and NOT It 

 

Here, lt stands for less than, you have used i instead.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If this post or my previous reply was useful in other ways, please consider giving it Thumbs Up.

Thanks again! (What a silly mistake by me)

I have created this with your help:flow.PNG

 


What would I have to put into the condition 1 to get this to work?

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (6,107)