{
  "name": "Analyze failed workflows with Claude via OpenRouter and log to Sheets with Slack, Email, Discord alerts",
  "nodes": [
    {
      "id": "fde4bf6f-40b6-473e-9d67-38b2906e2381",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        880,
        640
      ]
    },
    {
      "id": "29d27254-f33a-404e-bd17-c8186cd1a21d",
      "name": "Generate Error Signature",
      "type": "n8n-nodes-base.code",
      "position": [
        2128,
        640
      ]
    },
    {
      "id": "2bd5467f-178c-4c0b-97ba-0d9636adbf57",
      "name": "Check Alert Fatigue",
      "type": "n8n-nodes-base.code",
      "position": [
        2800,
        640
      ]
    },
    {
      "id": "1632fea4-ba7f-4b0d-ac19-3ec2bb7c6d03",
      "name": "Prepare Log Record",
      "type": "n8n-nodes-base.set",
      "position": [
        2352,
        640
      ]
    },
    {
      "id": "3ef615f5-885c-477c-82df-17b287ea2183",
      "name": "Extract AI Confidence",
      "type": "n8n-nodes-base.code",
      "position": [
        1904,
        640
      ]
    },
    {
      "id": "84fd0d60-d271-4ec3-9961-e4727fe8a06c",
      "name": "Normalize Error Payload1",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        640
      ]
    },
    {
      "id": "e56d7473-23d8-4755-a7ae-452c8387c36f",
      "name": "AI Error Analysis1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1552,
        640
      ]
    },
    {
      "id": "e4e51024-1629-43df-a2c9-c98607990e42",
      "name": "Send Email1",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3024,
        640
      ]
    },
    {
      "id": "d018b3ff-2296-40b0-a3d1-3f49820bd644",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1632,
        864
      ]
    },
    {
      "id": "0e0bba81-2708-490c-b518-e0825175b0cc",
      "name": "Log to Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2576,
        640
      ]
    },
    {
      "id": "df5c4a8a-6517-4d0b-bc94-a87f607b5904",
      "name": "Send Slack Message1",
      "type": "n8n-nodes-base.slack",
      "position": [
        3248,
        448
      ]
    },
    {
      "id": "f022b0c6-9d5f-4587-bd33-e56fd3629ab8",
      "name": "Send Discord Message1",
      "type": "n8n-nodes-base.discord",
      "position": [
        3248,
        640
      ]
    },
    {
      "id": "4bd4bb7d-2b51-471b-864a-ece92c884b48",
      "name": "Webhook Notification1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3248,
        832
      ]
    },
    {
      "id": "e72f26c2-7cd2-4614-b168-55c42dafa01e",
      "name": "Prepare AI Context1",
      "type": "n8n-nodes-base.code",
      "position": [
        1328,
        640
      ]
    },
    {
      "id": "0b436351-63d9-451f-ab6e-51cbbf7fbac0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        896,
        -64
      ],
      "parameters": {
        "width": 832,
        "height": 592,
        "content": "#  Analyze failed n8n workflows with AI and send Slack, Email, or Discord alerts\n\n## How it works\n\nThis workflow automatically runs whenever an n8n workflow fails.\nIt captures the error details, sends"
      }
    },
    {
      "id": "467757b2-227e-4106-a40a-d10f46de4b47",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        -64
      ],
      "parameters": {
        "width": 624,
        "height": 400,
        "content": "## 🔐 Credentials Required\n\nThis workflow uses:\n- **OpenRouter API** — for AI root-cause analysis  \n- **Google Sheets** — for centralized error logging  \n- **Slack / Discord / Email credentials** — for"
      }
    }
  ],
  "connections": {
    "Send Email1": {
      "main": [
        [
          {
            "node": "Send Slack Message1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Discord Message1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Webhook Notification1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Normalize Error Payload1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Error Analysis1": {
      "main": [
        [
          {
            "node": "Extract AI Confidence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Log Record": {
      "main": [
        [
          {
            "node": "Log to Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Alert Fatigue": {
      "main": [
        [
          {
            "node": "Send Email1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Context1": {
      "main": [
        [
          {
            "node": "AI Error Analysis1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract AI Confidence": {
      "main": [
        [
          {
            "node": "Generate Error Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log to Google Sheets1": {
      "main": [
        [
          {
            "node": "Check Alert Fatigue",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Error Analysis1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Error Signature": {
      "main": [
        [
          {
            "node": "Prepare Log Record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Error Payload1": {
      "main": [
        [
          {
            "node": "Prepare AI Context1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}