AutomationFlowsAI & RAG › Ai-generated Weather Analysis with Nws Alerts, Radar Imagery, and Home Assistant

Ai-generated Weather Analysis with Nws Alerts, Radar Imagery, and Home Assistant

ByCarl Danley @carldanley on n8n.io

This n8n template demonstrates how you can generate an AI-produced weather analysis of your local radar loop and home assistant precipitation sensor(s) to keep your family informed of National Weather Service Alerts.

Webhook trigger★★★★☆ complexityAI-powered20 nodesHTTP RequestOpenAIHome AssistantOpenAI ChatChain Summarization
AI & RAG Trigger: Webhook Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:
Ai-generated Weather Analysis with Nws Alerts, Radar Imagery, and Home Assistant — n8n workflow card showing HTTP Request, OpenAI, Home Assistant integration

This workflow corresponds to n8n.io template #6188 — we link there as the canonical source.

This workflow follows the Chainsummarization → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "kJfDku2rYe5QZdCO",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "National Weather Service AI Analysis",
  "tags": [],
  "nodes": [
    {
      "id": "a72e2042-fd53-46b4-b366-c522ef3044ab",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -32,
        16
      ],
      "parameters": {
        "path": "b74e13cd-ad2f-4ef1-8350-ff6b915e5485",
        "options": {},
        "httpMethod": "POST",
        "responseData": "allEntries",
        "responseMode": "lastNode"
      },
      "typeVersion": 2
    },
    {
      "id": "31d8e7b5-c47a-42af-abb0-02f9c2482201",
      "name": "Get NWS Alerts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        192,
        16
      ],
      "parameters": {
        "url": "https://api.weather.gov/alerts",
        "options": {
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json"
            }
          }
        },
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "status",
              "value": "actual"
            },
            {
              "name": "point",
              "value": "={{ $json.body.latitude }},{{ $json.body.longitude }}"
            }
          ]
        }
      },
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "b1938edb-79be-4399-a815-dc90ffd1f240",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        384,
        16
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "body.features"
      },
      "typeVersion": 1
    },
    {
      "id": "bc5b7d6c-e2ad-43ab-aad1-d947799243e5",
      "name": "Remove Irrelevant Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        576,
        16
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "c1e43be8-8b6c-4eb6-a344-251473f78dbf",
              "name": "id",
              "type": "string",
              "value": "={{ $json.id }}"
            },
            {
              "id": "26551b00-b7a6-43e6-85d2-23921e5b9c75",
              "name": "properties.areaDesc",
              "type": "string",
              "value": "={{ $json.properties.areaDesc }}"
            },
            {
              "id": "d4a19262-2c9e-4b45-bb79-9aa97da77e69",
              "name": "properties.effective",
              "type": "string",
              "value": "={{ $json.properties.effective }}"
            },
            {
              "id": "40fdf9b8-e594-405c-88cc-6e8a80fcfa60",
              "name": "properties.expires",
              "type": "string",
              "value": "={{ $json.properties.expires }}"
            },
            {
              "id": "715541f6-bcdf-4152-9427-dba110a4ee9e",
              "name": "properties.severity",
              "type": "string",
              "value": "={{ $json.properties.severity }}"
            },
            {
              "id": "b4851577-2d71-4ab6-bd8c-e6bf3db412f1",
              "name": "properties.certainty",
              "type": "string",
              "value": "={{ $json.properties.certainty }}"
            },
            {
              "id": "43aba50b-4e09-4e26-8ded-328c1ead3469",
              "name": "properties.status",
              "type": "string",
              "value": "={{ $json.properties.status }}"
            },
            {
              "id": "aab46fc5-e6c3-45c6-b12f-da4d11d82b25",
              "name": "properties.headline",
              "type": "string",
              "value": "={{ $json.properties.headline }}"
            },
            {
              "id": "ab826652-b359-4047-a1fa-4da9797a54d2",
              "name": "properties.description",
              "type": "string",
              "value": "={{ $json.properties.description }}"
            },
            {
              "id": "e0ffea55-c055-44d2-952f-5785e7c7d3c2",
              "name": "properties.instruction",
              "type": "string",
              "value": "={{ $json.properties.instruction }}"
            },
            {
              "id": "205b4373-515c-40d9-8d02-e2a5e3ddc7f4",
              "name": "properties.parameters.NWSheadline",
              "type": "array",
              "value": "={{ $json.properties.parameters.NWSheadline }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e0ce90cb-a447-4b5c-a3e7-6ea2ccfa4efe",
      "name": "Filter by Severity",
      "type": "n8n-nodes-base.filter",
      "position": [
        960,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "7dde0a87-93ff-482b-9c53-d13a191f982b",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.properties.severity }}",
              "rightValue": "Moderate"
            },
            {
              "id": "28ed779f-d676-4619-bff4-12877b696415",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.properties.severity }}",
              "rightValue": "Severe"
            },
            {
              "id": "a28503c7-f468-4cbf-800e-edfa05d405ce",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.properties.severity }}",
              "rightValue": "Extreme"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "e5272333-90a2-4bfa-969f-0cd6e2d50ad8",
      "name": "Filter by Effective",
      "type": "n8n-nodes-base.filter",
      "position": [
        1152,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f99f25cf-d59b-4739-be7f-269ecb07f76f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ new Date($json.properties.effective).getTime() <= new Date().getTime() }}",
              "rightValue": "true"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "4b05f80a-b851-4286-9618-86dd11600faa",
      "name": "Filter by Status",
      "type": "n8n-nodes-base.filter",
      "position": [
        768,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "2b51bbc7-927f-40a5-b43b-d12e23b6ea5c",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.properties.status }}",
              "rightValue": "Actual"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "fe639674-9bfe-4344-b4dc-3141f90cbf9f",
      "name": "Fetch Weather.gov Radar Loop",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        608
      ],
      "parameters": {
        "url": "https://radar.weather.gov/ridge/standard/KAMX_loop.gif",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "7a966d42-eae1-4aaf-ad35-2dff15b62e68",
      "name": "Filter by Expired",
      "type": "n8n-nodes-base.filter",
      "position": [
        1344,
        16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f99f25cf-d59b-4739-be7f-269ecb07f76f",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ new Date($json.properties.expires).getTime() >= new Date().getTime() }}",
              "rightValue": "true"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a071bf45-dd82-41d0-9130-3c8ef6891ded",
      "name": "Analyze Radar Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        960,
        496
      ],
      "parameters": {
        "text": "=This is the latest weather radar animation for the monitored area. The AI should analyze precipitation patterns, storm intensity, and movement.\n\nA local weather sensor reports precipitation type: {{ $json.state }}. This sensor takes precedence over radar-based assumptions when determining real-time weather conditions.\n\nDark greens, yellows, and reds indicate stronger precipitation. If storms are present, assess their movement and potential impact on the area. When describing weather, use cautious language like \"it is likely raining\" rather than making definitive statements unless radar data is conclusive.\n\nConsider storm progression over time and estimate when precipitation may begin or end based on timestamps in the radar animation.\n\nProvide a clear, concise summary of current conditions based on the radar and local weather sensor input.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "resource": "image",
        "inputType": "base64",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ac0ae58a-1c40-421d-ad53-9f2e560319df",
      "name": "Map JSON Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1152,
        496
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ad4a9a05-20b8-4eda-a477-344d385b4a1e",
              "name": "radar_summary",
              "type": "string",
              "value": "={{ $json.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "4bea6742-c424-4250-9d1d-74b4cd46cff4",
      "name": "Get Local Weather Precipication",
      "type": "n8n-nodes-base.homeAssistant",
      "position": [
        576,
        416
      ],
      "parameters": {
        "entityId": "sensor.local_weather_precipitation_type",
        "resource": "state"
      },
      "credentials": {
        "homeAssistantApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a7d3e335-a2ae-459d-829f-f0047f7c1cbb",
      "name": "Merge JSON with Image",
      "type": "n8n-nodes-base.merge",
      "position": [
        768,
        496
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "72fe8625-4631-4912-9db7-7ca721638431",
      "name": "Merge Radar Analysis with NWS Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        1344,
        272
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "dd7f1b53-dba0-4532-98e3-bfcc9c0a8681",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1536,
        464
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "90f46158-41ed-4811-baa6-efac8beff957",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        384,
        256
      ],
      "parameters": {
        "jsCode": "let idx = 0\nlet alerts = []\n\nfor (const item of $input.all()) {\n  for (const alert of item.json.alerts) {\n    idx++\n\n      let template = `Alert ${idx}:\n  **Headline:** ${alert.properties.headline}\n  **Severity:** ${alert.properties.severity}\n  **Description:** ${alert.properties.description}\n  **Instructions:** ${alert.properties.instruction}\n`\n\n    alerts.push(template)\n  }\n\n  item.json = { nws_alerts: alerts.join('\\n\\n'), nws_alerts_count: alerts.length }\n}\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "bceccd50-f2f3-4ff4-b378-6030c8b680cd",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        192,
        256
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "alerts"
      },
      "typeVersion": 1
    },
    {
      "id": "642995c2-a4f4-43a4-bc58-ed2faebe1426",
      "name": "Generate a Summary",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        1536,
        272
      ],
      "parameters": {
        "options": {
          "summarizationMethodAndPrompts": {
            "values": {
              "prompt": "=It is critically important to limit your response to 255 characters or less, including spaces.\n\nAI Weather Assistant Alert: A new weather alert has been issued for this location. Summarize the alert details concisely. Include only essential information, such as severe conditions, timing, and affected areas.\n\nThe number of active weather alerts is: {{ $json.nws_alerts_count }}.\n\n# Reviewing all Moderate and Severe alerts:\n\n{{  $json.nws_alerts }}\n\n# Radar Analysis:\n\n{{  $json.radar_summary }}\n",
              "summarizationMethod": "stuff"
            }
          }
        },
        "operationMode": "nodeInputBinary"
      },
      "typeVersion": 2.1
    },
    {
      "id": "73e4af91-061d-44a7-a3aa-f8efad62e8c9",
      "name": "Map JSON to Response",
      "type": "n8n-nodes-base.set",
      "position": [
        1920,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "e290b262-1443-43ce-8761-1131cbc2cce2",
              "name": "summary",
              "type": "string",
              "value": "={{ $json.output.text }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "25f096aa-457e-4e9e-8394-e0054dc7ed55",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -32
      ],
      "parameters": {
        "width": 544,
        "height": 832,
        "content": "# Overview\n\nThis n8n template demonstrates how you can generate an AI-produced weather analysis of your local radar loop and home assistant precipitation sensor(s) to keep your family informed of National Weather Service Alerts.\n\nWith as crazy as things have been lately in the open world, how will you and your family know when a severe or extreme alert impacts your area?\n\n## How it Works\n\n- This workflow is triggered by a webhook with takes a latitude and longitude json payload to identify the area for monitoring.\n- Then, it fetches the National Weather Service Alerts and filters them down to alerts which are currently active and their severity.\n- Next, it fetches the local precipitation value from your Home Assistant instance (a value like \"Light Rain\" or \"No Rain\", etc) coupled with your respective weather.gov radar loop image.\n- It then submits this data to OpenAI and produces an output regarding the image analysis.\n- Finally, it takes this analysis and uses OpenAI to again generate a short summary.\n\n## How to Use\n\n- Import the workflow into your n8n instance\n- Update the credentials in the problematic nodes\n- Make sure you adjust the radar loop image that is being used\n\n## Requirements\n\n- A Home Assistant Instance (you could remove this data if you wanted)\n- An OpenAI account for LLM and image analysis\n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "77f65303-990f-4463-bc6a-0949b7cb9cf6",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Get Local Weather Precipication",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Weather.gov Radar Loop",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Radar Analysis with NWS Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Get NWS Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Remove Irrelevant Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get NWS Alerts": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Status": {
      "main": [
        [
          {
            "node": "Filter by Severity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Expired": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map JSON Response": {
      "main": [
        [
          {
            "node": "Merge Radar Analysis with NWS Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate a Summary",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Severity": {
      "main": [
        [
          {
            "node": "Filter by Effective",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate a Summary": {
      "main": [
        [
          {
            "node": "Map JSON to Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Radar Image": {
      "main": [
        [
          {
            "node": "Map JSON Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter by Effective": {
      "main": [
        [
          {
            "node": "Filter by Expired",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Map JSON to Response": {
      "main": [
        []
      ]
    },
    "Merge JSON with Image": {
      "main": [
        [
          {
            "node": "Analyze Radar Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Remove Irrelevant Fields": {
      "main": [
        [
          {
            "node": "Filter by Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Weather.gov Radar Loop": {
      "main": [
        [
          {
            "node": "Merge JSON with Image",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Local Weather Precipication": {
      "main": [
        [
          {
            "node": "Merge JSON with Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Radar Analysis with NWS Data": {
      "main": [
        [
          {
            "node": "Generate a Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This n8n template demonstrates how you can generate an AI-produced weather analysis of your local radar loop and home assistant precipitation sensor(s) to keep your family informed of National Weather Service Alerts.

Source: https://n8n.io/workflows/6188/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow is designed for researchers, students, and professionals who frequently read academic papers and need concise summaries. It is useful for anyone who wants to quickly extract key informat

Chain Summarization, OpenAI Chat, HTTP Request +2
AI & RAG

The Ultimate Scraper for n8n uses Selenium and AI to retrieve any information displayed on a webpage. You can also use session cookies to log in to the targeted webpage for more advanced scraping need

OpenAI Chat, HTTP Request, Information Extractor +1
AI & RAG

z-Api. Uses httpRequest, openAi, redis, postgres. Webhook trigger; 61 nodes.

HTTP Request, OpenAI, Redis +4
AI & RAG

I made this little workflow with care for people like you who are part of busy WhatsApp groups and want a simple way to keep track of everything.

Google Drive, Google Sheets, OpenAI Chat +2
AI & RAG

How it works: • Receives WhatsApp messages via webhook from Whapi.Cloud • Routes commands: AI chat (/ai), numeric commands (1-9), or help menu • Sends responses: text, images, documents, videos, conta

HTTP Request, OpenAI