{
  "name": "Analyze Alertmanager incidents and post diagnostic reports to Mattermost",
  "nodes": [
    {
      "id": "8d745fd9-3399-4183-8e18-5f16c3af8ff4",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        608,
        448
      ]
    },
    {
      "id": "7fbe723a-169a-4e7c-8686-fd09cdf3977f",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        464,
        592
      ]
    },
    {
      "id": "6957df49-51ba-4c1c-bc53-3dee07f9fb11",
      "name": "Qdrant Vector Store",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreQdrant",
      "position": [
        992,
        944
      ]
    },
    {
      "id": "39ccd5e2-7ff9-4a46-92aa-c82e74f85433",
      "name": "Embeddings Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.embeddingsGoogleGemini",
      "position": [
        992,
        1152
      ]
    },
    {
      "id": "af2bc1a7-d085-4603-9193-81c944ac6381",
      "name": "K8S mcp",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        720,
        944
      ]
    },
    {
      "id": "130bbbe8-f909-4b93-a4a5-22d6758fd984",
      "name": "Grafana mcp",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        864,
        944
      ]
    },
    {
      "id": "e33a8a24-6ceb-444b-a693-cc04306cfef9",
      "name": "Digitalocean MCP",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        576,
        944
      ]
    },
    {
      "id": "b704efa7-6479-47a8-86b2-b6a5fa103ef4",
      "name": "Github MCP",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        448,
        944
      ]
    },
    {
      "id": "581b947f-3273-4174-95d5-816419741372",
      "name": "Receive alerts",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -288,
        448
      ]
    },
    {
      "id": "edba7eee-545a-43d1-ae0d-4ef81ffe8193",
      "name": "GetAlertMessages",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1152,
        448
      ]
    },
    {
      "id": "dfe4c376-00ca-4571-ae82-019abaaed636",
      "name": "Post in thread",
      "type": "n8n-nodes-base.mattermost",
      "position": [
        1568,
        448
      ]
    },
    {
      "id": "c8365480-544e-483a-8785-1e5e127158b0",
      "name": "PreProcessAlerts",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        448
      ]
    },
    {
      "id": "b8f64b31-ce11-4622-8d5a-1760faee8a4a",
      "name": "FindAlert",
      "type": "n8n-nodes-base.code",
      "position": [
        1360,
        448
      ]
    },
    {
      "id": "98d6bafe-1eb5-40b9-9c07-039164125ac3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        352
      ],
      "parameters": {
        "width": 692,
        "height": 352,
        "content": "# Input chain\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAdd your Mattermost server address and channel id into SetVars"
      }
    },
    {
      "id": "900a2007-edbb-4a01-820b-d2c57be05767",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        352
      ],
      "parameters": {
        "width": 736,
        "height": 352,
        "content": "# Output chain"
      }
    },
    {
      "id": "186a58b0-cd58-44b4-aec5-aec6128b9c15",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        352
      ],
      "parameters": {
        "width": 576,
        "height": 352,
        "content": "# Alert analysis"
      }
    },
    {
      "id": "06021bf1-8efb-479a-adc2-dd505fb501c3",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        880
      ],
      "parameters": {
        "width": 848,
        "height": 448,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# MCP servers\nAdd correct URLs for remote MCPs\nUse following mcp:\n* [grafana-mcp](https://github.com/grafana/mcp-grafana)\n* [kubernetes-mcp-server](https://github.com/containers/kuber"
      }
    },
    {
      "id": "6497f0a5-3ed3-4d6e-992d-930160763d23",
      "name": "SetVars",
      "type": "n8n-nodes-base.set",
      "position": [
        -80,
        448
      ]
    },
    {
      "id": "e3ed18c7-3317-409c-afe2-952b61b63b8d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        752
      ],
      "parameters": {
        "width": 720,
        "height": 688,
        "content": "# Overview\nWorkflow receives alert from Alertmanager, analize it and send report to Mattermost\n## Requirements:\n1. OpenAI  or Anthropic API key\n2. Mattermost API key\n3. Google Gemini API key\n4. Webhoo"
      }
    }
  ],
  "connections": {
    "K8S mcp": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "SetVars": {
      "main": [
        [
          {
            "node": "PreProcessAlerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "GetAlertMessages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FindAlert": {
      "main": [
        [
          {
            "node": "Post in thread",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Github MCP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Grafana mcp": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Receive alerts": {
      "main": [
        [
          {
            "node": "SetVars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Digitalocean MCP": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "GetAlertMessages": {
      "main": [
        [
          {
            "node": "FindAlert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "PreProcessAlerts": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Qdrant Vector Store": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings Google Gemini": {
      "ai_embedding": [
        [
          {
            "node": "Qdrant Vector Store",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    }
  }
}