Browse the docs

A web page changes

Checks a page on a schedule and runs the macro when its text, a price, a feed or a list changes, such as a price drop or a new listing.

When url changes

Details #

The engine checks the page every every seconds (at least 60), by a fetch that looks like a browser (the default; with signIn it is signed in) or by via: tab, a background tab while a browser is connected. The same address watched by several macros is fetched once per check. The first check only records what the page says now; set fireOnFirst to run on it too.

What is compared depends on kind: text (the page, or selector), fields (the fields recipe, as in Scrape a page into rows), feed (the page's RSS, Atom or JSON feed), list (the page's rows), status (the HTTP status) or snapshot (the accessibility tree, steadier than HTML on a page that reshuffles ids).

when picks the change: changed (the default), increased, decreased, appeared, disappeared, or new. by qualifies it (5 or 5%). feed and list fire once per new row (identified by key) with the row as the inputs: new listings, new posts, new releases. threshold ignores small changes (characters, or percent) and ignore lists selectors to drop before comparing, so a "3 minutes ago" counter or a rotating banner doesn't fire it.

The run starts with {url, before, after, diff, changedFields, at}; diff is a word diff for text ([-old-]{+new+}) and a per-field list for fields.

Errors back off, doubling up to an hour. A 429 or a challenge page pauses the watch for an hour ("Paused by the site until 14:05"); a signed-out sign-in does too, until it is refreshed. Checks that fell due while the Mac slept run when it wakes.

Parameters #

ParameterTypeRequiredValuesWhat it does
everynumberYesSeconds between checks, at least 60.
urltextYesRequired, http or https.
byany value
fieldsrecord
fireOnFirstyes / no
ignorelist of text
impersonateone ofauto chrome safari none
keytext
kindone oftext fields feed list status snapshot, selector, fields, via.
selectortext
signIntext, impersonate: Fetch signed in, looking like a browser.
thresholdany value
viaone offetch tab
whenone ofchanged increased decreased appeared disappeared new, by, threshold, ignore, key, fireOnFirst.

Every trigger also takes Limits: a cooldown, the first time each day, every nth time, twice within seconds, a chance, only while you are at the Mac, on one Mac, or in a State. See Limits on any trigger.

Examples #

Tell me when the price drops
When
  1. The page “shop.example.com/item/42” goes down
Do
  1. Show a notification “Price drop”
Open in Switchboard to try it

Gotchas #

  • Not a stealth tool: a site that answers with a challenge stops the watch for an hour, and via: tab is the answer.

  • via: tab checks are skipped while no browser is connected, and the When row says so.