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 / I need assistance with...
Power Automate
Suggested Answer

I need assistance with automating data extraction from multiple listings on a webpage, specifically by clicking on “Contact Us” buttons, retrieving information, and iterating through all listings across multiple pages

(1) ShareShare
ReportReport
Posted on by 2

Hi,

I’m trying to extract data from this link and I’m encountering a challenge. There are about 30-35 listings on each page, and each listing has a “Contact Us” button that contains the information I need. My goal is to automate the following process:

  1. Click on the “Contact Us” button for a listing to extract the required information.
  2. Return to the listing page.
  3. Repeat the process for the next “Contact Us” button.
  4. Continue this for all listings on the current page.
  5. Move to the next page and repeat the process for all pages.

Could you please guide me on how to achieve this efficiently?

Thank you!

I have the same question (0)
  • Suggested answer
    BoredFish Profile Picture
    26 on at
    Without access to that webpage, any advice you're going to get will be very generic. But as high-level, I would start by looking closely at the HTML attributes of the buttons to try and find something that can be looped through iteratively. For example, if each button has something like class="button-1"class="button-2", etc... then you can use a loop and loop counter variable. First you'll need to add the UI element to the flow and change it to include the dynamic variable, for example:

    button[Class="button-1"]
    to
    button[Class="button-%loopCounter%"]

    and then the flow would look something like: 
    1. Obtain webBrowser instance.
    2. Set variable loopCounter to 0.
    3. Loop condition while loopCounter < 10
      1. Get details of element [button-%loopCounter%].
      2. Do something with extracted data.
      3. Increase variable loopCounter by 1.
    4. End

    If you're able to share the page you're trying to get the info out of, that would make it easier to help.
  • Suggested answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at
    Hi @Abe-S,
     
    Please find the solution.
     
     
    Code:
    Please copy this code to your flow and make necessary changes.
    WebAutomation.LaunchChrome.LaunchChrome Url: $'''https://www.thebluebook.com/search.html?region=12&class=1680&searchTerm=Electrical''' WindowState: WebAutomation.BrowserWindowState.Maximized ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 PiPUserDataFolderMode: WebAutomation.PiPUserDataFolderModeEnum.AutomaticProfile BrowserInstance=> Browser
    WebAutomation.ExtractData.ExtractListUsingPagingFromAllPages BrowserInstance: Browser Control: $'''html > body > div:eq(0) > main > section > div:eq(0) > div:eq(0) > div:eq(2) > div:eq(3) > div''' ExtractionParameters: {[$'''div > div:eq(2) > div:eq(2) > a:eq(1)''', $'''Href''', $''''''] } UsePhysicalClick: False PagerCssSelector: $'''html > body > div:eq(0) > main > section > div:eq(0) > div:eq(0) > div:eq(2) > div:eq(3) > div:eq(34) > div:eq(1) > a''' PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> ContactUS_Href
    LOOP FOREACH CurrentItem IN ContactUS_Href
        WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: CurrentItem WaitForPageToLoadTimeout: 60
        WebAutomation.ExtractData.ExtractSingleValue BrowserInstance: Browser ExtractionParameters: {[$'''html > body > div:eq(0) > main > div:eq(2) > div > div > div > div > div > div:eq(0)''', $'''Own Text''', $''''''] } TimeoutInSeconds: 60 ExtractedData=> RequiredData
    END
    
     
    (Note:- if you got your solution you can mark as solution and gives kudos)

    Thanks & Regards
    Vishnu Reddy
  • Abe-S Profile Picture
    2 on at

    @BoredFish

    I attached the link within the word "this," but I'm not sure if you saw it. Here it is again:

    (https://www.thebluebook.com/search.html?class=1680&region=12&searchsrc=index&searchTerm=Electrical&page=2)

    Additionally, here is a link to one of the "Contact Us" buttons:

    (https://www.thebluebook.com/iProView/1494090/24-7-electrical-services-llc/subcontractors/locations-contacts/)

    This is just one of the 25 buttons on the page, and it contains all the information I need. Sometimes, there's a CAPTCHA, but not always.

    Recently, I've encountered another issue with the site. If I search too much, the site gets slower. However, enabling a VPN seems to resolve this problem.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard