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 / How to search for file...
Power Automate
Unanswered

How to search for files within Sharepoint folders with FLOW?

(0) ShareShare
ReportReport
Posted on by

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....

Categories:
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at

    Hi @Anonymous,

     

    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 Power Platform Member Profile Picture
    on at

    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.

  • Community Power Platform Member Profile Picture
    on at

    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....

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard