Wazuh_Alert_Investigation Copia

Intermedio

Este es unSecOps, AI Summarizationflujo de automatización del dominio deautomatización que contiene 6 nodos.Utiliza principalmente nodos como If, Webhook, Telegram, LmChatOpenAi, ChainSummarization. Automatizar la triaje y reporte de alertas de Wazuh con GPT-4o-mini y Telegram

Requisitos previos
  • Punto final de HTTP Webhook (n8n generará automáticamente)
  • Bot Token de Telegram
  • 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": "",
  "meta": {
    "instanceId": "",
    "templateCredsSetupCompleted": true
  },
  "name": "Wazuh_Alert_Investigation copy",
  "tags": [
    {
      "id": "",
      "name": "Github",
      "createdAt": "2025-07-08T08:24:29.609Z",
      "updatedAt": "2025-07-08T08:24:29.609Z"
    }
  ],
  "nodes": [
    {
      "id": "If-0",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        240,
        -20
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.body.severity }}",
              "rightValue": "1 low"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "Alerta-de-Wazuh-1",
      "name": "Alerta de Wazuh",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        -20
      ],
      "webhookId": "",
      "parameters": {
        "path": "",
        "options": {
          "rawBody": true
        },
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "Sin-Operaciones-2",
      "name": "Sin Operaciones",
      "type": "n8n-nodes-base.noOp",
      "position": [
        260,
        200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "Resumen-de-Investigaci-n-3",
      "name": "Resumen de Investigación",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        540,
        -40
      ],
      "parameters": {
        "options": {
          "summarizationMethodAndPrompts": {
            "values": {
              "prompt": "You are the experinced SOC AI Analyst designed by Mariskarthick M, Analyse the following and provide the detailed investigation with the below mentioned format.\n\n\"{text}\"\n\nconicise summary",
              "combineMapPrompt": "You are the experinced SOC AI Analyst designed by Mariskarthick M, Analyse the following and provide the detailed investigation with the below mentioned format.\n\n#Analyse:\n{{ $json.body.all_fields.full_log }}\n\n#Format:\nAlert Name: \nAlert Description: (describe about that alert)\nMitre Tactic & Technique\nImpacted Scope: Source IP, Destiantion IP, Host Machine\n\nExternal Artificats Reputation check:\n\nAnalysis:\n\nSecurity Recommendations.\n\nPlease make the investigation report in organized way and each fields line by line.\n {{ $json.body }}"
            }
          }
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "Equipo-SOC-4",
      "name": "Equipo SOC",
      "type": "n8n-nodes-base.telegram",
      "position": [
        920,
        -20
      ],
      "webhookId": "",
      "parameters": {
        "text": "={{ \n  $json.output.text\n    .replaceAll('\\\\', '')                       // Remove escape slashes\n    .replaceAll('*', '')                        // Remove Markdown stars\n    .replaceAll('#', '')                        // Remove Markdown headers\n    .replaceAll('_', '')                        // Remove underscores\n    .replaceAll('[', '')                        // Remove leftover brackets\n    .replaceAll(']', '')                        // Remove closing brackets\n    .replaceAll('(', '(')                       // Retain parentheses\n    .replaceAll(')', ')')\n    .replaceAll('`', '')                        // Remove backticks\n    .replaceAll('  ', ' ')                      // Extra space trim\n    .replaceAll('\\n\\n', '\\n')                   // Collapse double newlines\n    .replaceAll('\\n ', '\\n')                    // Remove leading spaces on lines\n    .replaceAll(' - ', ' — ')                   // Optional: replace dash with em dash for clarity\n    .trim()\n}}\n",
        "chatId": "",
        "additionalFields": {
          "appendAttribution": true
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "",
          "name": ""
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "717713de-4a80-4b51-910c-3b6a588e2f56",
      "name": "Modelo de IA Personalizado",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        560,
        200
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2f2786be-474f-4ab6-a41e-391e7427d022",
  "connections": {
    "If-0": {
      "main": [
        [
          {
            "node": "Resumen-de-Investigaci-n-3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sin-Operaciones-2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alerta-de-Wazuh-1": {
      "main": [
        [
          {
            "node": "If-0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "717713de-4a80-4b51-910c-3b6a588e2f56": {
      "ai_languageModel": [
        [
          {
            "node": "Resumen-de-Investigaci-n-3",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Resumen-de-Investigaci-n-3": {
      "main": [
        [
          {
            "node": "Equipo-SOC-4",
            "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?

Intermedio - Operaciones de seguridad, 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
Intermedio
Número de nodos6
Categoría2
Tipos de nodos6
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
mariskarthick

mariskarthick

@mariskarthick

An Opensource Enthusiast specializing in detection engineering, threat hunting, and automating security operations to accelerate threat detection and response.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34