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 / Search file content us...
Power Automate
Unanswered

Search file content using PowerAutomate

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

I have files in a SharePoint doc library (Word and PDF files); I would like to configure a PowerAutomate workflow to search for "key words" within the file content, i.e. I want to know how many (Word docs or pdf files) contain a specific email address or any other key words

 

Is that possible using PowerAutomate workflow?

 

Thank you!

Categories:
  • narayan225 Profile Picture
    2,547 Moderator on at

    @U1EMOHAI 

     

    You can use the api to search the file content.

     

    Check out the following video by Reza Dorrani regarding this. He uses a power app, but you can configure yours to just use the flow.

     

    https://www.youtube.com/watch?v=xuR-yaMkFDg

     

    Hope this helps.

    Cheers!

  • perksyaus Profile Picture
    62 on at

    Hi,

     

    You can use RegEx in a roundabout way in Power Automate to search for words.  I used this excellent article to work through how to implement it

    How to use Regex in Power Automate (tachytelic.net)

    and I also used this regex101: build, test, and debug regex to configure my Regex string

    Denise

  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @U1EMOHAI ,

     

    Plus the video shared by @narayan225, you can just use Get Files (properties only), and then a filter query. 

    This is a great blog post about it:  https://sharepains.com/2021/01/19/filter-query-get-items-power-automate/

     

    So, for example, if I wanted to return all files where the title (or filename or whatever else) contained the word "Policy" somewhere, I could use substringof('Policy', Title) in the filter query and that will return to me anything that meets that.

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up.

  • GabsExp Profile Picture
    2 on at

    Hi @perksyaus ,

     

    I saw your blog. I've seen the same explanation and examples in several YouTube videos and other blogs. However, I don't see how this can be applied to file contents within SharePoint sites without having to manually point at a specific file. 
    I would like to use regex and at the same time apply the search pattern to do a general search over all the files in a SharePoint library. Basically mixing both ideas: what Reza Doranni does here with what you explain in your blog. 


    Any chance you have an idea of how to do that?

  • perksyaus Profile Picture
    62 on at

    Hi GabsExp,

     

    Sorry If I caused confusion - its not my blog - I just used it in conjunction with my requirements.  My scenario was searching a string in a subject email header - I'm not sure about searching a sharepoint site.

     

    Denise

  • Jon2787 Profile Picture
    119 on at

    Hi @GabsExp did you manage to find a solution for this? I’m also looking to do this. 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 321 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 244

#3
Henil Profile Picture

Henil 102

Last 30 days Overall leaderboard