Detect sitemap URL changes with HTTP and JSON diffing
Quick overview
Description
Quick overview Watch a public sitemap and emit added or removed URLs How it works Runs when you click “Test workflow” and sets the target SITEMAP_URL plus MAX_URLS and RESET_BASELINE limits. Fetches the sitemap XML over HTTP with no authentication and continues even if the request fails. Parses the XML to extract values (handling CDATA and entities), detects whether the root is a urlset or a sitemap index, and limits the list to MAX_URLS. Compares the extracted URLs to the previously saved baseline in workflow static data and updates the baseline only if the fetch and parse succeed. Produces a single JSON result containing added[] and removed[] (or a baseline/unchanged note and any errors), and routes the output to a “changed” or “unchanged/baseline” branch based on whether differences were found. Setup Set SITEMAP_URL to a publicly accessible sitemap.xml (urlset) or sitemap index URL. Adjust MAX_URLS to cap how many entries are processed, and set RESET_BASELINE to true only when you intentionally want to discard the stored baseline. Activate the workflow with a production trigger (for example, a Schedule trigger) if you need the baseline in workflow static data to persist reliably between runs. An n8n automation workflow template by yedu.
Community Metrics
Author
yedu
Platform
web
Pricing model
free
Categories
- Automation
Tags
- n8n
- workflow
- http-request
- compression
- code
Capabilities
- 3 nodes