Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Z4KGLxskVcGrrC1JNZRFuC
Power Automate - General Discussion
Unanswered

Condition where text file contains a string

Like (0) ShareShare
ReportReport
Posted on 24 Aug 2021 14:59:18 by

Hello, I have submitted a txt file containing "information" and this flow returns as no.

Gasp3r__0-1629817087170.png

Is there something I am doing wrong? 

 

  • TC416 Profile Picture
    37 on 22 Aug 2023 at 18:09:07
    Re: Condition where text file contains a string

    Nevermind the question.  It turns out the file somehow got Base64 encoded when it is saved to Sharepoint. Not sure why or how that happens.  I use base64tostring and now it is working. 

  • TC416 Profile Picture
    37 on 21 Aug 2023 at 02:17:56
    Re: Condition where text file contains a string

    Hi, I am trying to trigger an alert when a text file added to a folder has the word "Exception".  The file is a plain text file with an file extension '.log'.  Looking at the output, PA can see the plain text content.  Unfortunately, the workflow is not seeing the word in the text file and completing the flow without triggering the Alert action.

     

    Any idea or suggestion would be much appreciated!
    Thanks in advance... 

    TC416_1-1692584240018.png

     

    TC416_2-1692585110894.png

     

     

     

     

  • ScottShearer Profile Picture
    25,218 Most Valuable Professional on 24 Aug 2021 at 16:56:44
    Re: Condition where text file contains a string

    @Anonymous 

    Your trigger output contains the file content.  If you reference the file content in the conditon and it is a text file, it should work for you.  Please note that the comparison is case sensitive.

    image.png

     

  • eric-cheng Profile Picture
    5,171 on 24 Aug 2021 at 15:29:13
    Re: Condition where text file contains a string

    Hi  @Anonymous 

     

    You can try the below to read a txt file and use the output of Compose 2 in your condition

     

    @base64(outputs('Get_file_content_using_path')?['body'])
     
    @base64ToString(outputs('Compose'))
     

     

    Screenshot_20210825-012632_Chrome.jpg

    Screenshot_20210825-012622_Chrome.jpg

     

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,745 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started
Loading complete