How to build a price tracker in n8n

Keep a Google Sheet of product URLs, fetch each page daily with the HTTP Request node, pull the price out with a Code node (or the HTML node and a CSS selector), and compare it with the last price stored in the sheet. An IF node sends a Telegram or Slack alert when it changes. Expect some shops to block bots or load prices with JavaScript.

Buy for $15 AI Automation Starter Pack for n8n — 8 ready-to-import workflows · $15

The workflow shape

  1. Schedule Trigger, once a day is plenty.
  2. Google Sheets: read the watchlist (url, label, last_price).
  3. HTTP Request: GET the url, response format Text, with a normal browser User-Agent header.
  4. Code: find the price and compare it with last_price.
  5. Google Sheets: write the new price and check date back, matched on url.
  6. IF changed, then Telegram Send Message (or Slack).

Finding the price reliably

Many shops publish structured product data for search engines. Reading that first beats guessing from the visible page. A Code node like this tries JSON-LD, then the itemprop attribute, then the og price meta tag.

const html = $json.data || '';
const tries = [
  /"price"\s*:\s*"?([\d.,]+)/,
  /itemprop="price"[^>]*content="([\d.,]+)"/,
  /product:price:amount"\s+content="([\d.,]+)"/,
];
let price = null;
for (const re of tries) {
  const m = html.match(re);
  if (m) { price = parseFloat(m[1].replace(/,/g, '')); break; }
}
return { json: { ...$json, price } };

Honest limits

Other ways to track prices

OptionGood forTrade-off
Price tracker apps and browser extensionsA few items you want to buyLimited to supported shops
Shop APIs or affiliate feedsExact data from big retailersNeed approval and keys
n8n with HTTP RequestYour own list of competitor pages, alerts your wayBreaks on blocked or JavaScript-only pages

Ready-made version

Workflow 07 in our starter pack is this tracker: a Watchlist sheet (url, label, price_regex, last_price, last_checked, last_changed, check_status), the price search order above plus a last-resort currency match, a per-row price_regex for awkward pages, a minimum change percentage, and Telegram alerts. Failed rows show price not found instead of breaking the run. It uses no AI.

It ran end to end on n8n 2.49.9 with local test copies of Google Sheets and Telegram. How well it reads a given shop depends on that shop, so test your own URLs.

The product

Questions

Can n8n read prices from JavaScript-heavy sites?

Not with HTTP Request alone. You need a headless browser service or a page-rendering API in front of it.

How often should it check?

Daily is usually enough for competitor pricing and keeps you polite to the sites you watch.

Why did it pick the wrong number?

The fallback match found another amount on the page. Add a regex with one capture group for that site.

Related

Updated 2026-12-01