web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Workflow needed to hel...
Power Automate
Unanswered

Workflow needed to help free up space in sharepoint library

(0) ShareShare
ReportReport
Posted on by 6
Hi:
I'm using the Microsoft Power Automate web version for Windows 11 OS.  Here is my need:  I have a list of document names and extensions in an Excel table located in One Drive.  Both the file names and the extensions are in the same table column, they are not in separate columns. The document names in this Excel table list correspond to MS Word documents (.docx) that may exist, may not exist, or may be checked out or locked for editing in a Sharepoint library.  This Sharepoint library has thousands of documents and I need to free up some space. I need a Power Automate workflow that reads each document name from the Excel table list and then looks for the document in the Sharepoint library.  If the document is found in the Sharepoint library, then the document needs to be deleted.  If the document is not found or if the document is checked out or locked for editing, the document should be skipped for the next one in the Excel table list.  Finally, create a list of all document names that were skipped because the documents were checked out or locked for editing.
Thanks
Categories:
I have the same question (0)
  • Scott_itD Profile Picture
    Community Manager on at
     
    Thanks for posting! To help our community better assist you, what steps have you tried yourself and where are you getting stuck with your workflow?
     
     
  • CU07021523-0 Profile Picture
    6 on at
    Hi Scott:
     
    I started with a manually triggered flow, followed by an Excel's List rows present in a table to look for the list of documents in the Excel table.  Then I am entering an Apply to each loop.  Inside the loop I started with a Compose to check that each document name is being processed.  Until that point all is fine.  After the compose inside the loop I am trying to use sharepoint's Get files (properties only) with filter query FileLeafRef eq to the previous compose output.  It is in this step when I run the flow that results seem not to be working for me.  I put another compose after the Get files and the output after I test the flow is an empty array.
     
    My idea was to get file properties to go into a condition to check for checked out files first and then to delete the files that were found.  Here is a picture of how the flow looks so far.
     
     
    Thanks
     
  • Expiscornovus Profile Picture
    33,828 Most Valuable Professional on at
     
    Does the list of documents include the file extension? In other words does the Excel table have document1 or document1.docx?

    Additionally, can you share the configure of your Get files (properties only) action?
     
    Does the Filter Query field configuration look like the below?




     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • CU07021523-0 Profile Picture
    6 on at
    Hi Expiscornovus;
     
    To answer your question, the Excel table contains one single column in the document1.docx format.
     
    My Get Files (properties only) settings are the following:
     
     
    Thanks 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard