ScreenshotNeo

BlogHow-to

How to monitor Indian competitor prices with n8n and Google Sheets

Build an n8n workflow that checks permitted competitor product pages, validates prices, records history in Google Sheets, and alerts only on meaningful changes.

By the ScreenshotNeo team4 October 202610 min read

To monitor Indian competitor prices with n8n and Google Sheets, schedule a workflow that reads active product URLs from a sheet, fetches each permitted page, extracts and validates the displayed price and currency, compares it with the last observation, appends a timestamped history row, updates the current-price row, and sends an alert only when a validated change meets your threshold.

Start with an official retailer API or product feed when one is available and appropriate. Use page retrieval only where the site permits it and your intended use complies with its terms and access controls. The workflow below is a pattern to adapt: no retailer-specific selectors or access permissions are established here. See n8n’s workflow examples for a published competitor price-monitoring pattern using a schedule, Google Sheets, page retrieval, extraction, comparison, and history.

1. Design the spreadsheet for reliable comparisons

Use separate tabs for the watch list, current values, and append-only history. Give every monitored product a stable key. A product URL alone may not identify the exact offer: model, size, seller, bundle, delivery terms, and discount conditions can all affect the displayed price.

Tab Suggested columns Purpose
Watchlist product_key, competitor, product_name, variant, seller, URL, currency, selector, cadence, threshold, active Defines what to check and how to interpret it.
Current product_key, observed_at, price, currency, previous_price, change_pct, status, evidence_ref One latest record per monitored product.
History observed_at, product_key, competitor, product_name, variant, seller, URL, price_text, price, currency, previous_price, change_pct, changed, status, evidence_ref Preserves observations so changes and extraction issues can be audited.

Use ISO currency codes such as INR and store numeric values separately from the displayed text. Keep the exact extracted string, for example ₹1,499, alongside the normalized amount. Do not compare two products unless their variants and price context are comparable.

2. Build the n8n workflow

  1. Schedule Trigger: choose a cadence that matches the business need and the target site’s published conditions. A daily schedule can be enough for many use cases; do not copy a template interval as permission or a universal safe rate.
  2. Google Sheets: read active rows: load the watch list and filter to active entries. Avoid fetching rows that are paused or have incomplete URLs or selectors.
  3. Loop over items: process a small batch or one URL at a time. Add a deliberate delay and concurrency limit appropriate to the site. The n8n example uses a 20-second delay, but that is only an example setting, not a safe interval for every retailer.
  4. Fetch page: use an HTTP Request node for an allowed public page or the official API/feed. Set a timeout, follow expected redirects, and capture status and error details. Do not attempt to bypass CAPTCHAs, bot checks, authentication barriers, or access controls.
  5. Extract: select the intended price field, not the first currency-looking number on the page. A retailer’s markup may change, and selectors must be checked for each page type.
  6. Normalize and validate: retain displayed text and currency, parse a numeric amount, and reject missing, ambiguous, malformed, or implausible values. Check expected currency and variant. If validation fails, write an extraction-error observation and do not emit a price-change alert.
  7. Read current value and compare: fetch the existing row by product_key. Compute absolute difference and percentage change only when the prior amount is numeric and nonzero.
  8. Append history: add one observation to the History tab, including errors where useful. Google Sheets values.append adds values after the last row of a logical table in the supplied range; it requires a spreadsheet ID, range, and valueInputOption. See the Google Sheets append reference.
  9. Update current value: update or upsert the Current row keyed by product_key. Appending every run to this tab creates duplicates and makes the latest value harder to query.
  10. Alert selectively: notify only if extraction passed validation and a chosen absolute or percentage threshold was crossed. Include product and variant, seller, current and previous prices, currency, time, URL, and any uncertainty.

For evidence, store the exact extracted text and a snapshot reference or normalized page fingerprint when your use case warrants it. A later n8n template describes retaining snapshots or fingerprints to help verify a detected change; this is a useful design idea, not measured performance evidence.

3. Extract and validate prices safely

CSS selectors are page-specific. Inspect the permitted page structure, identify the element that represents the actual offer price, and test it against representative variants, sale states, and out-of-stock pages. Prefer a documented API or feed where available. A generic selector such as .price can match crossed-out list prices, recommendations, shipping, or another seller’s offer.

Normalize without discarding the original value. For Indian number formatting, a displayed value such as ₹1,23,456.78 should be parsed as 123456.78 INR, not 1.2345678 or 123.45678. Do not assume every page uses the same grouping marks, decimal separator, currency symbol, or text convention. If parsing is uncertain, mark the observation invalid for alerting and review the selector or parser.

  • Require a non-empty price string and a recognized currency.
  • Validate that the extracted value belongs to the configured product and variant.
  • Decide whether to compare list price, sale price, or the effective price under a stated coupon or membership condition; record that choice.
  • Handle unavailable, out-of-stock, and “price shown in cart” states separately from numeric price changes.
  • Reject outliers or large jumps for review rather than silently treating them as true price moves.
  • Record a timestamp with timezone, page URL, extraction status, and evidence sufficient to investigate a notification.

4. Compare values and decide when to alert

For current price p and previous price old, the absolute difference is p - old. Percentage change is ((p - old) / old) × 100 when old is greater than zero. Define your policy for the first observation, zero or missing prior prices, currency changes, and invalid values before enabling alerts.

