Who this is for: anyone who wants to be notified ON THEIR PHONE when a site/API stops responding, without subscribing to a monitoring service and without getting a message every 5 minutes until it's fixed.
A naive workflow that sends a message on every failed check floods your Telegram with identical notifications. This workflow keeps the last known state in memory (with $getWorkflowStaticData, the workflow's internal storage) and sends a message only when the state changes: from online to offline, and from offline to online.
chat_id by calling https://api.telegram.org/bot<TOKEN>/getUpdates.YOUR_BOT_TOKEN in the URL and YOUR_CHAT_ID in the body with your values.The HTTP Request node has onError: continueErrorOutput: if the request fails (timeout, connection refused, 5xx) it exits through the second output instead of blocking the workflow. Two Set nodes mark the result as isUp: true/false, a Code node compares it against the last saved state, and only if it changed does it reach the Telegram node.
"✅ Endpoint tornato ONLINE", confirmed by the Telegram API response ("ok": true).
Don't have a basic check workflow yet? Start with How to monitor if a site is online with n8n.