{
  "name": "Send multi-city weather forecasts with AI-enhanced formatting from OpenWeatherMap to Gmail",
  "nodes": [
    {
      "id": "45a9c8c7-b596-4f48-baf8-09a46e4004df",
      "name": "JS - Validate JSON from LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        1824,
        16
      ]
    },
    {
      "id": "f837e628-3bac-4d22-afef-32ba3df0c016",
      "name": "GMAIL - Send Weather Briefing",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1712,
        352
      ]
    },
    {
      "id": "b6c7d8b2-0a69-472d-b508-3453eadeea4b",
      "name": "JS - Bundle Cities for LLM",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        96
      ]
    },
    {
      "id": "e4a3a918-3b48-44ba-a463-3d77786fdc9a",
      "name": "JS - Build Daily Summaries (5 days)",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        288
      ]
    },
    {
      "id": "0a824d7f-d3d3-4c8e-b782-36d5c94191ae",
      "name": "OpenWeatherMap (OWM) - 5 Day Forecast (by City)",
      "type": "n8n-nodes-base.openWeatherMap",
      "position": [
        1024,
        80
      ]
    },
    {
      "id": "2ad3a2e8-3605-4203-a113-44fe99c34e66",
      "name": "JS - Pick Lat/Lon",
      "type": "n8n-nodes-base.code",
      "position": [
        640,
        288
      ]
    },
    {
      "id": "e6202cc9-8516-4c12-beea-1c3dca68dc8a",
      "name": "SET - Carry Asked City to Forecast",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        288
      ]
    },
    {
      "id": "d2f43ed1-2f4a-476b-8e38-4277ce72e786",
      "name": "MERGE - Pair Cities",
      "type": "n8n-nodes-base.merge",
      "position": [
        464,
        288
      ]
    },
    {
      "id": "5dd95724-b5fe-4230-87b4-4554f1dc74ea",
      "name": "HTTP - OWM Geocoding",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        224,
        32
      ]
    },
    {
      "id": "d574f191-aed1-472c-80e0-96f22ef14480",
      "name": "JS - Normalize City Inputs",
      "type": "n8n-nodes-base.code",
      "position": [
        16,
        304
      ]
    },
    {
      "id": "11ec0415-f62f-4e61-8416-7468c235e2b7",
      "name": "TRIGGER - Input City Names",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -160,
        304
      ]
    },
    {
      "id": "7b1dfae5-be7d-4d76-9f6c-3bf3bc0eb271",
      "name": "LLM - AI Weather Briefing Composer",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1520,
        16
      ]
    },
    {
      "id": "07e5c472-3d02-4579-a1ef-77bd8ea44bf5",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -512
      ],
      "parameters": {
        "width": 608,
        "height": 1056,
        "content": "# Try Out\n\n## Overview\n### This workflow automates weather forecast delivery by collecting city names, fetching 5-day forecasts from OpenWeatherMap, and generating professionally formatted HTML emails"
      }
    },
    {
      "id": "39f8510b-c1a3-44b7-97bd-fe491bd72d15",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -160
      ],
      "parameters": {
        "width": 208,
        "height": 656,
        "content": "## Geocoding (OWM)\n### Resolve each city to lat/lon using OpenWeather Geocoding API."
      }
    },
    {
      "id": "746f1466-187a-421b-8160-b4a982dd02a8",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        96
      ],
      "parameters": {
        "width": 560,
        "height": 400,
        "content": "## Pairing Cities ↔ Coordinates\n### Align normalized city with its geocode (by position) and select asked_city, country, lat, lon."
      }
    },
    {
      "id": "fd98f570-9beb-4cb7-9de3-eb1fb2599a33",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -144
      ],
      "parameters": {
        "width": 208,
        "height": 640,
        "content": "## Forecast Retrieval\n### Pull 5-day forecast per city by coordinates."
      }
    },
    {
      "id": "7864bbf7-eeab-43a6-ab00-7d1786a5f414",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -144
      ],
      "parameters": {
        "width": 576,
        "height": 352,
        "content": "## LLM AI Weather Briefing\n### Ask LLM to produce subject + HTML for an email; validate/extract the result."
      }
    },
    {
      "id": "8ac37160-d037-42a3-8900-c70f326c5901",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -144
      ],
      "parameters": {
        "width": null,
        "height": 640,
        "content": "## Summarization & Packaging\n### Convert raw OWM output into per-day tables & guidance; bundle all cities into one payload."
      }
    },
    {
      "id": "fe07b361-deae-4f13-b3a7-d85804d5d7a7",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        224
      ],
      "parameters": {
        "width": 576,
        "height": 288,
        "content": "## Delivery \n### Send the formatted briefing to the recipient(s)."
      }
    },
    {
      "id": "0d440118-543a-44ca-bdc1-03187c110850",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -192,
        112
      ],
      "parameters": {
        "width": 352,
        "height": 384,
        "content": "## Input & Normalization\n### Collect 3 city names from the form and normalize (trim, title-case, dedupe)."
      }
    }
  ],
  "connections": {
    "JS - Pick Lat/Lon": {
      "main": [
        [
          {
            "node": "SET - Carry Asked City to Forecast",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "MERGE - Pair Cities": {
      "main": [
        [
          {
            "node": "JS - Pick Lat/Lon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP - OWM Geocoding": {
      "main": [
        [
          {
            "node": "MERGE - Pair Cities",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS - Bundle Cities for LLM": {
      "main": [
        [
          {
            "node": "LLM - AI Weather Briefing Composer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS - Normalize City Inputs": {
      "main": [
        [
          {
            "node": "HTTP - OWM Geocoding",
            "type": "main",
            "index": 0
          },
          {
            "node": "MERGE - Pair Cities",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "TRIGGER - Input City Names": {
      "main": [
        [
          {
            "node": "JS - Normalize City Inputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS - Validate JSON from LLM": {
      "main": [
        [
          {
            "node": "GMAIL - Send Weather Briefing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM - AI Weather Briefing Composer": {
      "main": [
        [
          {
            "node": "JS - Validate JSON from LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SET - Carry Asked City to Forecast": {
      "main": [
        [
          {
            "node": "OpenWeatherMap (OWM) - 5 Day Forecast (by City)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JS - Build Daily Summaries (5 days)": {
      "main": [
        [
          {
            "node": "JS - Bundle Cities for LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenWeatherMap (OWM) - 5 Day Forecast (by City)": {
      "main": [
        [
          {
            "node": "JS - Build Daily Summaries (5 days)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}