Scrape product prices and send GPT-4o-mini insights to Google Sheets and Gmail
Go to WorkflowDescription
Quick Overview
This workflow runs daily at 9 AM to scrape product titles and prices from a target website, store the results in Google Sheets, generate price statistics and an OpenAI GPT-4o-mini market insight, and email a formatted report with a CSV attachment via Gmail.
How it works
Runs every day at 9:00 using a schedule trigger.
Fetches the target webpage HTML over HTTP and extracts all product blocks with CSS selectors.
Splits the extracted product blocks into individual items, then parses each product’s title and price and sorts the list by price in descending order.
Cleans the price into a numeric field and adds the current scrape date to each product record.
Appends the product rows to a Google Sheets tab and, in parallel, calculates min/max/average price plus top and bottom price lists for analysis.
Sends the compiled price context to OpenAI (GPT-4o-mini) to generate a short plain-text market insight.
Converts the scraped product list into a CSV file, then emails the stats and AI insight with the CSV attached using Gmail.
Setup
Update the target URL and the CSS selectors used to extract product blocks, titles, and prices to match the site you want to scrape.
Add an OpenAI credential and ensure the workflow can access the GPT-4o-mini model.
Add Google Sheets OAuth credentials, set the spreadsheet ID, and create a “Products” sheet with columns for Title, Price, and Scraped Date.
Add Gmail OAuth credentials and set the recipient email address used to send the daily report.