Watch competitor prices and alert Slack on changes

By General Input

Every four hours, check each product URL in your sheet, compare to the last known price, and ping Slack when anything moves more than a few percent.

Integrations

  • Google Sheets
  • ScrapingBee
  • Slack

Type

Deterministic Code

Categories

  • Operations
  • Marketing

Build a code-based workflow that watches a Google Sheet of competitor product prices on a recurring schedule and alerts Slack when prices move.

Trigger: cron, every 4 hours.

Inputs the workflow needs: the Google Sheets spreadsheet id, the name of the watch list tab, the name of the history tab, the Slack channel id that should receive alerts, and a percent change threshold with a default of 5.

The watch list tab has one row per product with three columns: product URL, the CSS selector for the price element on that product's page, and the last known price as a number.

On every run, do the following in order:

1. Use Google Sheets Get Values to read every row of the watch list tab.

2. For each row, call ScrapingBee Extract Structured Data with CSS/XPath, passing the row's product URL and the row's CSS selector as a single extract rule, to fetch the current price text. Parse that text into a number by stripping currency symbols, thousands separators, and whitespace, and normalising the decimal mark. If the scrape fails or no numeric price can be parsed, skip that row entirely (do not update its last known price, do not log it).

3. Compute the percent change between the parsed new price and the row's last known price. If the absolute percent change is greater than or equal to the threshold, mark the row as crossed.

4. For every crossed row, use Google Sheets Append Values to append a row to the history tab with these columns: product URL, ISO 8601 timestamp of the run, old price, new price, and percent change (signed).

5. If at least one row crossed the threshold, use Slack Send a Message to post a single summary message to the configured channel. List each crossed product on its own line with the product URL, the old price, the new price, and the signed percent change. Use an up or down arrow to indicate direction. If no rows crossed, skip Slack entirely and post nothing.

6. For every row where the scrape succeeded and produced a numeric price (crossed or not), use Google Sheets Update Values to overwrite the last known price column on that row with the new price, so the next run compares against the most recent value.

Determinism matters: same inputs should produce the same writes. No LLM judgement calls. The CSS selector per row is what lets one workflow handle heterogeneous storefronts.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentLocal listing health board for every location you manageWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerStop cold emails to anyone with a live deal in PipedriveiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats