Skip to content

Lesson 11 6 min

A price drop alert with memory

Read the price when it changes, compare it with the last one the workflow saw, and tell you only when it drops.

Try it in AWFlow

Opens this lesson's workflow in AWFlow. You review it before anything is saved.

Import the recipe (opens in a new tab)

The six steps

  1. Element Change watches .price and fires when its content changes (Content changes).
  2. Regex with Match finds the first number, such as 79.99, and puts it in priceMatch.
  3. Data Store with Get reads last-price, saved by earlier runs of this workflow.
  4. IF compares the new number with the stored one (less than).
  5. Show Notification posts Price dropped! with the new and old price; Require Interaction keeps it on screen until you close it.
  6. Data Store with Set saves the new number as last-price for the next change. Both branches of the IF reach this step.
The settings of the Did the price drop? step (If): one condition comparing two expressions, with Add Condition.The settings of the Did the price drop? step (If): one condition comparing two expressions, with Add Condition.
The condition

Data Store values live in this browser profile and need no account: nothing is sent anywhere.

Make it yours

Pick the price on your product page with the crosshair in CSS Selectors and set URL Patterns to that shop, for example https://shop.example.com/product/*. Save, activate and keep the page open. For prices written 1.299,00, adjust the Regex Pattern. To be told only below a target, compare with a fixed number such as 50 instead.

Key takeaways

  1. Regex Match pulls the number out of the changed text.
  2. Data Store Get and Set remember last-price between runs, in this browser.
  3. The first change only saves a price; alerts start from the second.