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 : 4pzUKJQWTJoXTA1+u+flzt
Power Automate - Power Automate Desktop
Suggested answer

Extract link from Google Search Results Page

Like (1) ShareShare
ReportReport
Posted on 22 Jan 2025 16:49:38 by 44
Hi Community, 
 
I am having trouble extracting links from 3 first results on Google Search. 
 
Example below: 
 
 
I have already tryed GET DETAILS FROM WEB PAGE (HREF) or EXTRACT DATA FROM WEBPAGE, but each new result from a search list (for example: "basketball list of teams", "football UK teams", "football Spain teams") it doesn't go through. 
So this will be an iteraction and after I am write in a spreedsheet. 
 
How can I extract data without specifying an IU Element. 
 
Thanks in advance!
Categories:
I have the same question (0)
  • Suggested answer
    Deenuji_Loganathan_ Profile Picture
    6,206 Super User 2025 Season 2 on 23 Jan 2025 at 04:58:29
    Extract link from Google Search Results Page
    Hi There,
     
    You may consider the below approach to achieve your goal.
    Only you need little bit cleansing work before you merge your scrapped data into master table. Please take of that part.
     
     
     
     
    Code(Copy and paste the below code and paste into your power automate desktop app but please note recapture the populate text and press button element):
     
    Variables.CreateNewList List=> List
    Variables.AddItemToList Item: $'''basketball list of teams''' List: List
    Variables.AddItemToList Item: $'''football UK teams''' List: List
    Variables.AddItemToList Item: $'''football Spain teams''' List: List
    WebAutomation.LaunchEdge.LaunchEdge Url: $'''www.google.com''' WindowState: WebAutomation.BrowserWindowState.Maximized ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 PiPUserDataFolderMode: WebAutomation.PiPUserDataFolderModeEnum.AutomaticProfile TargetDesktop: $'''{\"DisplayName\":\"Local computer\",\"Route\":{\"ServerType\":\"Local\",\"ServerAddress\":\"\"},\"DesktopType\":\"local\"}''' BrowserInstance=> Browser
    Variables.CreateNewDatatable InputTable: { ^[] } DataTable=> MasterTable
    LOOP FOREACH CurrentItem IN List
        WebAutomation.PopulateTextField.PopulateTextFieldUsePhysicalKeyboard BrowserInstance: Browser Control: appmask['Web Page \'https://www.google.com/\'']['Text area \'Search\''] Text: CurrentItem Mode: WebAutomation.PopulateTextMode.Replace UnfocusAfterPopulate: True WaitForPageToLoadTimeout: 60
        WebAutomation.PressButton.PressButton BrowserInstance: Browser Control: appmask['Web Page \'https://www.google.com/\'']['Input submit \'Google Search\''] WaitForPageToLoadTimeout: 60
        WebAutomation.ExtractData.ExtractTable BrowserInstance: Browser Control: $'''html > body > div:eq(2) > div > div:eq(12) > div > div:eq(0) > div:eq(1) > div:eq(1) > div > div > div''' ExtractionParameters: {[$'''div > div > div > div:eq(0) > div > div > span > a''', $'''Href''', $'''''', $'''Value #1'''], [$'''div > div > div:eq(0) > div > div > span > a''', $'''Href''', $'''''', $'''Value #2'''] } PostProcessData: False TimeoutInSeconds: 60 ExtractedData=> DataFromWebPage
        Variables.MergeDataTables FirstDataTable: MasterTable SecondDataTable: DataFromWebPage MergeMode: Variables.MergeMode.AddExtraColumns
        WebAutomation.GoToWebPage.GoToWebPage BrowserInstance: Browser Url: $'''www.google.com''' WaitForPageToLoadTimeout: 60
    END
     

    Description

    Thanks,
    Deenuji Loganathan 👩‍💻
    Power Automate Desktop Community Champion 🤖
    ------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution for this topic ✔ and like my suggestion ❤️ Your feedback supports future seekers 🚀
  • hello11 Profile Picture
    44 on 23 Jan 2025 at 14:22:30
    Extract link from Google Search Results Page
     
    Thank you for the reply. 
    Your suggestion does not attend my problem. 
    How can I extract full url with UI Element (Href) from Google Search Results? 
     
    Thanks!
     

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…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 707 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 499 Moderator

#3
chiaraalina Profile Picture

chiaraalina 312

Last 30 days Overall leaderboard
Loading complete