Alert yourself when a web page changes
Set up a free Google Apps Script that watches a page and emails you when it changes.
You need to know when a web page changes. It might be a job listing, a product restock, or a local council notice. Refreshing it by hand wastes time.
Set up the monitoring script
- Open Google Apps Script. It is a free tool that runs small pieces of code linked to your Google Account.
- Remove any code already in the editor. Paste this in:
function checkPage() {
var url = 'https://example.com';
var page = UrlFetchApp.fetch(url).getContentText();
var storage = PropertiesService.getScriptProperties();
var previous = storage.getProperty('lastPage');
if (previous && page !== previous) {
MailApp.sendEmail('you@example.com', 'The page changed', url);
}
storage.setProperty('lastPage', page);
}
- Replace
https://example.comwith the web address of the page you want to watch. - Replace
you@example.comwith your own email address. - Click Save and name the project.
Run it on a schedule
- Open the triggers page. In the editor this is the clock icon on the left.
- Add a trigger for the function
checkPage. - Choose to run it every hour.
- Save the trigger.
- Run
checkPageonce by hand. Google will ask for permission to read the page and send email.
Reference: Installable triggers
How it knows the page changed
A script is a list of instructions for the computer. This script fetches the page, which means it downloads the page code. It compares the new code with the copy it saved last time. If they are different, it sends you an email. It stores the old copy in a private notebook called script properties.
Reference: UrlFetchApp
Expected result
You get an email only when the page has changed since the last check. The first run will not send an email, because there is no earlier copy to compare with. If nothing changed, you get no email. Open the email and click the link to see the new version.
Set it up once and let the script do the checking for you.
Sources
Stay Ahead. Work Smarter.
Get practical AI tips, automation ideas and useful technology tricks — one useful thing at a time. Follow the feed in any reader.