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 / Condition for Extract ...
Power Automate
Answered

Condition for Extract Data from web page

(0) ShareShare
ReportReport
Posted on by

I'm extracting text from a web site using extract data from website.  I need to perform actions depending on what the text I'm extracting states. I have two different outcomes the extracted data can be 1. Voided From System or 2. Not Voided From System.  How would i write a condition for these two outcomes?  If extracted data = Voided From System then perform action , If extracted data = Not voided from system then perform other action.  What would be the best way to do this? I have tried If extracted data = Voided From system and other options but with no luck.

 

Thank You 

 

Categories:
I have the same question (0)
  • Verified answer
    eliotcole Profile Picture
    4,390 Moderator on at

    Hey, @Natron26 ... you can use a contains() function in the left side of your condition if you're just looking for a single string of text, then just make the right side the expression true.

    (not the text, go into the expression builder and type 'true' if you're worried)

     

    Something like the below will do the trick in your left side:

    contains(toLower(YOUR_DATA), 'THE_TEXT_YOU_WANT_TO_FIND')

    Ensuring, of course, that you make THE_TEXT_YOU_WANT_TO_FIND all lowercase to match up with what I did with the toLower() function previously.

     

    But beware, parsing HTML is a slippery slope, even if you change it to text there can be all kinds of strange things that happen to it.

     

    You might be better poking around the page to see if there is either data attributes that you can whittle to, or better yet whether the data on the page is coming from an API that you can leverage yourself!

  • Natron26 Profile Picture
    on at

    Thank you for the reply, I'm in the if action and not sure what i would use in the operator and the second operand? for the first operand i have the datfromwebpage variable.

  • Verified answer
    eliotcole Profile Picture
    4,390 Moderator on at

    OK, so why not do this ... make a string variable called voidTextVAR, place the string of text you're looking for in there, and just paste this into the left side of your condition:

     

    @{contains(toLower(variables('datfromwebpage')), toLower(variables('voidTextVAR')))}

     

  • Natron26 Profile Picture
    on at

    This is for power automate desktop correct?

  • eliotcole Profile Picture
    4,390 Moderator on at

    I dunno, mate, it's your flow! 😅

     

    All seriousness, though, I am simply going with the information provided.

     

    If you edit your original query with screenshots of your flow, and even some sample data, then anyone that drops in to try to help might have a bit more context to work with. 🙂

     

    That's not said with any tone, by the way, purely letting you know!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 598

#2
Valantis Profile Picture

Valantis 477

#3
Vish WR Profile Picture

Vish WR 370

Last 30 days Overall leaderboard