{
  "name": "_ERROR-HANDLER",
  "nodes": [
    {
      "parameters": {},
      "id": "err-trigger",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "resource": "message",
        "operation": "send",
        "sendTo": "fabien@fabien-massavie.com",
        "subject": "=⚠️ n8n — Erreur sur « {{ $json.workflow.name }} »",
        "emailType": "html",
        "message": "=<h2 style=\"color:#D70459\">Erreur n8n</h2><p><b>Workflow :</b> {{ $json.workflow.name }}</p><p><b>Nœud en erreur :</b> {{ $json.execution.lastNodeExecuted }}</p><p><b>Message :</b> {{ $json.execution.error.message }}</p><p><b>Exécution :</b> <a href=\"{{ $json.execution.url }}\">Ouvrir dans n8n</a></p><p style=\"color:#888\">Heure : {{ $now.format('dd/MM/yyyy HH:mm') }}</p>",
        "options": {}
      },
      "id": "err-gmail",
      "name": "Alerte Gmail Fabien",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        260,
        0
      ],
      "retryOnFail": true,
      "maxTries": 3,
      "waitBetweenTries": 2000
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Alerte Gmail Fabien",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false
}