Marcelo Cruz

July 20, 2024 

Reading Time: 3 minutes

Comprehensive Guide to Web Data Scraping with Power Automate Desktop

Web data scraping is a powerful technique that enables you to collect data from websites for various purposes, such as data analysis, reporting, and automation. Power Automate Desktop, a part of Microsoft’s Power Platform, offers an intuitive way to automate web data scraping without the need for extensive coding knowledge. In this blog post, we will walk you through a step-by-step tutorial on how to perform web data scraping using Power Automate Desktop. By the end of this guide, you will be able to extract book titles and prices from a website and export the data to an Excel file.

Step 1: Setting Up Power Automate Desktop

To get started, open Power Automate Desktop and create a new flow. This flow will contain all the steps needed to scrape the data from the website.

Launching the Browser

First, we need to configure our automation to open a web browser and navigate to the target website. Search for the action ‘Launch new Microsoft Edge’ and drag it into your flow. Configure it as follows:

  • Launch mode: Launch new instance
  • Initial URL: books.scrape.com
  • Window state: Maximize

Save the changes and run the automation to ensure the browser opens the website correctly.

Step 2: Extracting Data from the Web Page

Next, we will set up the automation to extract the titles and prices of the books listed on the website.

Extracting Book Titles

  1. In the actions pane, search for ‘Web data extraction’ and select ‘Extract data from web page.’
  2. Drag this action into your flow.
  3. Bring the web browser window to the foreground and use the live web helper to indicate the data you want to extract.
  4. Hover over the title of the first book, right-click, and select ‘Extract element value’ and then ‘Title.’
  5. Repeat the process for the second book title to help Power Automate Desktop recognize the pattern and extract all book titles.

Extracting Book Prices

  1. Hover over the price of the first book, right-click, and select ‘Extract element value’ and then ‘Text.’
  2. Power Automate Desktop will now recognize the pattern and extract the prices for all books listed on the page.

Step 3: Handling Pagination

To scrape data from multiple pages, we need to set up pagination.

  1. Identify the ‘Next’ button on the website.
  2. Right-click on the ‘Next’ button and select ‘Set element as a pager.’
  3. Configure the pager settings to specify how many pages you want to scrape. In this example, we’ll extract data until the third page. Set the ‘Max web pages to process’ parameter to 3.

Step 4: Exporting Data to Excel

Finally, we will configure the automation to export the extracted data to an Excel file.

  1. In the ‘Extract data from web page’ action, set the ‘Start at mode’ to ‘Excel spreadsheet.’
  2. Save the automation and run it to test if it extracts the data correctly and exports it to an Excel file.

After the automation completes, open the Excel file to verify that the titles and prices of the books have been extracted accurately.

Conclusion

Congratulations! You have successfully set up a web data scraping automation using Power Automate Desktop. This powerful tool allows you to automate repetitive tasks and collect valuable data with ease. By following this guide, you now have the skills to extract data from web pages and export it to an Excel file for further analysis.

To see the full step-by-step tutorial in action, including detailed visual aids and additional tips, make sure to check out the video tutorial linked below. This video will provide you with a comprehensive walkthrough of the entire process, ensuring you don’t miss any crucial steps.

Call to Action

If you found this guide helpful, don’t forget to like and subscribe to our channel for more RPA-related videos. Watching the video tutorial will give you a clearer understanding of each step and help you master web data scraping with Power Automate Desktop. Click here to watch the tutorial now!

Thank you for reading, and happy automating!

Recommended  blogs

Enjoy free tips and latest news

Stay updated with the latest news and tips on RPA and AI. Subscribe for free and receive insights directly to your inbox.