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

Community site session details

Session Id :
Power Automate - Using Connectors
Answered

Is it possible to check a file for specific text?

(0) ShareShare
ReportReport
Posted on by 11

Hello everyone, i am new to Microsoft Flow.

 

My question is, is it possible for me to parse/check a file line-by-line to see if a string exist?

I would like to check an input string to the .txt file, line per line to see if there is a match.

 

Example:

Input String: Dave

 

Check test.txt on OneDrive

 

test.txt file content:

John

Tom

Aden

Dave

Maggie

Jim

I have the same question (0)
  • Verified answer
    ScottShearer Profile Picture
    25,254 Most Valuable Professional on at
    Re: Is it possible to check a file for specific text?

    @Meier 

    The file content should be plain text, so you can use the indexOf expression to see if your text is present in the file.  Note that the search is case sensitive.  The indexOf() expression returns -1 if the text is not found.  See my example below:

    File contents:

    image.png

    My Flow - expression can be seen in the comments area:

    image.png

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard

Featured topics