Quick Overview
This workflow runs daily, reads e-commerce category URLs from Google Sheets, captures fully rendered HTML with Snapshot Site, uses an OpenAI chat model to extract structured product data, and upserts the results back into Google Sheets while logging capture/extraction errors to a separate tab.
How it works
- Runs every day at 11:00 (UTC) on a schedule.
- Reads category page URLs from the “Store Sources” tab in Google Sheets and processes them one at a time.
- Uses Snapshot Site to fetch the fully rendered page HTML for each URL, retrying on failures.
- If Snapshot Site returns an error, writes the URL, error message, and timestamp to the “Extraction Errors” tab in Google Sheets.
- If the capture succeeds, removes scripts/styles and trims the HTML before sending it to an OpenAI model via the Information Extractor to return a list of products with structured fields.
- Splits the extracted products into individual rows and appends or updates them in the “Products” tab in Google Sheets, deduplicating by productUrl.
Setup
- Install the community node
n8n-nodes-snapshot-site and add Snapshot Site API credentials.
- Add a Google Sheets OAuth2 credential and update the spreadsheet URL/ID and tab names (“Store Sources”, “Products”, “Extraction Errors”) to match your document.
- Add an OpenAI API credential (or compatible chat model supported by the OpenAI chat node) and select the model you want to use for extraction.
- Ensure your “Store Sources” tab has a
url column, and create matching headers in the “Products” and “Extraction Errors” tabs so auto-mapping works (including productUrl for upserts).