Steps
Choose where alerts arrive
For Discord, open the channel, then Edit Channel → Integrations → Webhooks → New Webhook → Copy Webhook URL (new to webhooks? see Discord webhooks for beginners). For Telegram, open @BotFather, send
/newbotand copy the token; then send your bot a message, openhttps://api.telegram.org/botYOUR_TOKEN/getUpdatesand copy the number in"chat":{"id":...}. Groups have a negative id; for a channel, add the bot as an admin and use@yourchannel. You can use both.Download the agent and see a sample alert
Get the free Website change alert agent: one Python file (standard library only, nothing to install) plus an n8n workflow. Unzip it and run
python3 website_change_alert.py --demo. It needs no accounts and prints both kinds of alert you can get (shown below).List the pages to watch
Copy
watches.example.jsontowatches.jsonand add one entry per page: aurl, anamefor the alert and, if you want, a phrase to wait for. Leave the phrase out to be told which lines changed. The example below covers a back-in-stock page, a sold-out ticket page and a changelog.Add Discord or Telegram and run it once
Copy
.env.exampleto.envand setDISCORD_WEBHOOK_URLand/orTELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID. Runset -a; . ./.env; set +a; python3 website_change_alert.py. The first run only remembers each page, so nothing is sent. Now openwebsite_change_state.json: under each page,linesis the text the script sees. If the words you care about aren't there, the page is probably built with JavaScript (see the limits below).Run it every 30 minutes
After the first run, each change is sent once. Every 15 to 60 minutes is plenty, and polite to the site:
*/30 * * * * cd /path/to/website-change-alert && set -a && . ./.env && set +a && /usr/bin/python3 website_change_alert.py >> run.log 2>&1No always-on computer? See run a Python script on a schedule (cron, Task Scheduler or GitHub Actions). Keep
website_change_state.jsonbetween runs: it's the script's memory.
Two ways to watch a page
- Tell me what changed (the default): the alert lists the lines of text that were added (
+) and removed (-), up to 12 of each. Lines that only moved, like a ranking list being reshuffled, don't count. - Wait for a phrase:
"appears": "In stock"alerts when the phrase shows up on the page,"disappears": "Sold out"when it's gone. Upper and lower case don't matter. You get one alert when it becomes true, and the watch re-arms once it's false again, so the next restock is announced too. Set both and you're alerted only when both are true.
An example watches.json
[
{"name": "Keyboard back in stock", "url": "https://shop.example.com/products/keyboard", "appears": "Add to cart"},
{"name": "Tickets on sale", "url": "https://example.com/tour", "disappears": "Sold out"},
{"name": "Docs changelog", "url": "https://example.com/changelog", "start": "Release notes", "end": "Older releases", "ignore": "Last updated .*"}
]Each name starts its alert and is also how the script remembers the page, so renaming an entry gives it a fresh, silent first run.
Stop noisy alerts
- Ignore dates and counters:
ignoreis a regular expression. Whatever it matches is cut out of each line before comparing, ignoring case."ignore": "Updated \\d+ minutes ago"(JSON needs the backslash doubled) stops a page that prints the time from alerting on every run. - Watch one part of the page:
startandendare exact phrases (case matters). Only the text between them is compared, so menus, footers and sidebars stop triggering alerts. - Scripts, styles and hidden templates are never part of the text.
What arrives in Discord or Telegram
This is the --demo output, the same text the script posts:
🔔 Example product page: "In stock" is now on the page
https://shop.example.com/keyboard
🔔 Example changelog changed (2 added, 0 removed)
https://example.com/changelog
+ v2.2
+ Dark modeIn Discord the message comes from "Website Change Alert" and can't ping anyone, even if the page contains @everyone. In Telegram it's plain text with the link preview turned off. Slack or email too? Set SLACK_WEBHOOK_URL, or EMAIL_TO with SMTP_HOST, SMTP_PORT, SMTP_USER and SMTP_PASSWORD (port 465 uses SSL, other ports STARTTLS). If one destination is down, the others still get the alert; if all of them are down, it's sent on the next run instead of being lost. A 429 from Discord or Telegram is retried after the wait they ask for.
Just one page? No file needed
Without a watches.json, the script watches WATCH_URL from your .env, with optional WATCH_APPEARS, WATCH_DISAPPEARS and WATCH_IGNORE. The alert then names the page by its URL. Once your schedule is running, python3 website_change_alert.py --dry-run compares the live pages with the saved copy and prints what it would send, without posting or saving anything.
When a page can't be loaded
If a page fails 3 checks in a row (a 404, a block page, the site being down), you get one "can't load the page" alert with the error, not one per run. Change the number with FAIL_ALERT_AFTER. When the page loads again, the count resets. Busy answers (429, 502, 503, 504) are retried once, after the wait the site asks for (at most 60 seconds).
What we tested
On 18 October 2026 we ran the script Telegram only (TELEGRAM_CHAT_ID=@mywatch), against a local stand-in for Telegram's Bot API that answered the first message with 429. Back in stock: on a live book page at books.toscrape.com, the script found "In stock (22 available)" among the page's 26 lines of text. We then edited the saved state to say the phrase had been missing; the next run sent exactly one message, after waiting the 2 seconds Telegram's retry_after asked for, and the run after that sent nothing. Changed lines: on the live books.toscrape.com home page (139 lines), we deleted two lines from the saved copy and swapped two others. The next run reported "2 added, 0 removed" (the two missing category names) and said nothing about the swapped pair. Our mock test suite with Discord (answering 429 first), Telegram and Slack also passed: a timestamp-only change was ignored, a broken page was reported once, Slack being down didn't block the others, and with every destination down the alert was retried exactly once on the next run.
Honest limits
- It reads the HTML the server sends and doesn't run a browser. Pages that fill themselves in with JavaScript (many big shops and dashboards) may show little text, so check
website_change_state.jsonafter the first run. For those pages, a self-hosted changedetection.io with its browser option is the better tool. - Some sites block automated requests or show a captcha; those turn into can't-load alerts.
- It checks on your schedule, so with checks every 30 minutes an alert can arrive up to about 30 minutes after the change. For drops that sell out in seconds, no checker running every few minutes is fast enough.
- Tested with stand-ins for Discord, Telegram and Slack, not the real services.
Prefer n8n?
The download also has website-change-alert.n8n.json: Every 30 minutes → Pages to watch (a Code node with the same name, url, appears, disappears, start, end and ignore fields) → Load page → Compare with last check → Post to Discord. Import it, edit the page list, paste your webhook URL into Post to Discord and activate it. It posts to Discord only, and n8n saves its memory only in active runs, so manual test runs always look like a first run.
Why not a website monitoring service?
Hosted monitors are easier to start with, but free plans usually cap you at a few pages or slow checks, and Discord or Telegram alerts are often limited or paid. This script has no page limit and runs on your own computer, a Raspberry Pi or GitHub Actions. Watching a Steam game's price? Steam price drops in Telegram does it better. Does the site have an RSS feed? RSS to Telegram gives cleaner alerts.
Skip the setup: free download
The Website change alert agent does all of this. It's tested, MIT-licensed, and comes as an n8n workflow plus a Python script.
Get the free Website change alert agent → Or have us build yours →
FAQ
How do I get notified when a website changes, for free?
Run a small script on a schedule that loads the page, compares it with the last copy and sends you the difference. This free agent does that and posts to Discord, Telegram, Slack or email. No account, no browser extension, no monthly fee.
Can it tell me when something is back in stock?
Yes. Add "appears": "In stock" (or "Add to cart") to the page in watches.json, or "disappears": "Sold out". You get one alert when it happens, and another the next time it comes back after selling out.
Will ads or timestamps trigger alerts?
Text that changes on every visit can, so add an ignore regex for it, or use start and end to watch only the part you care about. Lines that only moved never count.
Does it work on Amazon or other big shops?
Sometimes. It works when the text you want is in the HTML the shop sends. Many big shops build the page with JavaScript or block scripts, so check the lines in website_change_state.json after the first run.
Does my computer need to stay on?
Only while it runs. If your PC sleeps, use an always-on machine like a Raspberry Pi, or a free GitHub Actions schedule that keeps website_change_state.json between runs.
How often should it check?
Every 15 to 60 minutes. Faster checks rarely help and can get you blocked.
Is it free?
Yes. Discord webhooks and the Telegram Bot API are free, and the agent is MIT-licensed.
Related guides
- n8n HTML Extract not working: empty values, selectors and errors, 32 runs
- n8n HTTP Request pagination not working: endless loops, duplicates and fixes, 27 runs
- 13 free n8n workflow templates for beginners (tested, import-ready JSON)
- n8n Discord node not working? 20 tests, every error decoded
- n8n error workflow + nightly backup: get alerts and never lose a workflow
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes