{
  "name": "Website Down Alert Starter",
  "nodes": [
    {
      "id": "1",
      "name": "Every 5 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 5
            }
          ]
        }
      }
    },
    {
      "id": "2",
      "name": "Check Site",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        300,
        0
      ],
      "onError": "continueRegularOutput",
      "parameters": {
        "method": "GET",
        "url": "https://your-own-site.example",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          },
          "timeout": 10000
        }
      }
    },
    {
      "id": "3",
      "name": "Site Down?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        600,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "loose",
            "version": 2
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $json.statusCode }}",
              "rightValue": 400,
              "operator": {
                "type": "number",
                "operation": "gte"
              }
            },
            {
              "id": "c2",
              "leftValue": "={{ $json.statusCode }}",
              "rightValue": "",
              "operator": {
                "type": "number",
                "operation": "notExists",
                "singleValue": true
              }
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "4",
      "name": "Send Alert",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        900,
        0
      ],
      "parameters": {
        "chatId": "",
        "text": "=Site down: status {{ $json.statusCode || 'no reply' }}",
        "additionalFields": {
          "appendAttribution": false
        }
      }
    },
    {
      "id": "5",
      "name": "All Good",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        900,
        230
      ],
      "parameters": {}
    }
  ],
  "connections": {
    "Every 5 Minutes": {
      "main": [
        [
          {
            "node": "Check Site",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Site": {
      "main": [
        [
          {
            "node": "Site Down?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Site Down?": {
      "main": [
        [
          {
            "node": "Send Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "All Good",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}