{
  "id": "3zEWDJljaynDvKHp",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Website Downtime Alerts with UptimeRobot",
  "tags": [],
  "nodes": [
    {
      "id": "90e18bd0-bed2-4e47-a074-55cf7e54c116",
      "name": "UptimeRobot Webhook Trigger",
      "type": "n8n-nodes-base.webhook",
      "notes": "This node triggers the workflow when UptimeRobot sends a webhook alert for a 'down' status, indicating the website is offline.",
      "position": [
        -540,
        80
      ],
      "parameters": {
        "path": "uptime-alert",
        "options": {
          "responseData": {
            "status": "success"
          }
        },
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "baf7c31e-a0a4-4a85-a6aa-1ff98642518c",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "notes": "This node sends a Slack message to the 'incidents' channel with the down website URL and alert timestamp.",
      "position": [
        -320,
        -120
      ],
      "parameters": {
        "text": "\ud83d\udea8 Website Down Alert: {{$node['UptimeRobot Webhook Trigger'].json['monitorURL']}} is down at {{$node['UptimeRobot Webhook Trigger'].json['alertTime']}}",
        "channel": "incidents",
        "attachments": [],
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "641f84cd-02f3-45f3-8961-2106fc9b6480",
      "name": "Send Email Alert",
      "type": "n8n-nodes-base.emailSend",
      "notes": "This node sends an email to the team with the down website URL and alert timestamp.",
      "position": [
        -320,
        280
      ],
      "parameters": {
        "text": "\ud83d\udea8 The website {{$node['UptimeRobot Webhook Trigger'].json['monitorURL']}} is down as of {{$node['UptimeRobot Webhook Trigger'].json['alertTime']}}. Please investigate.",
        "options": {},
        "subject": "Website Down Alert",
        "toEmail": "user@example.com",
        "fromEmail": "user@example.com"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ad31703c-a869-46f4-b412-380c0e216403",
      "name": "Create Notion Task",
      "type": "n8n-nodes-base.notion",
      "notes": "This node creates a Notion task with the website URL in the title and tags the responsible engineer (e.g., 'engineer-john').",
      "position": [
        -100,
        80
      ],
      "parameters": {
        "title": "\ud83d\udea8 Website Down Alert: {{$node['UptimeRobot Webhook Trigger'].json['monitorURL']}} is down at {{$node['UptimeRobot Webhook Trigger'].json['alertTime']}}",
        "pageId": {
          "__rl": true,
          "mode": "id",
          "value": "=asdnmkco9876ytghjm"
        },
        "options": {}
      },
      "credentials": {
        "notionApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "791e3906-ef02-495f-98de-9056d2b097ab",
      "name": "Send message",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -320,
        80
      ],
      "parameters": {
        "textBody": "\ud83d\udea8 Website Down Alert: {{$node['UptimeRobot Webhook Trigger'].json['monitorURL']}} is down at {{$node['UptimeRobot Webhook Trigger'].json['alertTime']}}",
        "operation": "send",
        "phoneNumberId": "=+9198765676567",
        "additionalFields": {},
        "recipientPhoneNumber": "+123456789089"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "07ac7e28-d508-499a-a682-18c48d9c0b56",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        -260
      ],
      "parameters": {
        "color": 4,
        "width": 520,
        "height": 300,
        "content": "## System Architecture\n- **Downtime Detection Pipeline**:\n  - **UptimeRobot Webhook Trigger**: Detects website status changes (triggers on \"down\" status).\n- **Alert Generation Flow**:\n  - **Send Slack Alert**: Notifies the team via Slack.\n  - **Send WhatsApp Alert**: Sends a message via WhatsApp.\n  - **Send Email Alert**: Emails the team about the downtime.\n- **Task Management**:\n  - **Create Notion Task**: Creates a task in Notion and tags the responsible engineer."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "0e517ad6-bf09-4694-b0e0-9c46238f969d",
  "connections": {
    "Send message": {
      "main": [
        [
          {
            "node": "Create Notion Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Alert": {
      "main": [
        [
          {
            "node": "Create Notion Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Slack Alert": {
      "main": [
        [
          {
            "node": "Create Notion Task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UptimeRobot Webhook Trigger": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Email Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}