{
  "name": "Error handling: Send email via Gmail on execution or trigger-level errors",
  "nodes": [
    {
      "id": "e2fd6e88-ae06-48ea-a73f-8e523b747a33",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -40,
        180
      ]
    },
    {
      "id": "6b75ee9b-4540-4199-a393-c3e2583fd6bb",
      "name": "Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1360,
        160
      ]
    },
    {
      "id": "2a3fd36f-a04b-4b43-bc5a-ac9d18adea82",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        1160,
        160
      ]
    },
    {
      "id": "b93cf843-42a2-4f64-873a-afdef2451934",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        120,
        180
      ]
    },
    {
      "id": "5da22c60-fa54-4ddf-add8-f2b26610ef92",
      "name": "Constants",
      "type": "n8n-nodes-base.set",
      "position": [
        280,
        180
      ]
    },
    {
      "id": "a3e45087-e799-4b1b-b420-8d106bdd6daf",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        460,
        40
      ]
    },
    {
      "id": "249a330d-1e9f-412c-a067-c96fbbcd1e6f",
      "name": "HTML for Execution Error",
      "type": "n8n-nodes-base.html",
      "position": [
        660,
        -140
      ]
    },
    {
      "id": "cc9e2e40-7858-4d86-bfda-65b4ad9f6ada",
      "name": "HTML for Trigger Error",
      "type": "n8n-nodes-base.html",
      "position": [
        660,
        40
      ]
    },
    {
      "id": "865dc047-69fc-4409-888b-701468746945",
      "name": "KeepEitherOfHTMLs",
      "type": "n8n-nodes-base.merge",
      "position": [
        900,
        -40
      ]
    },
    {
      "id": "4d975de4-b458-43ac-9bfd-d6ab8205dc9a",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        100,
        480
      ]
    },
    {
      "id": "e85a2fd7-eaff-4390-93ed-27c038aab890",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -40
      ],
      "parameters": {
        "width": 220,
        "height": 380,
        "content": "## Config\n\nDefine\n- your n8n app base url\n- notifications recipient email \n- sender name"
      }
    },
    {
      "id": "efedfd1a-8e4f-44cb-aa0b-e10608f2328d",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        60,
        -1000
      ],
      "parameters": {
        "width": 1060,
        "height": 820,
        "content": "## Send email via Gmail on workflow error (execution and trigger-level errors)\n\nThis error handling workflow sends an email via Gmail on workflow errors with details.\n\nIt extends https://n8n.io/workfl"
      }
    },
    {
      "id": "98d42327-3d06-4fc0-a31c-64114ae5cfc2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1300,
        -40
      ],
      "parameters": {
        "width": null,
        "height": 380,
        "content": "## Gmail credentials\nSetup your Gmail account credentials here."
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "HTML for Execution Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "HTML for Trigger Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "Constants",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Constants": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          },
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "KeepEitherOfHTMLs": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML for Trigger Error": {
      "main": [
        [
          {
            "node": "KeepEitherOfHTMLs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "HTML for Execution Error": {
      "main": [
        [
          {
            "node": "KeepEitherOfHTMLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}