{
  "name": "Monitor multi-city weather with OpenWeatherMap, GPT-4o-mini, and Discord",
  "nodes": [
    {
      "id": "a4f21274-caf1-41f4-a342-e38148ca71ee",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -176
      ],
      "parameters": {
        "width": 500,
        "height": 466,
        "content": "## How it works\nThis workflow automates global weather monitoring. It triggers every 6 hours to fetch current weather, 5-day forecasts, and Air Quality Index (AQI) data for multiple cities via OpenWea"
      }
    },
    {
      "id": "21813c54-68eb-4882-b557-3f4722be704f",
      "name": "Part 1 Sticky",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        288
      ],
      "parameters": {
        "width": 750,
        "height": 400,
        "content": "##  PART 1: Setup & Iteration\nTrigger the flow and define the list of cities to monitor using coordinates."
      }
    },
    {
      "id": "fe0b950f-be74-4a64-9f16-4aa9fe04969a",
      "name": "Part 2 Sticky",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        176
      ],
      "parameters": {
        "width": 700,
        "height": 600,
        "content": "## PART 2: Data Collection\nFetches current weather, forecasts, and air pollution data simultaneously for each location."
      }
    },
    {
      "id": "911b1ce8-4bb5-4d4b-9710-e46e7d620c18",
      "name": "Part 3 Sticky",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        288
      ],
      "parameters": {
        "width": 850,
        "height": 400,
        "content": "## PART 3: AI Analysis\nCalculates comfort metrics and uses GPT-4 to generate human-like weather briefings."
      }
    },
    {
      "id": "596792ac-8c33-4b63-82f1-f38d9cd1855e",
      "name": "Part 4 Sticky",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3008,
        288
      ],
      "parameters": {
        "width": 750,
        "height": 500,
        "content": "## PART 4: Delivery & Logging\nSmart routing: sends urgent alerts or routine reports to Discord and logs results to Google Sheets."
      }
    },
    {
      "id": "d6aecc5b-5a8a-41d0-871f-1b7692624e27",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        608,
        480
      ]
    },
    {
      "id": "b7aa9726-4dd7-467d-89b7-1094e7fa102a",
      "name": "Set Monitoring Locations",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        480
      ]
    },
    {
      "id": "4cb7a42b-1881-4ae7-b95d-59e96ed00efc",
      "name": "Split Locations",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1040,
        480
      ]
    },
    {
      "id": "78f0c906-08a2-4fef-9eaf-cc060b5fe1c5",
      "name": "Get Current Weather",
      "type": "n8n-nodes-base.openWeatherMap",
      "position": [
        1408,
        288
      ]
    },
    {
      "id": "0824a574-25b6-41cf-9a77-f065dae09522",
      "name": "Get 5-Day Forecast",
      "type": "n8n-nodes-base.openWeatherMap",
      "position": [
        1408,
        480
      ]
    },
    {
      "id": "036118b6-8a52-412a-85ef-edd22de34ad4",
      "name": "Get Air Quality Index",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1408,
        672
      ]
    },
    {
      "id": "2c5e4dae-633c-4786-9f97-98c178afe0a8",
      "name": "Merge Weather Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1664,
        384
      ]
    },
    {
      "id": "7da73045-c2a0-4c56-91dd-28bcab3f0fdd",
      "name": "Merge with Air Quality",
      "type": "n8n-nodes-base.merge",
      "position": [
        1856,
        480
      ]
    },
    {
      "id": "e52a93d9-8f3d-41a9-a25f-a471ee2f4beb",
      "name": "Process and Analyze Data",
      "type": "n8n-nodes-base.code",
      "position": [
        2160,
        480
      ]
    },
    {
      "id": "10e3f964-ce56-44c0-9e5a-e8dad3dc9916",
      "name": "Aggregate All Locations",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2384,
        480
      ]
    },
    {
      "id": "f8f7eb22-4ee2-42c5-ac3d-1302ee99a4ae",
      "name": "AI Weather Analysis",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2592,
        480
      ]
    },
    {
      "id": "b92ed99d-5dce-4119-ad5b-150aa2107462",
      "name": "Format Weather Report",
      "type": "n8n-nodes-base.code",
      "position": [
        2816,
        480
      ]
    },
    {
      "id": "cd0d3a63-ea3b-4d27-b8c7-7e0e6ea16f68",
      "name": "Check for Alerts",
      "type": "n8n-nodes-base.if",
      "position": [
        3040,
        480
      ]
    },
    {
      "id": "d35bfe60-8c67-41f9-a84e-17b475fa53ff",
      "name": "Send Discord Alert",
      "type": "n8n-nodes-base.discord",
      "position": [
        3264,
        384
      ]
    },
    {
      "id": "6454ab85-b90c-44a2-8220-7d8a645df915",
      "name": "Send Discord Report",
      "type": "n8n-nodes-base.discord",
      "position": [
        3264,
        576
      ]
    },
    {
      "id": "25810664-1a4d-4ecc-bc13-0177f6071c3b",
      "name": "Log to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3504,
        480
      ]
    }
  ],
  "connections": {
    "Split Locations": {
      "main": [
        [
          {
            "node": "Get Current Weather",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get 5-Day Forecast",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Air Quality Index",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Alerts": {
      "main": [
        [
          {
            "node": "Send Discord Alert",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Discord Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Set Monitoring Locations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get 5-Day Forecast": {
      "main": [
        [
          {
            "node": "Merge Weather Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge Weather Data": {
      "main": [
        [
          {
            "node": "Merge with Air Quality",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Discord Alert": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Weather Analysis": {
      "main": [
        [
          {
            "node": "Format Weather Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Current Weather": {
      "main": [
        [
          {
            "node": "Merge Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Discord Report": {
      "main": [
        [
          {
            "node": "Log to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Weather Report": {
      "main": [
        [
          {
            "node": "Check for Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Air Quality Index": {
      "main": [
        [
          {
            "node": "Merge with Air Quality",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge with Air Quality": {
      "main": [
        [
          {
            "node": "Process and Analyze Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate All Locations": {
      "main": [
        [
          {
            "node": "AI Weather Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process and Analyze Data": {
      "main": [
        [
          {
            "node": "Aggregate All Locations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Monitoring Locations": {
      "main": [
        [
          {
            "node": "Split Locations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}