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 / SharePoint online list...
Power Automate
Answered

SharePoint online listing files not accessed or modified over 7 days. Is it possible?

(0) ShareShare
ReportReport
Posted on by

A site has been set up which holds users TimeSheets in XLS files. They are organised as such

 

https://tenant.sharepoint.com/sites/WEStaffFiles/Manager%20one/Forms/AllItems.aspx

 

 

Manager_1\Jane\TimeSheets\Timesheet for Annualisedhours2019.xls

                  \Tom\TimeSheets\Timesheet for Annualisedhours2019.xls

 

Manager_2\Fred\TimeSheets\Timesheet for Annualisedhours2019.xls

                  \John\TimeSheets\Timesheet for Annualisedhours2019.xls

etc.

 

The site owner is wanting to an email sending every week listing any xls document which has not been modified for over 7 days.

 

I've trying to building a flow to do this but i'm not getting anywhere quick. 

 

I can't even seem to get a list of just the XLS file from the root of https://tenant.sharepoint.com/sites/WEStaffFiles/ with the name of Timesheet for Annualisedhours2019.xls, all sorts of different files come back.

 

flow.png

 

Any help or a point in the right direction would be appreciated.

 

Categories:
I have the same question (0)
  • vecerpa Profile Picture
    786 on at

    Hello @Anonymous ,

     

    First think I suggest is to set new column in your document library where you store those files that will define what type of file is it. In your case you will set "Timesheet". In mpicture below I have column named "Document Type" and there is filled "Closing Protocol".

    FlowHelp1.jpg

    Then you are able to filter by this word when selecting all files properties from library. Option to pick this is Hidden under Advanced option that you can click.

    FlowHelp2.jpg

    So in your case if you will name column "DocumentType" and there will be filled "Timesheet" the whole query is:

    DocumentType eq 'Timecheet'

    This will return all such files.

    There is returned for such file propertie called "Modified"

    FlowHelp3.jpg

     

    In your case you can use Filter to filter value with all files that was returned, first there is need to update this "Modified" date and time like this:

    formatDateTime(item()?['Modified'], 'yyyy-MM-dd')

    and compare it against this formula with "is equal to"

    formatDateTime(addDays(utcNow(), -7), 'yyyy-MM-dd')

     In picture below I am filtering based on "Created" property.

    FlowHelp4.jpg

     

    Hope this helps.

     

    BR
    Pavel
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Verified answer
    v-yamao-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Do you want to filter out files with “Annualisedhours2019.xls” in its list name?

     

    In the Filter array function, please consider using dynamic content FilenameWithExtension.

     

    I have made a simple flow likes below, which will filter out files that file name contains “Test”.

     

    The function used in the Filter array is:

    @and(contains(item()?['{FilenameWithExtension}'], 'Test'),equals(item()?['{IsFolder}'], false))

     

    Hope this could be a reference for you.

     

    Best regards,

    Mabel

     

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard