Scrape product prices and send GPT-4o-mini insights to Google Sheets and Gmail
Needs changesWhat this workflow does
This AI workflow has 15 nodes and runs on a schedule (every day at 09:00). Along the way it connects Google Sheets, OpenAI Chat Model and Gmail. It also calls books.toscrape.com over HTTP.
How it runs
Trigger: On a schedule (every day at 09:00).
- 2. HTTP — Fetch Website HTML (HTTP Request): calls books.toscrape.com
- 3. HTML — Extract All Products (HTML): parses or builds HTML
- 4. Split Out — One Product at a Time (Split Out): splits a list into separate items
- 5. HTML — Extract Title and Price (HTML): parses or builds HTML
- 6. Sort — By Price Descending (Sort): sorts the items
- 7. Code — Add Date and Clean Price (Code): runs custom JavaScript code
- 8. Google Sheets — Save Products (Google Sheets): append
- 9. Code — Compile for AI and Stats (Code): runs custom JavaScript code
- 11. Convert to CSV File (Convert to File): converts data to a file
- 10. AI Agent — Price Analysis (AI Agent): runs an AI agent, with model: OpenAI — GPT-4o-mini Model
…plus 3 more steps. See the full node list below.
Services it uses
HTTP calls to: books.toscrape.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in 10. AI Agent — Price Analysis (v1.9): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) 10. AI Agent — Price Analysis (v1.9) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (12)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - HTML
n8n-nodes-base.html - Split Out
n8n-nodes-base.splitOut - Sort
n8n-nodes-base.sort - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Convert to File
n8n-nodes-base.convertToFile - Merge
n8n-nodes-base.merge - Gmail
n8n-nodes-base.gmail
From the author
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…