{
  "name": "Uptime Monitor with Slack Alert",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [{ "field": "minutes", "minutesInterval": 5 }]
        }
      },
      "id": "umsa0001-0001-4000-8000-000000000001",
      "name": "Every 5 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "url": "={{ $env.MONITOR_URL }}",
        "options": {
          "timeout": 10000,
          "response": { "response": { "neverError": true } }
        }
      },
      "id": "umsa0001-0002-4000-8000-000000000002",
      "name": "Ping Target URL",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "position": [460, 300]
    },
    {
      "parameters": {
        "conditions": {
          "conditions": [
            {
              "leftValue": "={{ $json.statusCode }}",
              "rightValue": 200,
              "operator": { "type": "number", "operation": "notEquals" }
            }
          ]
        }
      },
      "id": "umsa0001-0003-4000-8000-000000000003",
      "name": "Is Down?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [680, 300]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": { "__rl": true, "mode": "id", "value": "={{ $env.SLACK_ALERT_CHANNEL }}" },
        "text": ":red_circle: *Site Down Alert*\n*URL:* {{ $env.MONITOR_URL }}\n*Status:* {{ $('Ping Target URL').item.json.statusCode || 'unreachable' }}\n*Time:* {{ $now.toISO() }}",
        "otherOptions": {}
      },
      "id": "umsa0001-0004-4000-8000-000000000004",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [900, 220]
    },
    {
      "parameters": {},
      "id": "umsa0001-0005-4000-8000-000000000005",
      "name": "Site is Up (No-op)",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [900, 400]
    }
  ],
  "connections": {
    "Every 5 Minutes": {
      "main": [[{ "node": "Ping Target URL", "type": "main", "index": 0 }]]
    },
    "Ping Target URL": {
      "main": [[{ "node": "Is Down?", "type": "main", "index": 0 }]]
    },
    "Is Down?": {
      "main": [
        [{ "node": "Send Slack Alert", "type": "main", "index": 0 }],
        [{ "node": "Site is Up (No-op)", "type": "main", "index": 0 }]
      ]
    }
  },
  "active": false,
  "settings": { "executionOrder": "v1" },
  "meta": {},
  "pinData": {}
}
