{
  "name": "AUT-204 هشدار شکست ورک‌فلو (Error Workflow)",
  "nodes": [
    {
      "parameters": {
        "content": "## Error Workflow\nهر ورک‌فلویی که در تنظیماتش این را «Error workflow» گذاشته، هنگام شکست در اجرای خودکار این را صدا می‌زند.\nفقط نام، گره، پیام خطا و شناسه اجرا؛ بدون داده مشتری.",
        "height": 190,
        "width": 420,
        "color": 4
      },
      "id": "06f67554-a272-5b21-9e7f-2ed1570b14e9",
      "name": "یادداشت 1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -40,
        -300
      ]
    },
    {
      "parameters": {},
      "id": "f98e7478-30e4-52a8-9f5a-7a958ed0b54d",
      "name": "هنگام شکست",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        100
      ]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "http://127.0.0.1:8787/botDEMO/sendMessage",
        "options": {},
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ chat_id: 'ops', text: '🔴 شکست: ' + $json.workflow.name + ' | گره: ' + ($json.execution.lastNodeExecuted || '-') + ' | خطا: ' + ($json.execution.error?.message || '-') + ' | اجرا: ' + ($json.execution.id || '-') + ' | حالت: ' + ($json.execution.mode || '-') }) }}"
      },
      "id": "71b38ef6-2357-55c4-9127-40689a17e52d",
      "name": "هشدار به کانال عملیات",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        100
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 5000
    }
  ],
  "connections": {
    "هنگام شکست": {
      "main": [
        [
          {
            "node": "هشدار به کانال عملیات",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "LkyA204ErrAlrt01",
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "lookiyar-academy-demo"
  },
  "tags": [
    {
      "name": "loOkiYar Academy"
    },
    {
      "name": "AUT-204"
    }
  ],
  "pinData": {}
}