⚙️ Monitor WordPress broken links weekly and send alerts via Telegram
⚡ 16 views · ⚙️ DevOps & CI/CD
Description
Quick overview
This workflow runs weekly to scan a WordPress site’s post sitemap for broken pages, checking each URL’s HTTP status and sending a consolidated alert to Telegram when errors are found.
How it works
- Runs weekly on a schedule trigger.
- Requests the WordPress sitemap index at
/wp-sitemap.xmland then fetches the posts sitemap at/post-sitemap.xml. - Parses the posts sitemap XML and extracts each post URL.
- Sends an HTTP request to each URL and captures the full response status without failing the workflow on errors.
- Flags URLs as broken when the HTTP status code is 400 or higher and prepares a record with the URL, status code, status message, and check timestamp.
- Aggregates all broken-link records into a single list and sends a formatted Telegram message to the configured chat ID with the results.
Setup
- Set the
websiteUrlvalue to your WordPress site base URL (for example,https://yourdomain.com). - Add Telegram credentials in n8n and replace
telegramChatIdwith the destination Telegram chat ID. - Ensure your WordPress site exposes the default sitemaps at
/wp-sitemap.xmland/post-sitemap.xml, or update the sitemap URLs in the HTTP requests to match your setup.
🔗 Nodes Used
HTTP Request, Telegram, Schedule Trigger
📥 Import
Download workflow.json and import into n8n:
Workflow menu → Import from File