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 / opening links from lists
Power Automate
Unanswered

opening links from lists

(0) ShareShare
ReportReport
Posted on by 8

Hi 

 

I have 3 lists with url links scraped from a webpage. These links are then opened in a new browser tab and the webpages opened are then saved.

This PAD code works:
 

WebAutomation.ExtractData.ExtractList BrowserInstance: Browser Control: $'''html > body > div > table:eq(2) > tbody > tr > td:eq(2) > a''' ExtractionParameters: {[$'''''', $'''Href''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> List1
WebAutomation.ExtractData.ExtractList BrowserInstance: Browser Control: $'''html > body > div > table:eq(2) > tbody > tr > td:eq(1) > a''' ExtractionParameters: {[$'''''', $'''Href''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> List2
WebAutomation.ExtractData.ExtractList BrowserInstance: Browser Control: $'''html > body > div > table:eq(2) > tbody > tr > td:eq(0) > a''' ExtractionParameters: {[$'''''', $'''Href''', $''''''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> List3

SET NewList TO List1
LOOP FOREACH CurrentItem IN NewList
WebAutomation.CreateNewTab.CreateNewTab BrowserInstance: Browser Url: CurrentItem WaitForPageToLoadTimeout: 60 NewBrowserInstance=> NewBrowser

END

 

However, I need to repeat the above code 3 times to set the NewList variable to List1, List2 and List3.

The merged lists does not work as the all the url links become a single line in the variable CurrentItem i.e. url1url2url3.

 

Is there a better way to achieve the same result?

 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The Merge lists action should do the trick. I'm not sure I understand what you mean about it not working. Can you please provide some screenshots?

     

    Alternatively, it seems like you are extracting values from 3 separate columns of a single table. What you could do is use a single Extract data from web page action to extract all 3 columns at once into a table, instead of 3 lists. Then, when you do a For each loop on that table, your %CurrentItem% will store a data row with 3 columns. You can do another For each loop on the row (inside the first For each loop) and this way you'll end up processing each column individually before moving on to the next row.

     

    The following code should do the trick:

    WebAutomation.ExtractData.ExtractTable BrowserInstance: Browser Control: $'''html > body > div > table:eq(2) > tbody > tr''' ExtractionParameters: {[$'''td:eq(0) > a''', $'''Href''', $'''''', $'''Value #1'''], [$'''td:eq(1) > a''', $'''Href''', $'''''', $'''Value #2'''], [$'''td:eq(2) > a''', $'''Href''', $'''''', $'''Value #3'''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> Table
    LOOP FOREACH CurrentItem IN Table
     LOOP FOREACH CurrentURL IN CurrentItem
     WebAutomation.CreateNewTab.CreateNewTab BrowserInstance: Browser Url: CurrentURL WaitForPageToLoadTimeout: 60 NewBrowserInstance=> NewBrowser
     END
    END

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

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 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard