Web Scraping with ChatGPT and Writing Results to Google Sheet

In this scenario, we will

  • Go to Etsy’s “Most Liked Items” category.
  • Copy the entire page.
  • Prepare a prompt for data extraction.
  • Paste the content into ChatGPT with the prompt.
  • Copy ChatGPT’s formatted output.
  • Paste it into Google Sheets.

Pre-Conditions:
Before running the scenario, it’s necessary to define scenario parameters as images on your own screens. You can see how to create an image parameter in this video.

image

Example Scenario:
OpenBrowser Chrome “https://www.etsy.com/search?q=Custom+embroidered+jackets&ref=search_bar&order=highest_reviews” -Incognito false
Wait Text “All Filters”
SendKeys CONTROL VK_A
SendKeys CONTROL VK_C
OpenBrowser Chrome " https://chatgpt.com/" -Incognito false
Click Text “Message ChatGPT”
Write “This is an Etsy webpage. Provide me with the sold quantity, price point, and description for each product in a tab-delimited table format that I can directly copy and paste into a Google Sheet.”
Wait Text “paste into a Google Sheet.”
SendKeys SHIFT ENTER
SendKeys CONTROL VK_V
SendKeys ENTER
Wait Image {DownArrow1}
Click Image {DownArrow1}
IsVisible Image {ResponseParam1} -Retry 20
Click Image {CopyIcon1}
OpenBrowser Chrome “https://docs.google.com/spreadsheets/u/0/” -Incognito false
Wait Text “Start a new spreadsheet”
Click Image {AddNewSpreadsheet}
Click Text “Share”
SendKeys CONTROL VK_V
SendKeys CONTROL VK_S