Quick overview
This workflow checks multiple websites every 5 minutes, records uptime and response time history in n8n Data Tables, and sends state-change alerts via Telegram and/or email when a site goes down, becomes slow, or recovers.
How it works
- Runs on a 5-minute schedule (or manually) and reads the list of domains/URLs to monitor.
- Validates and normalizes the website list into HTTPS URLs and builds a monitor configuration with timeout and slow-response thresholds.
- Ensures the n8n Data Tables (
uptime_state and uptime_history) exist and then checks each website via HTTP request, retrying up to three times for failures.
- Classifies each result as UP, SLOW, or DOWN based on HTTP status code and response time, and captures any error message.
- Writes each check to the
uptime_history table and upserts the latest status (including incident start time) into the uptime_state table.
- Compares the current status to the previously stored state and generates an alert message only when the status changes or on the first unhealthy check.
- If enabled, sends the alert to Telegram (with destination allowlisting) and/or sends an email, while logging notification delivery failures in the execution output.
Setup
- Enter your domains/URLs in the
websites field of the website list configuration (comma- or newline-separated).
- (Optional) Enable Telegram alerts, add a Telegram bot credential, and set
telegram_chat_id and telegram_allowed_chat_ids in the monitor settings.
- (Optional) Enable email alerts, add an SMTP email credential, and set the sender and recipient addresses in the monitor settings.
- Ensure n8n Data Tables are available in your instance, then run the workflow once to let it create
uptime_state and uptime_history automatically (or run the one-time table setup trigger).
- (Optional) Set
retention_days in the cleanup settings and run the cleanup trigger to permanently delete old rows from uptime_history.