{
  "name": "VW24 \u2014 AI Agent Health Monitor",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 15
            }
          ]
        }
      },
      "name": "Every 15 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "id": "fefb9a0b-8579-44f6-b341-a884c651383f"
    },
    {
      "parameters": {
        "url": "https://vibeworld24.com/api/status",
        "options": {
          "timeout": 10000
        }
      },
      "name": "Check Platform Status",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        460,
        300
      ],
      "id": "75acf86b-7b9d-434f-b8b4-1b38389d2323"
    },
    {
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json.status}}",
              "operation": "equal",
              "value2": "ok"
            }
          ]
        }
      },
      "name": "Platform OK?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 1,
      "position": [
        680,
        300
      ],
      "id": "6433dfc2-bf9e-4a34-909f-d6e19b3ea912"
    },
    {
      "parameters": {
        "functionCode": "// Platform is up \u2014 log heartbeat\nreturn [{ json: { status: 'healthy', ts: new Date().toISOString(), message: 'All systems operational' }}];"
      },
      "name": "Log Healthy",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        900,
        200
      ],
      "id": "dff8450d-bb96-4964-8cf7-3fe93827bc0d"
    },
    {
      "parameters": {
        "fromEmail": "info@vibeworld24.com",
        "toEmail": "klodiantaipi51@gmail.com",
        "subject": "\ud83d\udea8 ALERT: VibeWorld24 Platform Down!",
        "emailType": "html",
        "message": "<h2 style='color:#ff4757'>Platform Alert!</h2><p>VibeWorld24 platform health check failed at {{$now}}.</p><p>Check server status immediately:</p><pre>systemctl status vw24-platform</pre><p>Restart if needed: <code>systemctl restart vw24-platform</code></p>"
      },
      "name": "Alert Owner",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 1,
      "position": [
        900,
        420
      ],
      "credentials": {
        "smtp": {
          "id": "1",
          "name": "VW24 SMTP"
        }
      },
      "id": "0e69f03a-506a-4080-8c1a-d7ad1835506e"
    },
    {
      "parameters": {
        "url": "https://vibeworld24.com/api/stream",
        "method": "POST",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "message",
              "value": "Health check ping"
            },
            {
              "name": "agent",
              "value": "vibechat"
            }
          ]
        },
        "options": {
          "timeout": 5000
        }
      },
      "name": "Test AI Response",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 3,
      "position": [
        1120,
        200
      ],
      "id": "72ef8a56-4685-4af9-93ea-0d0ba4c63b97"
    }
  ],
  "connections": {
    "Every 15 Minutes": {
      "main": [
        [
          {
            "node": "Check Platform Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Platform Status": {
      "main": [
        [
          {
            "node": "Platform OK?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Platform OK?": {
      "main": [
        [
          {
            "node": "Log Healthy",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Alert Owner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Healthy": {
      "main": [
        [
          {
            "node": "Test AI Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "21f5ef0e-4137-49a5-869b-1efdf21c35ac"
}