Monitor Any Website for Changes and Get Slack Alerts with n8n
Manually checking websites for updates is time-consuming and inefficient. Whether you're tracking a competitor's pricing, waiting for a product to come back in stock, or monitoring changes to a critical API documentation page, hitting refresh is not a scalable strategy. Missed updates can mean lost opportunities or delayed responses.
This is a perfect problem to solve with automation. By building a simple workflow, you can task a system to perform these checks for you and only notify you when a meaningful change occurs. This saves you time, reduces manual effort, and ensures you never miss a critical update again.
In this guide, we'll walk you through building a powerful website change detection workflow using n8n. This workflow will automatically:
-
Trigger on a set schedule (e.g., every hour).
-
Fetch the content of a specific webpage.
-
Compare the current content to the last known version.
-
Send an instant, detailed alert to a Slack channel if any change is detected.
This workflow requires no coding and can be set up in under 15 minutes.
What You'll Need
-
An active n8n instance (cloud or self-hosted).
-
A Slack workspace and the credentials to connect it to n8n.
-
The URL of the website you want to monitor.
Example n8n Workflow: Website Change Detection
Our workflow will use a few core n8n nodes to create a reliable monitoring loop. The logic is straightforward: fetch, compare, alert, and update.
Here are the steps to build it from scratch.
Step 1: Set the Schedule Trigger
Every workflow starts with a trigger. Since we want to check the website periodically, the Schedule node is the perfect choice.
-
Add a Schedule node to your canvas.
-
Set the
Trigger Interval. For this example, selectHoursand set theHourto1. This will run the workflow once every hour. -
You can adjust this to minutes, days, or even specific times using a
CRONexpression for more advanced control.
Step 2: Fetch the Webpage Content
Next, we need to retrieve the content from the target URL. The HTTP Request node is designed for this.
-
Add an HTTP Request node and connect it to the Schedule node.
-
Set the
Request MethodtoGET. -
In the
URLfield, paste the full URL of the website you want to monitor (e.g.,https://example.com/pricing). -
Under
Options, setResponse FormattoHTML. This ensures we can parse the page content.
Pro-Tip: For more precise monitoring, you can target a specific part of a page. In the HTTP Request node, go to Options > Add Option > Response > Extract from HTML. You can then use a CSS selector (e.g., #price-value, .main-content) to only pull the data you care about, making the check less sensitive to minor changes like ads or timestamps.
Step 3: Store and Compare Data
This is the core logic of our workflow. We need a way to remember the last version of the website's content to compare it against the new version. We'll use a Static Workflow Data node for this, which acts as simple storage that persists between workflow runs.
-
Add an Edit Fields node. We'll use this to create a unique identifier for the content we just fetched. A simple way is to hash the HTML. Set a new field named
currentHashand use an expression to create an MD5 hash of the data:{{ crypto.createHash('md5').update($json.data).digest('hex') }}. -
Add a Static Workflow Data node. This will be our database.
-
Set
OperationtoGet All. -
In the
Namefield, give your static data a unique name, likewebsiteMonitorData. -
Add an IF node. This will compare the
currentHashwith thestoredHash. -
Configure the
IFnode with one condition. SetValue 1to the hash from our Edit Fields node:{{ $('Edit Fields').item.json.currentHash }}. Set theOperationtoNot Equal. SetValue 2to the hash from our Static Data node:{{ $('Static Workflow Data').item.json.data.storedHash }}.
If the hashes are different, the workflow will proceed down the true branch. If they are the same, it will stop, as no change was detected.
Step 4: Send a Slack Alert
Now for the notification. When the IF node's condition is met (a change is detected), we want to be alerted.
-
Add a Slack node and connect it to the
trueoutput of the IF node. -
Select or add your Slack credentials.
-
Choose the
Channelwhere you want to receive the notification. -
In the
Textfield, craft a helpful message. You can use expressions to include dynamic data. For example:`⚠️ Website Change Detected! ⚠️
A change was found on: {{ $('HTTP Request').item.json.request.url }}
Check it now!`
Step 5: Update the Stored Hash
This final step is crucial. After sending an alert, we must update our static data with the new hash. If we don't, we'll get an alert every single time the workflow runs from now on.
-
Add another Static Workflow Data node and connect it after the Slack node.
-
Set
OperationtoUpdate Or Create. -
Use the same
Nameas before:websiteMonitorData. -
Under
Fields, set theNameof the field tostoredHash. -
Set its
Valueto the new hash we generated in Step 3:{{ $('Edit Fields').item.json.currentHash }}.
This ensures that on the next run, the workflow will compare the website's content against this new, updated version.
Taking Your Workflow Further
This basic workflow is incredibly powerful, but you can easily extend it:
- Error Handling: What if the website is temporarily down? In the
HTTP Requestnode's settings, enableContinue on Failto prevent the entire workflow from stopping on an error. - Monitor Multiple URLs: You can use a
Split in Batchesnode with a list of URLs to run this same logic across many websites in a single workflow. - More Robust Storage: For very high-frequency checks or enterprise use, consider replacing the
Static Workflow Datanode with a more robust database like PostgreSQL, MySQL, or a key-value store like Redis. - Visual Diffs: For an advanced alert, you could include a link to a service that shows the visual difference between the old and new page content in your Slack message.
By automating website change detection, you free up valuable time and mental energy, allowing you to focus on acting on the information, not just finding it.
Enjoyed this article?
Share it with others who might find it useful