{
  "name": "Monitor workflow errors via n8n API with Gemini analysis and Telegram alerts",
  "nodes": [
    {
      "id": "5354e780-a6cb-4ca9-8e87-b8ef4aafc2a9",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "6cc196e2-ad87-4442-b378-35cfa7fcd3d5",
      "name": "Set Context",
      "type": "n8n-nodes-base.set",
      "position": [
        240,
        0
      ]
    },
    {
      "id": "5c2dc61b-77ca-44a8-9779-18643d20444e",
      "name": "Get Workflow Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        544,
        0
      ]
    },
    {
      "id": "fe97c17b-ded9-4817-bae3-6a4da55ac3c2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        784,
        0
      ]
    },
    {
      "id": "9bc878d7-29c1-4683-9499-d85e17955278",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        704,
        240
      ]
    },
    {
      "id": "b2e47b17-01fb-496c-8a97-68bb51650d70",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        944,
        240
      ]
    },
    {
      "id": "4e20e15b-d178-4de7-b6dc-6ed91a8d0286",
      "name": "Send Telegram Notification",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1168,
        0
      ]
    },
    {
      "id": "3e789f7e-509d-4774-a976-4c1f6bd55176",
      "name": "Main Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -608,
        -448
      ],
      "parameters": {
        "width": 560,
        "height": 912,
        "content": "## AI-Powered n8n Error Monitor\n\nThis workflow **automatically catches errors** from any other n8n workflow, analyzes them with **Google Gemini AI**, and sends a structured diagnostic report to your *"
      }
    },
    {
      "id": "b8fd3456-51d8-41f2-80f4-1ae54c6f0e55",
      "name": "Warning Set Context",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -256
      ],
      "parameters": {
        "width": 340,
        "height": 416,
        "content": "## ⚠️ Edit this node!\n\nUpdate these **3 fields** only:\n- `n8n_instance_url` — your n8n public URL\n- `n8n_api_key` — from n8n → Settings → API\n- `telegram_chat_id` — your Telegram chat/user ID\n\nAll oth"
      }
    },
    {
      "id": "fc67cd95-f98c-4f15-9bd7-c0ec66858d30",
      "name": "Author Message",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1328,
        -192
      ],
      "parameters": {
        "width": 560,
        "height": 360,
        "content": "## Author Message\n\nHi! I am **Nguyen Thieu Toan (Jay Nguyen)** — a Verified n8n Creator. Thank you for using this template!\n\nThis workflow is shared with you for free. If it brings value to your work,"
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Send Telegram Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Context": {
      "main": [
        [
          {
            "node": "Get Workflow Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Set Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Workflow Content": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}