{
  "name": "Analyze logs and correlate incidents with OpenAI and Slack",
  "nodes": [
    {
      "id": "6fcd8c22-a6d3-4ff4-880c-2ce287b4b044",
      "name": "Incident Trigger",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -672,
        320
      ]
    },
    {
      "id": "226c09f3-3d29-49d5-86ce-27dcb4f9a722",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -288,
        320
      ]
    },
    {
      "id": "00e7e3ac-b665-44aa-b289-04a6b2b7860f",
      "name": "Fetch Logs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        64,
        -176
      ]
    },
    {
      "id": "4c07f9ae-23e8-4499-8265-8eeb56468660",
      "name": "Fetch Metrics",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        304
      ]
    },
    {
      "id": "d66bbe1a-a06b-4fcd-8e17-a275406f077d",
      "name": "Fetch Recent Deployments",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        464
      ]
    },
    {
      "id": "190f0569-4b04-4967-a49e-5d88fbee73bd",
      "name": "Fetch Feature Flags",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        160,
        624
      ]
    },
    {
      "id": "37cf0bea-aa67-4e71-9120-eba1247be59a",
      "name": "Normalize and Denoise Logs",
      "type": "n8n-nodes-base.code",
      "position": [
        256,
        -176
      ]
    },
    {
      "id": "fdb0579f-ae62-43e7-8e62-4c724377d84a",
      "name": "Merge Context Data",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        448,
        288
      ]
    },
    {
      "id": "6b29f617-ee1c-4186-be4c-43ab69ed2c6a",
      "name": "OpenAI Embeddings",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        720,
        496
      ]
    },
    {
      "id": "e80ba28a-1f81-4405-95b3-4748031f19d9",
      "name": "Cluster Log Messages",
      "type": "@n8n/n8n-nodes-langchain.vectorStoreInMemory",
      "position": [
        704,
        288
      ]
    },
    {
      "id": "13ed20a6-ed88-4971-9458-5e94beada3d0",
      "name": "Identify Failure Patterns",
      "type": "n8n-nodes-base.code",
      "position": [
        1152,
        288
      ]
    },
    {
      "id": "9c860f13-1270-44cd-83ae-350ef54b49da",
      "name": "Time-Align Events",
      "type": "n8n-nodes-base.code",
      "position": [
        1360,
        288
      ]
    },
    {
      "id": "fd10f16d-5245-4e1c-9ee1-d69a929ca541",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1616,
        528
      ]
    },
    {
      "id": "1fd14fad-204b-4a02-b6f7-e070b74e728e",
      "name": "Root Cause Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1920,
        496
      ]
    },
    {
      "id": "8c782c17-209c-4c83-9ec4-01ab32fd5caf",
      "name": "Root Cause Analysis Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1696,
        288
      ]
    },
    {
      "id": "4ce733c6-4bfa-4c0a-9f9c-149965df3be7",
      "name": "Create Incident Ticket",
      "type": "n8n-nodes-base.slack",
      "position": [
        2224,
        288
      ]
    },
    {
      "id": "a0342a8b-fa71-4094-a5f5-d13a08cd562c",
      "name": "Document Loader",
      "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
      "position": [
        912,
        496
      ]
    },
    {
      "id": "d35db4d9-a6dd-419c-97bc-2b2abd3b83e8",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        144
      ],
      "parameters": {
        "width": 352,
        "height": 384,
        "content": "## Incident Trigger\n\nThis workflow starts when an incident alert is received through a webhook.\n"
      }
    },
    {
      "id": "896fa1a2-c1c0-4be8-8f98-0fac695ba6df",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        144
      ],
      "parameters": {
        "width": 320,
        "height": 368,
        "content": "## Workflow Configuration\nDefines the API endpoints used to collect logs, metrics, deployments, and feature flag data. It also configures the analysis time window and Slack channel used for incident n"
      }
    },
    {
      "id": "426b5dca-2a2f-44b8-89ce-da1ad13e5a28",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        80
      ],
      "parameters": {
        "width": 320,
        "height": 704,
        "content": "## Incident Context Collection\n\nThe workflow gathers operational context from multiple sources including logs, metrics, recent deployments, and feature flag changes."
      }
    },
    {
      "id": "9b81ffea-c472-4025-a0a2-6023f3da9b0d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -336
      ],
      "parameters": {
        "width": 480,
        "height": 304,
        "content": "## Log Normalization and Denoising\n\nRaw logs are cleaned and normalized to remove low-value entries such as debug or informational messages."
      }
    },
    {
      "id": "ac4ee442-eb76-40bf-91c3-aa41ce922b84",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        624,
        128
      ],
      "parameters": {
        "width": 400,
        "height": 464,
        "content": "## Failure Pattern Clustering\n\nError messages are converted into embeddings and grouped using a vector store."
      }
    },
    {
      "id": "55d9a63c-ef73-49f9-96c9-e08d531361b8",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        144
      ],
      "parameters": {
        "width": 464,
        "height": 368,
        "content": "## Event Correlation Analysis\n\nFailure patterns are time-aligned with contextual events such as deployments, configuration changes, and traffic spikes."
      }
    },
    {
      "id": "21c8b870-4481-49d1-bdd3-0ff9a70a7e9e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2112,
        144
      ],
      "parameters": {
        "width": 368,
        "height": 352,
        "content": "The final analysis is posted to Slack as an incident ticket for engineers to review."
      }
    },
    {
      "id": "7329f14e-9970-4716-9d80-da445160fce6",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1552,
        112
      ],
      "parameters": {
        "width": 528,
        "height": 544,
        "content": "## Root Cause Analysis and Incident Ticket\n\nAn AI agent analyzes all collected signals and generates root cause hypotheses."
      }
    },
    {
      "id": "c2a7c381-adda-4003-af89-a581dde6b9bb",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        80
      ],
      "parameters": {
        "width": 400,
        "height": 336,
        "content": "## AI-Powered Incident Root Cause Analysis\n\nThis workflow automates incident investigation using logs, metrics, deployment data, and configuration changes.\n\nIt clusters error logs, identifies failure "
      }
    }
  ],
  "connections": {
    "Fetch Logs": {
      "main": [
        [
          {
            "node": "Normalize and Denoise Logs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Metrics": {
      "main": [
        [
          {
            "node": "Merge Context Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document Loader": {
      "ai_document": [
        [
          {
            "node": "Cluster Log Messages",
            "type": "ai_document",
            "index": 0
          }
        ]
      ]
    },
    "Incident Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Root Cause Analysis Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Embeddings": {
      "ai_embedding": [
        [
          {
            "node": "Cluster Log Messages",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "Time-Align Events": {
      "main": [
        [
          {
            "node": "Root Cause Analysis Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Context Data": {
      "main": [
        [
          {
            "node": "Cluster Log Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Feature Flags": {
      "main": [
        [
          {
            "node": "Merge Context Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Cluster Log Messages": {
      "main": [
        [
          {
            "node": "Identify Failure Patterns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Logs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Metrics",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Recent Deployments",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Feature Flags",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Recent Deployments": {
      "main": [
        [
          {
            "node": "Merge Context Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Root Cause Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Root Cause Analysis Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Identify Failure Patterns": {
      "main": [
        [
          {
            "node": "Time-Align Events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Root Cause Analysis Agent": {
      "main": [
        [
          {
            "node": "Create Incident Ticket",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize and Denoise Logs": {
      "main": [
        [
          {
            "node": "Merge Context Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}