{
  "name": "Daily Brief, checkpoint 1 (settings and weather)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 7
            }
          ]
        }
      },
      "id": "446731f4-d3d9-4f1b-9577-0116d0705725",
      "name": "Every morning at 7",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        1248,
        928
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "719f0d54-0488-4e76-8cba-bb5f7995e2a5",
              "name": "topics",
              "value": "AI agents, Gemini, n8n",
              "type": "string"
            },
            {
              "id": "f38fa2e0-0400-4d90-8f03-c7e6070f38f7",
              "name": "city",
              "value": "Paderborn",
              "type": "string"
            },
            {
              "id": "9f3683b7-8e56-4b76-9954-dd8153aa9b78",
              "name": "latitude",
              "value": 51.72,
              "type": "number"
            },
            {
              "id": "90c309bb-5bb1-4f8b-ade7-289f3367b804",
              "name": "longitude",
              "value": 8.76,
              "type": "number"
            },
            {
              "id": "a0e765cf-a0c3-43cb-9924-cd63c710cac8",
              "name": "email",
              "value": "you@example.com",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "c01195e4-f5fc-41e6-9b10-a9c11e13366a",
      "name": "My settings",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1472,
        928
      ]
    },
    {
      "parameters": {
        "url": "=https://api.open-meteo.com/v1/forecast?latitude={{ $('My settings').first().json.latitude }}&longitude={{ $('My settings').first().json.longitude }}&daily=temperature_2m_max,temperature_2m_min,precipitation_probability_max&timezone=auto&forecast_days=1",
        "options": {}
      },
      "id": "991f6932-9a59-4821-bbbd-3421d76c5ee8",
      "name": "Get weather",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1696,
        928
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "e425d589-7c8f-44ec-831a-bf8eafabb7c8",
              "name": "temp_min",
              "value": "={{ $json.daily.temperature_2m_min[0] }}",
              "type": "number"
            },
            {
              "id": "acefaaae-c2da-4701-9519-c0a6d2a1c11f",
              "name": "temp_max",
              "value": "={{ $json.daily.temperature_2m_max[0] }}",
              "type": "number"
            },
            {
              "id": "5e1caa3f-6985-467f-9002-a498bba17eda",
              "name": "rain_chance",
              "value": "={{ $json.daily.precipitation_probability_max[0] }}",
              "type": "number"
            },
            {
              "id": "7efe963e-ab39-4f98-a039-edafe0b64074",
              "name": "summary",
              "value": "={{ $json.daily.temperature_2m_min[0] }} to {{ $json.daily.temperature_2m_max[0] }} °C, {{ $json.daily.precipitation_probability_max[0] }}% chance of rain",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "695ec59d-1161-4896-92b0-ff3275af83b8",
      "name": "Format weather",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1920,
        928
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "0b58d2e0-cb7b-4257-ab3e-ace25cbd69e0",
              "leftValue": "={{ $json.rain_chance }}",
              "rightValue": 50,
              "operator": {
                "type": "number",
                "operation": "gt"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "5d13d98d-6679-4b4b-9c2f-b6aff8c8061c",
      "name": "Rain over 50%?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        2128,
        928
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "7530c764-d124-467a-834d-72fc8cd628fc",
              "name": "umbrella_note",
              "value": "☔ Take an umbrella today.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "98a83ec1-5c0a-4802-9f96-4fd78902c2d0",
      "name": "Umbrella note",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        2352,
        768
      ]
    },
    {
      "parameters": {
        "content": "## 1. Settings and weather\nYour topics, city and email in one place. Then: get the weather, cut the JSON down, check for rain.",
        "height": 628,
        "width": 1296,
        "color": 7
      },
      "id": "072d6a2d-e6b7-44e5-b8e2-a98e61c9c019",
      "name": "Stage 1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1184,
        688
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Every morning at 7": {
      "main": [
        [
          {
            "node": "My settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "My settings": {
      "main": [
        [
          {
            "node": "Get weather",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get weather": {
      "main": [
        [
          {
            "node": "Format weather",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format weather": {
      "main": [
        [
          {
            "node": "Rain over 50%?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rain over 50%?": {
      "main": [
        [
          {
            "node": "Umbrella note",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  }
}