π Scrape product prices and send GPT-4o-mini insights to Google Sheets and Gmail
β‘ 58 views Β· π Market Research & Insights
π‘ Pro Tip β HTTP Request scraping tends to break when sites update their markup. If youβre scraping a major platform, check if ScraperNode covers it β it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.
Description
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.
π Nodes Used
Google Sheets, HTTP Request, Gmail, Schedule Trigger, AI Agent, OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File