Most "AI price monitor" builds I see end the same way: HTTP Request → OpenAI → parse the JSON → hope. It demos beautifully and then quietly costs you money on every run, twice an hour, forever.
For price monitoring that is the wrong tool. Reading a number out of a product page is a parsing problem, not a reasoning problem, and an LLM is the one component in the stack that can invent a plausible price when the page loads slowly, returns a CAPTCHA, or has three prices on it (the variant, the "was" price, the cross-sell).
So this build has no AI in it at all. Every 6 hours it fetches each competitor product URL once, extracts price and stock with plain JavaScript, compares them to the last known value in a Google Sheet, and stays completely silent unless something actually moved. When something does move, you get one Slack message and one history row.
Here is the whole thing, node by node, including where it breaks — because the failure modes are what decide whether you trust a monitor or stop reading it after week two.
The shape of the workflow
Schedule (every 6h) → Google Sheets: read "Competitors" → Code: prepare checks (valid URLs, cap at 25) → Split In Batches (size 1) → HTTP Request: fetch product page → Code: extract price + stock → IF anything changed? true → Sheets: append "Price History" → Sheets: update baseline row → Code: build alert text → Slack: post message → back to the loop false → back to the loop Eleven nodes, one credential type (Google Sheets OAuth2) and Slack. No OpenAI key, no Amazon SP-API, no Shopify app review, no scraping subscription.
The important design decision is Split In Batches with size 1. One bad page — a 404, a timeout, a store that returns a bot wall — then costs you one row instead of the whole run. The HTTP Request node is set to continue on error with regular output, so a failed fetch still reaches the extraction node and produces a clean fetch_ok: false instead of a red execution you'll learn to ignore.
1. The sheet is the configuration
Two tabs, lowercase headers, spelled exactly. You fill the first nine columns; the workflow owns the last three.
Competitors
product_key, product, competitor, url, my_price, currency, last_price, last_stock, alert_threshold_pct, notes, last_checked, last_change -
product_keyis the row's identity and the match key for updates — keep it stable (lamp-01-rival). -
urlmust start withhttp. Rows without a URL are skipped, so you can keep a product in the sheet before you find the competitor link. -
alert_threshold_pctis a per-row noise floor.1means "tell me about a 1% move";5means "only 5%+". A 3% swing on a €9 item is noise; on a laptop it's a decision. One global threshold is the reason most price alerts get muted. - Leave
last_priceandlast_stockempty on the first run.
Price History — append-only, written only on change:
checked_at, product_key, product, competitor, currency, old_price, new_price, change_pct, old_stock, new_stock, reasons, url reasons is written in plain English: price drop 7.4%, went out of stock, back in stock, baseline captured. Six months from now that column is the only thing that will tell you why a row exists.
Starting with an empty history tab is correct. A quiet week leaves it empty, and that is the product: you learn that nothing moved without reading anything.
2. Fetching the page like a browser would
A bare fetch from a server gets a different page than Chrome does, so the HTTP Request node sends the two headers that matter most:
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0 Safari/537.36 Accept-Language: en-US,en;q=0.9 Plus timeout: 25000, followRedirects: true (max 5) and response format: text — you want raw HTML, not n8n's auto-JSON.
One request per URL per run. That's it. No crawling, no pagination, no category pages: the more you ask of someone else's server, the more likely you are to be blocked — and a monitor you can't trust is worse than a bookmark.
3. Extracting the price: a cascade, not a guess
The extractor tries five strategies in descending order of reliability. This is the core of the whole build, so here it is in full:
const toNum = (s) => { if (s === null || s === undefined) return null; const cleaned = String(s).replace(/[^\d.,]/g, '').replace(/,/g, ''); const v = parseFloat(cleaned); return isNaN(v) ? null : v; }; let price = null, currency = ''; // 1. JSON-LD (schema.org Product) — Shopify, WooCommerce, BigCommerce, most headless stores const ldCur = html.match(/"priceCurrency"\s*:\s*"([A-Z]{3})"/); if (ldCur) currency = ldCur[1]; const ld = html.match(/"(?:price|lowPrice|salePrice|highPrice)"\s*:\s*"?([0-9][0-9.,]*)"?/i); if (ld) price = toNum(ld[1]); // 2. Schema.org microdata if (price === null) { const micro = html.match(/itemprop=["']price["'][^>]*content=["']([0-9][^"']*)["']/i) || html.match(/content=["']([0-9][^"']*)["'][^>]*itemprop=["']price["']/i); if (micro) price = toNum(micro[1]); } // 3. OpenGraph product price if (price === null) { const og = html.match(/(?:og:price:amount|product:price:amount)["'][^>]*content=["']([0-9][^"']*)["']/i); if (og) price = toNum(og[1]); } // 4. data-* attributes if (price === null) { const attr = html.match(/data-(?:price|product-price|sale-price)=["']([0-9][^"']*)["']/i); if (attr) price = toNum(attr[1]); } // 5. Last resort: currency symbol followed by a number if (price === null) { const sym = html.match(/(?:[$€£₩₹¥]|USD|EUR|GBP|KRW|INR|JPY)\s?([0-9][0-9.,]{1,11})/); if (sym) price = toNum(sym[1]); } Two details that matter more than they look:
Currency comes from the page, not from you. "priceCurrency": "EUR" in JSON-LD is authoritative; otherwise the symbol is mapped ($ → USD, € → EUR, £ → GBP, ₩ → KRW, ₹ → INR, ¥ → JPY). Mixed-currency competitor lists then compare numbers as numbers, not as converted values — which is a known limitation, not a hidden one.
Step 5 is honest about being a guess. It only runs when structured data is missing entirely, and it's the step that produces wrong numbers most often: a "related products" carousel, a shipping banner, a discount badge. For a store that is consistently caught by step 5, use the exact variant URL and consider whether the row belongs in the monitor at all.
4. Stock: schema first, page copy second
const avail = html.match(/"availability"\s*:\s*"([^"]+)"/i); let inStock = true; let stockSource = 'assumed (no signal found)'; if (avail) { const a = avail[1].split('/').pop(); // schema.org/OutOfStock → OutOfStock if (/OutOfStock|SoldOut|Discontinued/i.test(a)) { inStock = false; stockSource = 'schema:' + a; } else if (/InStock|LimitedAvailability|PreOrder|BackOrder/i.test(a)) { inStock = true; stockSource = 'schema:' + a; } } else { const OOS = ['out of stock', 'sold out', 'currently unavailable', 'notify me when available', '품절', 'soldout', 'temporarily unavailable']; const hit = OOS.find(k => html.toLowerCase().includes(k)); if (hit) { inStock = false; stockSource = 'page copy: "' + hit + '"'; } } Carrying stock_source through to the sheet is the single most useful debugging field in the workflow. schema:OutOfStock you can trust. page copy: "out of stock" on a page that also has a "you may also like" carousel that happens to contain that phrase is a maybe — and now you can see which one you got.
5. Deciding whether anything changed
This is where a monitor earns its keep, and it's four lines of arithmetic plus a rule:
const prevPrice = item.last_price === '' || item.last_price === null ? null : toNum(item.last_price); const prevStock = String(item.last_stock || '').toLowerCase(); const threshold = Number(item.alert_threshold_pct || 1); const reasons = []; let changePct = ''; if (price !== null && prevPrice !== null && prevPrice > 0) { const diffPct = ((price - prevPrice) / prevPrice) * 100; changePct = diffPct.toFixed(2); if (Math.abs(diffPct) >= threshold) { reasons.push((diffPct < 0 ? 'price drop ' : 'price rise ') + Math.abs(diffPct).toFixed(1) + '%'); } } if (prevStock && prevStock !== stockNow) { reasons.push(prevStock === 'in' ? 'went out of stock' : 'back in stock'); } if (prevPrice === null && price !== null) reasons.push('baseline captured'); const changed = reasons.length > 0; Three rules that keep the alert channel quiet enough to stay useful:
- A missing baseline is not an alert. The first run writes
baseline capturedonce per row and sends nothing to Slack. Otherwise day one looks like 40 products just dropped in price. - The baseline updates only on change. After an alert,
last_priceis overwritten with the new value, so a $10 drop that stays a $10 drop is one message, not one every six hours until you change the sheet by hand. - Stock flips are unbounded by the threshold. In/out is the signal you can't afford to miss, and it's binary — no noise filter needed.
6. The alert
Inside the loop, after the history row is written and the baseline updated:
const money = (v, c) => (v == null || v === '' ? 'n/a' : (c ? c + ' ' : '') + Number(v).toLocaleString()); const dir = r.change_reasons.includes('drop') ? '📉' : r.change_reasons.includes('rise') ? '📈' : '⚠️'; const lines = [ dir + ' *Competitor change* - ' + (r.product || r.product_key), (r.competitor ? '*' + r.competitor + '*' + ' · ' : '') + r.change_reasons, 'price: ' + money(r.prev_price, r.currency) + ' → *' + money(r.price, r.currency) + '*' + (r.change_pct ? ' (' + r.change_pct + '%)' : ''), 'stock: ' + (r.prev_stock || 'unknown') + ' → ' + r.stock_now, r.my_price !== '' ? 'your price: ' + money(r.my_price, r.currency) : '', '', '<' + r.url + '|open product page>', ]; Which arrives as:
📉 Competitor change - Arc floor lamp Rival Store · price drop 7.4%, went out of stock price: USD 149 → USD 138 (-7.40%) stock: in → out your price: USD 149 <https://rivalstore.example/products/arc-floor-lamp|open product page> Including your price in the same message is the small thing that makes it actionable — the number you need is in the alert, not one lookup away.
The Slack node is set to continue on error, and it sits inside the loop. A mistyped channel name should never cost you the remaining 24 URL checks; by the time the alert is built, the history row is already saved.
7. Where this breaks (read this before you trust it)
This is a page scraper. Being clear about the edges is the difference between a tool you use and one you quietly stop checking.
- Pages that render the price in JavaScript cannot be read. Plain
fetchgets the HTML before the price is injected. Marketplaces and modern storefronts that do this will return no price at all. Options: a rendering service (ScrapingBee, Bright Data, Apify, Firecrawl) dropped into the same HTTP node — the rest of the workflow doesn't change — or check those few by hand. - Stores that block bots return
fetch_ok: false, never a guessed number. Amazon's layout changes constantly and some big-box retailers put everything behind a bot wall. The workflow reports "page could not be fetched" and moves on. A monitor that invents a price is worse than no monitor, because you'll act on it. - Heuristic parsing wins the first match. Variant swatches, "was/now" pricing and cross-sells all put extra numbers on the page. Check the first few history rows against the live page once, deliberately, before you rely on it.
- Stock is a text signal at worst.
stock_sourcetells you whether you gotschema:OutOfStockor a substring match on page copy. - 25 URLs per run is a hard cap (
MAX_PER_RUN). A 200-SKU catalogue wants a longer interval or a second copy of the workflow on a different schedule, not a bigger batch — a 200-request burst is how you get blocked. - Scraping is your responsibility. Public price pages, one request per URL every 6 hours, no personal data: that's ordinary competitive monitoring in most jurisdictions. It is still on you to respect each site's terms and
robotsrules and not to point it at sites that forbid it.
8. What it costs
| Item | Per run | Per month (every 6h) |
|---|---|---|
| AI tokens | 0 | $0 |
| Google Sheets API | 2 read/write ops per changed row | free tier |
| Bandwidth | 25 pages × ~300 KB | a few hundred MB |
The only real cost is the n8n instance you already have. Compare that to a $20–$50/month price-monitoring SaaS for the same handful of URLs and the same "tell me only when it moves" behaviour.
9. Tuning, by outcome
| You want | Change |
|---|---|
| Only big moves | Raise alert_threshold_pct per row (3–5 for commodity goods) |
| Check more often | hoursInterval in the Schedule node — mind the site's load and your IP |
| Alerts in your working hours | Set the workflow timezone; competitor pages change at 3 a.m. |
| No Slack | Delete the node — the sheet still becomes a chartable price history |
| Telegram / Discord / email instead | Swap the last node; the message body is already prepared as text |
| A "daily digest" instead of per-change | Move the Slack node outside the loop and post once with all rows |
The whole thing, if you'd rather not rebuild it
The full workflow described above — the extraction cascade, the threshold and baseline logic, the plain-English reasons, the in-canvas sticky notes with the column lists — is workflow 01 of the E-Commerce Growth Pack, three importable n8n workflows for the three jobs that decide whether a small store grows: knowing what competitors charge, writing listings that convert, and answering support mail before it becomes a dispute.
- Store: opsforgeai.gumroad.com
- E-Commerce Growth Pack ($69): opsforgeai.gumroad.com/l/ecommerce-growth-pack
- Weekend Launch Kit ($9) — three landing-page templates (SaaS waitlist, B2B lead form, pricing page), for when the monitor tells you it's time to actually launch something: opsforgeai.gumroad.com/l/weekend-launch-kit
No affiliate links, no countdown timers. If you build it yourself from the code above, that's a genuinely fine outcome — the parsing order and the per-row threshold are the parts that took the thinking.
