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

How to check the entire SharePoint site that there are no more files with the name of the selected file?

Hi! 
I've a library, where I upload a files. And I want to check are there any other files with the same name through out the SharePoint site.
After verification, I will send notifications by mail.
Please tell me how this can be done using Power Automate?
Thank you! 

1 REPLY 1
Rhiassuring
Resident Rockstar
Resident Rockstar

Hi there, 

 

You can use the "Get All Lists and Libraries" action. 
After, you can use the "Filter Array" to bring back only Type 101 (libraries.) 

Rhiassuring_0-1653810368547.png

 

( item()?['Type'] on the left, and string(101) on the right.) 

From there, all you need to do is search your Filename (name, right? Not title? Is that what you want?) through those libraries. That looks like this. 

 

Rhiassuring_2-1653810638340.png

 

As soon as you put in the Get Files (Properties Only) and put the "DisplayName" into the Library from  your Filtered Array output, it will turn it into an "Apply to Each", which means it is going to run the query on every library that came back in your list.

 

If you want an email for each match, you would put it within your Apply to Each loop.

 

If you want a single email (which is the typical want!), then you will want to build a string or array variable (using the "Append to X Variable" action (X = whichever type you want), within the loop, so you can put it into your email outside of the loop.

 

Cheers,

 

Rhia

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,037)