nœuds / builtin / trigger
Element Change
Run the flow when any of one or more CSS selectors on a matching page changes.
Ce contenu n’est pas encore disponible dans votre langue.
Run a workflow when an element on an open page changes, appears, disappears, or shows a given text.
Try it
Section titled “Try it”New Job Postings Watch : un workflow de 2 étapes, qui commence par Watch the job list et se termine par Send a push notification.
What it does
Section titled “What it does”When a page matching the URL Patterns finishes loading, the extension starts watching each element listed in CSS Selectors on that page. It keeps watching while the page stays open. As soon as one of them meets the Fire when condition, the workflow runs from this trigger.
- Content changes: the element’s text is different from before.
- Element appears: the element was not on the page and now is.
- Element disappears: the element was on the page and now is not.
- Text matches: the element’s text now contains Match text. It fires once when the text starts matching, not again while it keeps matching.
Web pages often change many times in a split second. The trigger waits until the page has been quiet for Debounce (ms) (500 by default) before it checks, so a burst of changes fires once.
When to use it
Section titled “When to use it”- Get told when a price changes or a “Back in stock” label appears.
- React when a status line on a dashboard changes, or when a new message shows up.
- Watch several elements at once: add a row per element, and any of them can fire the workflow.
To run when a page opens rather than when it changes, use Page Load.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| CSS Selectors (obligatoire) | List | One or more elements to watch. The flow fires when any of them meets the condition. Use the crosshair to pick an element on the page. |
| Fire when | Choice | Options: Content changes, Element appears, Element disappears, Text matches. Par défaut : Content changes |
| Match text | Text | Text to match when condition is "Text matches". |
| Debounce (ms) | Number | SPAs mutate constantly; debounce coalesces bursts into one fire. Par défaut : 500 |
| URL Patterns | Tags | Par défaut : ["<all_urls>"] |
- CSS Selectors: click the crosshair on a row and then click the element on the page, so you do not have to write the selector yourself. If a selector matches several elements, only the first one on the page is watched. Empty rows are ignored.
- Match text is case-sensitive and matches part of the text:
In stockmatches “In stock now” but not “in stock”. - Fire when, Match text, Debounce (ms) and URL Patterns apply to every selector in the list.
- URL Patterns use the form
scheme://host/pathwith*as a wildcard, for examplehttps://shop.example.com/product/*. Onlyhttpandhttpspages are watched.
Outputs
Section titled “Outputs”-
Output
Each output item has these fields:
| Field | Type | What it holds |
|---|---|---|
| triggerType | Always "elementChange" | |
| triggeredAt | Text | |
| selector | Text | |
| condition | Text | |
| url | Text | |
| tabId | Number | |
| matchedText | Text |
{ "triggerType": "elementChange", "triggeredAt": "…", "selector": "…", "condition": "…", "url": "…", "tabId": 0, "matchedText": "…"}selector: the one selector that fired, not the whole list.condition:changed,appeared,disappearedormatches.matchedText: the element’s text when it fired. For Element disappears, it is the last text the element had.urlandtabId: the page and tab where the change happened.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”Get a notification when a product is back in stock:
- Add Element Change with URL Patterns
https://shop.example.com/product/*. - In CSS Selectors, use the crosshair to pick the stock label, for example
.availability. - Set Fire when to Text matches and Match text to
In stock. - Add Browser Notification with Title
Back in stockand Message{{ $input.url }}. - Activate the workflow, then reload the product page and leave it open.
Common issues
Section titled “Common issues”- Nothing fires after I activated the workflow. Watching starts when a matching page finishes loading. Reload pages that were already open.
- Nothing fires at all. Check that the page address matches a URL Patterns entry and that the selector finds the element. Pick it again with the crosshair: sites often rename their classes.
- It fires too often. The page keeps changing the element (a clock, a counter, an animation). Raise Debounce (ms), pick a more precise element, or use Text matches.
- It stopped firing after I moved to another page. Watching ends when the page goes away and starts again on the next matching page load. The tab must stay open on the page you watch.
- It does not work in the web app. This node runs in the browser extension; install it and activate the workflow there.
Recipes with this node
Section titled “Recipes with this node”Related nodes
Section titled “Related nodes”- Page Load: fire when a matching page finishes loading.
- Navigation: fire when a tab opens, changes address or closes.
- Get Element Data: read more data from the page after the trigger fires.
- Browser Notification: alert yourself when it fires.