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

How to search for files within Sharepoint folders with FLOW?

Hi, I try to create a flow:

 

1. You get an e-mail to a specific e-mail address with an specific Theme.

2. I need to search within Sharepoint folder for a file with a theme in it's content. File type is PDF.

3. After I have found that file - it needs to be sent to a sender from 1st step.

 

I know how to find files within my OneDrive (there is a flow action), but how to do this with Sharepoint? It doesn't have "Search for files in Folder" option....

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: How to search for files within Sharepoint folders with FLOW?

Hi @Daniil,

 

I did a test on my side, you could create Flow by the following method:

  • Use Get files action to get all the files, and filter the pdf files in the specified folder through Filter array.
  • The content of the file is obtained by the id of the current file, and it is determined whether the content of the file contains a subject.
  • If it does, send an email to From and attach the file as an attachment.

Image reference:

3.PNG

@and(endswith(item()?['{FilenameWithExtension}'], 'pdf'),equals(item()?['{Path}'], 'Library/Test/'))

4.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper I
Helper I

Re: How to search for files within Sharepoint folders with FLOW?

Can't find my files. I have around 100 thousand documents in a library, so on a step filter array - it seems I don't get all data I need. As I don't see any path like in a filter.

Highlighted
Helper I
Helper I

Re: How to search for files within Sharepoint folders with FLOW?

Finally I can run this script, but just 2 days and I have 1000 PDF files, And I'll have around 8000 each month.

So it seems - that's it will be really hard to find all files after a month. As just 1000 files script took 6 minutes to run.

 

Maybe there can be other options? For example - find the files with requested string and rename file?

For example - find within file row - "Order number - xxxxxxx" and after that rename file to xxxxxxx.pdf?

 

That will be much easier after that to find file with a name....

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (7,271)