{
  "name": "Generate personalized weather reports with OpenWeatherMap, Python and GPT-4.1-mini",
  "nodes": [
    {
      "id": "822a0d12-4591-40d0-85f9-0c940372ed5f",
      "name": "Fetch Weather Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -80,
        304
      ]
    },
    {
      "id": "99ddfbb3-c834-4017-9ec4-f32f870e1482",
      "name": "Process Weather Data",
      "type": "n8n-nodes-base.code",
      "position": [
        32,
        496
      ]
    },
    {
      "id": "0d850dd1-2930-407f-9f87-f418bc588f4a",
      "name": "Generate Email Content",
      "type": "n8n-nodes-base.code",
      "position": [
        160,
        320
      ]
    },
    {
      "id": "22cbe6d0-2360-4039-a7b5-fc242c3061ff",
      "name": "Send a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        800,
        304
      ]
    },
    {
      "id": "0c5c9ca9-ec89-4420-ad8c-0a96ccb2b5b5",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        384,
        304
      ]
    },
    {
      "id": "1557d3ed-d6fa-4542-ab01-961873998ca4",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        432,
        512
      ]
    },
    {
      "id": "eccbbc05-da0c-40b9-8954-3f0fadb0640f",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -320,
        304
      ]
    },
    {
      "id": "52859605-1f9d-4e87-a722-920ac296095b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        192
      ],
      "parameters": {
        "width": null,
        "height": 304,
        "content": "Enter the name of a city in the form"
      }
    },
    {
      "id": "bcd1c3e0-ee2d-479d-9fc4-1d391d20c0e9",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        176
      ],
      "parameters": {
        "width": 480,
        "height": 464,
        "content": "Add OpenWeather API key to get current weather information about the cit, replace <your_API_key> with your actual API key. \nPython script will process and generate custom email relating to the weather"
      }
    },
    {
      "id": "49c4cdfb-13ea-41fa-90bc-7ced8147fc19",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        352,
        176
      ],
      "parameters": {
        "width": 352,
        "height": 480,
        "content": "Add OpenAI API Key. AI Agent will add a custom joke about the weather for the city you entered as part of the email message"
      }
    },
    {
      "id": "46ed9532-4693-4740-819f-81a1ddf51ca1",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        176
      ],
      "parameters": {
        "width": null,
        "height": 304,
        "content": "Add your Gmail credentials and update header and body of message. Node will send the custom email to the recipient"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Weather Data": {
      "main": [
        [
          {
            "node": "Process Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Fetch Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Process Weather Data": {
      "main": [
        [
          {
            "node": "Generate Email Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Email Content": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}