{
  "name": "M18 - Central Error Handler",
  "nodes": [
    {
      "id": "a74cf204-5a80-481f-ae2c-848b1947e820",
      "parameters": {},
      "name": "On Workflow Error",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ]
    },
    {
      "id": "79d0c789-e960-48c9-aad0-5d6d985f6e3e",
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "name": "alert_summary",
              "value": "={{ \"[تنبيه عطل تدريبي] السير: \" + ($json.workflow?.name ?? \"غير معروف\") + \" | التنفيذ: #\" + ($json.execution?.id ?? \"N/A\") + \" | العقدة: \" + ($json.execution?.lastNodeExecuted ?? \"Trigger\") + \" | افحص عدم تكرار السجل قبل الإعادة.\" }}",
              "type": "string"
            }
          ]
        }
      },
      "name": "Format Safe Diagnostic Alert",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        500,
        300
      ]
    }
  ],
  "connections": {
    "On Workflow Error": {
      "main": [
        [
          {
            "node": "Format Safe Diagnostic Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "source": "n8n-learning-hub"
  }
}