Daily competitor price tracker for ecommerce SKUs

By General Input

Scrape competitor prices every morning, log a price history in Google Sheets, and get a Slack alert the moment a tracked SKU jumps, drops, or goes out of stock.

Integrations

  • Apify
  • Google Sheets
  • Slack

Type

Deterministic Code

Categories

  • Operations
  • Marketing

Build me a code-based workflow that tracks competitor ecommerce prices every morning and alerts my team in Slack when something material changes. The workflow should run on a daily cron, default 7am in the org timezone, and the schedule should be easy to edit.

Top-level config the workflow should expose as inputs: the Google Sheets spreadsheet ID, the name of the SKU config tab (default "SKUs"), the name of the price history tab (default "History"), the Apify Actor ID to use for scraping (for example apify~amazon-product-scraper or forward_workstation~competitor-price-tracker), the percent change threshold for alerts (default 5), and the Slack channel ID where alerts should post. Surface these as named inputs so the same workflow can be cloned per merchandising team without code edits.

Step 1: Read the SKU list from Google Sheets using the Get Values operation against the config tab. Each row should have at minimum a SKU name and a product URL, plus optional columns like brand or category. Parse this into the working list for the run.

Step 2: Run the Apify Actor using the Run Actor Synchronously and Get Dataset Items operation, passing the SKU URLs as the Actor's input (the exact input shape depends on the Actor, so build the input object based on the configured Actor ID). For each item in the returned dataset, capture today's price, currency, stock status (in stock vs out of stock), and Buy Box owner or seller name where the Actor provides it. Tolerate Actors that return partial fields by defaulting missing values to null.

Step 3: Read the previous snapshot from the price history tab using Get Values. For each SKU, find the most recent prior row and compute the delta: absolute price change, percent change, and whether stock status flipped. If there is no prior row for a SKU, treat it as a new SKU with no delta.

Step 4: Append today's snapshot to the history tab using the Append Values operation. One row per SKU with columns: run date, SKU name, product URL, price, currency, stock status, Buy Box owner, percent change vs previous run. This builds the long-running price history.

Step 5: For each SKU whose absolute percent change exceeds the configured threshold OR whose stock status flipped between in stock and out of stock, send a Slack alert using the Send a Message operation to the configured channel. The message should include the SKU name, old price and new price with currency, the percent change with an up or down arrow, the new stock status, and a link to the product listing. Group multiple alerts into a single message with one line per SKU rather than spamming the channel with one message per change.

If no SKUs cross the threshold and no stock flips happen, do not post anything to Slack. The history sheet should still be updated so the price-over-time chart keeps accumulating.

Error handling: if the Apify run fails or returns zero items, post a short failure message to the Slack channel so the team knows the tracker did not run cleanly, and skip the sheet append for that run.

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