{
  "name": "Monitor Domain expiry and Alert Telegram the Moment It Breaks",
  "nodes": [
    {
      "name": "Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 24
            }
          ]
        }
      },
      "notes": "Once a day is enough for expiry checks.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Check Domain expiry",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4,
      "parameters": {
        "method": "POST",
        "url": "https://api.example.com/replace-with-real-endpoint",
        "sendBody": true,
        "options": {}
      },
      "notes": "Run the domain expiry check and read the result.",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Problem?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "parameters": {
        "conditions": {
          "conditions": [
            {
              "leftValue": "={{ $json.ok }}",
              "rightValue": "false",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        }
      },
      "notes": "Only continue when the check fails.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Notify Telegram",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "parameters": {
        "text": "=⚠️ Domain expiry failed: {{ $json.detail }}"
      },
      "notes": "Connect this channel's credential.",
      "position": [
        980,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        1220,
        300
      ]
    }
  ],
  "connections": {
    "Schedule": {
      "main": [
        [
          {
            "node": "Check Domain expiry",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Domain expiry": {
      "main": [
        [
          {
            "node": "Problem?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Problem?": {
      "main": [
        [
          {
            "node": "Notify Telegram",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Notify Telegram": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