For example, you might alert only when a validated price changes by at least a chosen rupee amount or percentage. The right threshold depends on the product and business decision; the research does not establish a universal threshold. Consider separate alert rules for price decreases, increases, and availability changes. De-duplicate alerts so repeated runs do not resend the same unchanged observation.

5. Configure Google Sheets access and handle quotas

Connect n8n to the spreadsheet using its Google Sheets integration and grant only the access the workflow needs. Keep credentials in n8n’s credential storage, restrict who can edit the workflow, and avoid placing secrets in sheet cells or execution logs.

Google publishes limits of 300 read requests per minute per project and 300 write requests per minute per project, with 60 reads and 60 writes per minute per user per project. Requests above quota can return HTTP 429. Google recommends truncated exponential backoff for time-based quota errors and suggests keeping request payloads to 2 MB or less for speed. These figures and policies can change; check the current Sheets API usage limits before deployment.

Batch reads and writes where practical instead of making a Sheets call for every field or product. Bound retries, increase delay between retry attempts, and stop after a configured maximum. Retry quota and transient service errors; do not repeatedly retry a blocked retailer page.

6. Performance, reliability, and operating cost

  • Runtime: total duration depends on URL count, target response times, waits, and concurrency. Start with a small batch, then adjust only while respecting each site’s conditions.
  • Reliability: use timeouts, explicit error branches, bounded retries, and an execution log. Distinguish fetch failure, blocked response, selector miss, parse failure, and valid unchanged price.
  • Data quality: keep history separate from current state, preserve source evidence, and review selector failures. A layout change should become an extraction error, never a price alert.
  • Sheets load: batch operations and avoid unnecessary reads. Sheets quota applies to API activity, and repeated small requests can hit per-user limits even when project-wide use is modest.
  • n8n deployment: n8n documents both hosted and self-hosted deployment options; hosting, execution retention, and operational costs depend on the chosen setup. See n8n documentation.
  • Target-site impact: monitor only as often as the business requires, use a low bounded request rate, and honor published terms and technical restrictions. A delay is not authorization.

7. India-specific considerations

The Department of Consumer Affairs lists the Consumer Protection (E-Commerce) Rules, 2020 and amendments on its consumer protection legislation page. That is relevant context for Indian commercial operators, but it does not determine whether a particular monitoring setup is permitted. Review the target site’s terms, access controls, API or feed conditions, and intended use; seek qualified legal advice for high-stakes deployments.

The Digital Personal Data Protection Act, 2023 is relevant context for digital personal data processing in India. A product-price workflow generally does not need customer names, account details, or other personal data. Keep the watch list focused on product and price information, and assess the applicable law and commencement rules for your circumstances.

8. Troubleshooting

Symptom Likely cause Fix
Price is blank or selector returns nothing Page structure changed, content is rendered later, or selector targets the wrong page variant. Inspect the permitted page, verify the selector for that product type, and add an explicit wait only if needed. Record a selector error rather than writing zero.
Alert reports a wildly different price Parser mishandled Indian digit grouping, selected an old/list price, or matched another offer. Retain raw text, validate currency and variant, check the matched element, and reject implausible deltas for review.
HTTP 403, CAPTCHA, or bot check The site denied automated access or requires an interaction. Stop retries. Use an official API/feed or request permission; do not try to defeat the access control.
HTTP 429 from Google Sheets Per-project or per-user quota exceeded. Batch requests, reduce calls, and use bounded truncated exponential backoff as Google recommends.
Current tab has duplicate product rows The workflow appended current state on every run. Use a stable product_key to update or upsert one row; reserve append behavior for history.
Notifications repeat without a new change Alert logic compares against the wrong value or sends on every valid run. Compare with the prior stored value, persist an alert/deduplication key, and notify only after threshold checks pass.
Workflow times out or runs overlap Too many URLs, slow responses, long delays, or a schedule interval shorter than run time. Reduce batch size or cadence, set explicit timeouts, limit concurrency, and prevent overlapping executions where your n8n setup supports it.
Price changed but no notification arrived Threshold not met, currency mismatch, invalid extraction, or notification branch error. Inspect execution data and history status, confirm threshold units and currency, then test the notification node with a known valid record.

Or skip the browser setup

If your monitoring process needs page screenshots as evidence, ScreenshotNeo can capture a URL with one GET request. Its browser capture flow accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. The API response identifies page verdict and billing status in headers. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.

For example, capture a product page as a WebP image:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://www.example.in/product -o shot.webp

Python:

import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://www.example.in/product"},
    timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({
  access_key: 'YOUR_API_KEY',
  url: 'https://www.example.in/product',
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', new Uint8Array(await res.arrayBuffer()));

See the ScreenshotNeo API documentation for request options. ScreenshotNeo offers 1,000 screenshots per month free with no card; paid plans start at $5 for 3,000. It is a screenshot API, so use your permitted data source and extraction method for price values.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

FAQ

Should the workflow store every page response?

Store enough evidence to investigate a price change, such as the raw extracted price text and a snapshot reference or normalized fingerprint. Avoid retaining more page data than your use case requires.

What should happen on the first successful run?

Write the validated value as the baseline and mark it as an initial observation. There is no previous value to compare, so do not send a price-change alert.

Can I monitor sale prices and regular prices together?

Yes, if you define separate fields and rules. Label each price type, preserve the displayed context, and compare like with like across runs.

How often should I run the workflow?

Choose a cadence based on how quickly the information is useful and what the target site permits. The interval in an example workflow is not a general authorization or recommendation.

Sources