Análisis de IA del Servicio Meteorológico Nacional

Avanzado

Este es unPersonal Productivity, AI Summarizationflujo de automatización del dominio deautomatización que contiene 20 nodos.Utiliza principalmente nodos como Set, Code, Merge, Filter, Webhook. Análisis meteorológico generado por IA basado en alertas del NWS, imágenes de radar y Home Assistant

Requisitos previos
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de OpenAI
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "id": "kJfDku2rYe5QZdCO",
  "meta": {
    "instanceId": "99d73f46ce25facbb6a315b9049061902fa3a045876ce7aa2b16534051157fdd",
    "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
      ],
      "webhookId": "b74e13cd-ad2f-4ef1-8350-ff6b915e5485",
      "parameters": {
        "path": "b74e13cd-ad2f-4ef1-8350-ff6b915e5485",
        "options": {},
        "httpMethod": "POST",
        "responseData": "allEntries",
        "responseMode": "lastNode"
      },
      "typeVersion": 2
    },
    {
      "id": "31d8e7b5-c47a-42af-abb0-02f9c2482201",
      "name": "Obtener Alertas del NWS",
      "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": "Separar",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        384,
        16
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "body.features"
      },
      "typeVersion": 1
    },
    {
      "id": "bc5b7d6c-e2ad-43ab-aad1-d947799243e5",
      "name": "Eliminar Campos no Relevantes",
      "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": "Filtrar por Gravedad",
      "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": "Filtrar por Vigencia",
      "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": "Filtrar por Estado",
      "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": "Obtener Bucle de Radar de Weather.gov",
      "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": "Filtrar por Caducados",
      "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": "Analizar Imagen de Radar",
      "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": {
          "id": "bDmccS2kILl6lfr2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ac0ae58a-1c40-421d-ad53-9f2e560319df",
      "name": "Mapear Respuesta JSON",
      "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": "Obtener Precipitación Local",
      "type": "n8n-nodes-base.homeAssistant",
      "position": [
        576,
        416
      ],
      "parameters": {
        "entityId": "sensor.local_weather_precipitation_type",
        "resource": "state"
      },
      "credentials": {
        "homeAssistantApi": {
          "id": "nhKk0HXRsf8saByq",
          "name": "Home Assistant account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a7d3e335-a2ae-459d-829f-f0047f7c1cbb",
      "name": "Combinar JSON con Imagen",
      "type": "n8n-nodes-base.merge",
      "position": [
        768,
        496
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "72fe8625-4631-4912-9db7-7ca721638431",
      "name": "Combinar Análisis de Radar con Datos NWS",
      "type": "n8n-nodes-base.merge",
      "position": [
        1344,
        272
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "dd7f1b53-dba0-4532-98e3-bfcc9c0a8681",
      "name": "Modelo de Chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1536,
        464
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "bDmccS2kILl6lfr2",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "90f46158-41ed-4811-baa6-efac8beff957",
      "name": "Código",
      "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": "Agregar",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        192,
        256
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "alerts"
      },
      "typeVersion": 1
    },
    {
      "id": "642995c2-a4f4-43a4-bc58-ed2faebe1426",
      "name": "Generar Resumen",
      "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": "Mapear JSON a Respuesta",
      "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": "Nota Adhesiva",
      "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,
  "pinData": {
    "Webhook": [
      {
        "json": {
          "body": {
            "latitude": 0,
            "longitude": 0
          }
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "77f65303-990f-4463-bc6a-0949b7cb9cf6",
  "connections": {
    "90f46158-41ed-4811-baa6-efac8beff957": {
      "main": [
        [
          {
            "node": "4bea6742-c424-4250-9d1d-74b4cd46cff4",
            "type": "main",
            "index": 0
          },
          {
            "node": "fe639674-9bfe-4344-b4dc-3141f90cbf9f",
            "type": "main",
            "index": 0
          },
          {
            "node": "72fe8625-4631-4912-9db7-7ca721638431",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a72e2042-fd53-46b4-b366-c522ef3044ab": {
      "main": [
        [
          {
            "node": "31d8e7b5-c47a-42af-abb0-02f9c2482201",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bceccd50-f2f3-4ff4-b378-6030c8b680cd": {
      "main": [
        [
          {
            "node": "90f46158-41ed-4811-baa6-efac8beff957",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b1938edb-79be-4399-a815-dc90ffd1f240": {
      "main": [
        [
          {
            "node": "bc5b7d6c-e2ad-43ab-aad1-d947799243e5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "31d8e7b5-c47a-42af-abb0-02f9c2482201": {
      "main": [
        [
          {
            "node": "b1938edb-79be-4399-a815-dc90ffd1f240",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4b05f80a-b851-4286-9618-86dd11600faa": {
      "main": [
        [
          {
            "node": "e0ce90cb-a447-4b5c-a3e7-6ea2ccfa4efe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7a966d42-eae1-4aaf-ad35-2dff15b62e68": {
      "main": [
        [
          {
            "node": "bceccd50-f2f3-4ff4-b378-6030c8b680cd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac0ae58a-1c40-421d-ad53-9f2e560319df": {
      "main": [
        [
          {
            "node": "72fe8625-4631-4912-9db7-7ca721638431",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "dd7f1b53-dba0-4532-98e3-bfcc9c0a8681": {
      "ai_languageModel": [
        [
          {
            "node": "642995c2-a4f4-43a4-bc58-ed2faebe1426",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "e0ce90cb-a447-4b5c-a3e7-6ea2ccfa4efe": {
      "main": [
        [
          {
            "node": "e5272333-90a2-4bfa-969f-0cd6e2d50ad8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "642995c2-a4f4-43a4-bc58-ed2faebe1426": {
      "main": [
        [
          {
            "node": "73e4af91-061d-44a7-a3aa-f8efad62e8c9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a071bf45-dd82-41d0-9130-3c8ef6891ded": {
      "main": [
        [
          {
            "node": "ac0ae58a-1c40-421d-ad53-9f2e560319df",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e5272333-90a2-4bfa-969f-0cd6e2d50ad8": {
      "main": [
        [
          {
            "node": "7a966d42-eae1-4aaf-ad35-2dff15b62e68",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "73e4af91-061d-44a7-a3aa-f8efad62e8c9": {
      "main": [
        []
      ]
    },
    "a7d3e335-a2ae-459d-829f-f0047f7c1cbb": {
      "main": [
        [
          {
            "node": "a071bf45-dd82-41d0-9130-3c8ef6891ded",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc5b7d6c-e2ad-43ab-aad1-d947799243e5": {
      "main": [
        [
          {
            "node": "4b05f80a-b851-4286-9618-86dd11600faa",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fe639674-9bfe-4344-b4dc-3141f90cbf9f": {
      "main": [
        [
          {
            "node": "a7d3e335-a2ae-459d-829f-f0047f7c1cbb",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "4bea6742-c424-4250-9d1d-74b4cd46cff4": {
      "main": [
        [
          {
            "node": "a7d3e335-a2ae-459d-829f-f0047f7c1cbb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "72fe8625-4631-4912-9db7-7ca721638431": {
      "main": [
        [
          {
            "node": "642995c2-a4f4-43a4-bc58-ed2faebe1426",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Avanzado - Productividad personal, Resumen de IA

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Avanzado
Número de nodos20
Categoría2
Tipos de nodos13
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34