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 / Web-Scrapping using dy...
Power Automate
Answered

Web-Scrapping using dynamic list for google search results in to a excel spreadsheet.

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello All, I am a newbie. I have an assignment to Look for BusinessID number from a list in excel and save corresponding 8 digit business id next to each row of its name in excel. Could it be possible via Power Automate ? I have been so far able to create a flow to search but unable to select the text in <span> tag and verify it using Power Automate. 

Any ideas or help is appreciated regarding web scrapping google search results for dynamic list.

  • fraenK Profile Picture
    2,125 on at

    Can you post an example of that list/Google search? Getting data from Google searches might be difficult as the output includes multiple confidence levels.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    NidoSpartan_0-1616750429956.png

    I have a list of search strings, which is dynamic and then i want to extract the values as text or numbers every time a new text field is  populated and a new dynamic result is loaded and then extract the value and write it to an excel spread sheet columns to corresponding search string as input.

    https://youtu.be/FSeEehWBgu0

    For example in the above video, City Temperature values are extracted using selenium IDE , i would like to achieve the same but instead a city name its a dynamic string and instead temperature number it will be a dynamic 8 digit value. Thanks a lot in advance for any help or ideas to scrap this is highly appreciated.

  • fraenK Profile Picture
    2,125 on at

    You can try to always get the first search result and extract that number using a regex.

    But I doubt that this will work (without machine learning), as Google search results can be very dynamic. It would be better if you could restrict the search to certain sites.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much for your help. BTW do you happen to know a work around if i can combine a seleniumide flow,with my existing powerautomate desktop flow to dynamically search google? Any idea of help is highly appreciated again :). Because i think using selenium verify text stored in a variable could do the job of saving google query result as a text string of containing 8 digit restricted value.

  • Verified answer
    fraenK Profile Picture
    2,125 on at

    You don't really need selenium, it just increases complexity.

     

    For example to get the headline of each search result, just loop through the h3 elements by ordinal:

    h3:eq(%YourCountVariable%)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you so much, I have no words to express my gratitude for your help. This actually worked and I was even able to scrap from the Google search results without selenium using regex. Thanks a billion bucks again.

  • Dimeji Profile Picture
    9 on at

    Hello, I have the same issue where I need to make several searches from google and extract the dynamic results. Could you please describe in detail and possibly frames of how you were able to do this using regex?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello,

    I used for each loop for my excel row cell data to post on google then used results as web element to apply regex in chronological order and i was just  amazed how accurately power automate did the rest to insert exact only integer values in to the specified column of excel inside the for each loop. So would recommend to try first as it is like trial and error methodology to check if regex meets then inside for each loop. Let me know if still not clear i will share screen captures.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    NidoSpartan_0-1629185821840.png

     

    Here is for example the screenshot of my flow, so Variable Attribute value contains all the dynamic results from google then i am using my regex to match and store in Match variable based on a chronological order set in my google search to fetch the most recent and latest which you can set via advance search for google search settings :).

  • Dhanesha_007 Profile Picture
    15 on at

    Hi @fraenK, I saw this post and I have another issue with web scrapping. 

    Do you perhaps know how to extract more than 10 search results since I believe google rolled out pagination.

     

    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

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 271

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard