{
  "name": "Automated error handling with email alerts & smart workflow deactivation",
  "nodes": [
    {
      "id": "599904c4-179d-49e6-8c91-71d144bcaa57",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        96,
        48
      ]
    },
    {
      "id": "a6cc7c05-0705-44ca-8e8e-458547c35884",
      "name": "Point Out Message & Node",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        48
      ]
    },
    {
      "id": "13dd8e72-8262-4bf5-9ce2-fd495ae23f85",
      "name": "Send Email & Wait for Response",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        496,
        48
      ]
    },
    {
      "id": "86662502-53c7-490e-b1df-3ba15b7ede4a",
      "name": "Deactivate Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        896,
        -48
      ]
    },
    {
      "id": "2c29502d-7d5f-43f0-a25e-a039445d0e2c",
      "name": "If User Deactivates",
      "type": "n8n-nodes-base.if",
      "position": [
        688,
        48
      ]
    },
    {
      "id": "2f9d63f8-92c5-4990-815a-03a360148d54",
      "name": "Send Deactivation Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1104,
        -48
      ]
    },
    {
      "id": "07bd009f-0c3c-4ed3-8a97-2b343a91868b",
      "name": "User Ignored",
      "type": "n8n-nodes-base.noOp",
      "position": [
        896,
        144
      ]
    },
    {
      "id": "53f516d2-e1af-42e2-a56c-d9c2db6b647d",
      "name": "Inform User & Wait for Response",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        192,
        544
      ]
    },
    {
      "id": "5228cea7-c7c1-4c2e-96d9-b0787d81ccbf",
      "name": "Error Message & Node",
      "type": "n8n-nodes-base.set",
      "position": [
        -16,
        544
      ]
    },
    {
      "id": "5d43f3b5-61ff-4b09-bdee-ee2b068f39b0",
      "name": "User Deactivates",
      "type": "n8n-nodes-base.if",
      "position": [
        384,
        544
      ]
    },
    {
      "id": "5ec16de8-63d9-40f7-a429-b46154f4e6a7",
      "name": "Deactivate n8n Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        592,
        448
      ]
    },
    {
      "id": "d86ca663-d34a-4e62-8151-f25e4cfad234",
      "name": "Send Deactivated Email",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        800,
        448
      ]
    },
    {
      "id": "64e9a5c9-2a97-4f06-97f2-032eb9694d77",
      "name": "Reroute Error Message",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        592,
        656
      ]
    },
    {
      "id": "e08065f3-eee3-48cc-919a-b5f1c1d406a8",
      "name": "Second User Deactivates",
      "type": "n8n-nodes-base.if",
      "position": [
        800,
        656
      ]
    },
    {
      "id": "55cb8ece-42b1-4565-a3c9-2740f4933df3",
      "name": "Deactivate N8N Workflow",
      "type": "n8n-nodes-base.n8n",
      "position": [
        1040,
        544
      ]
    },
    {
      "id": "cdf9f7d2-77da-45df-b36e-e5d588ce8a84",
      "name": "Second User Ignored",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1040,
        752
      ]
    },
    {
      "id": "d05442b8-a053-4630-a90b-5daae73d89f9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -176
      ],
      "parameters": {
        "width": 1520,
        "height": 544,
        "content": "# Basic Template"
      }
    },
    {
      "id": "2d56d1f4-1edd-40b9-aec6-385437f0c5f5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        384
      ],
      "parameters": {
        "width": 1520,
        "height": 528,
        "content": "# Second Template - Reroute Logic"
      }
    },
    {
      "id": "0f949097-a003-4599-881e-ef798cd04055",
      "name": "Send Deactivation Message",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1232,
        544
      ]
    },
    {
      "id": "9f6bbbd0-6e72-4f70-b091-ba5e819cd8af",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -176
      ],
      "parameters": {
        "width": 464,
        "height": 1696,
        "content": "# Start Using This Workflow\n\n\n\n\n\n\n"
      }
    },
    {
      "id": "f7de07d8-7f13-454d-a514-28e852b478a7",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        928
      ],
      "parameters": {
        "width": 1520,
        "height": 592,
        "content": "# CREDENTIALS"
      }
    },
    {
      "id": "e8c8a135-d020-4d19-abbe-e2445cf9a344",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        1008
      ],
      "parameters": {
        "width": 480,
        "height": 480,
        "content": "## SMTP Email Setup\n\n### Gmail (Recommended)\n1. **Get App Password**: Google Account → Security → 2-Step Verification → App passwords\n   - Create one named \"n8n\" and save the 16-character password\n2. "
      }
    },
    {
      "id": "4c54d02d-128b-4769-980b-d9ea676779ab",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        1008
      ],
      "parameters": {
        "width": 480,
        "height": 480,
        "content": "## n8n API Setup\n\n1. **Create Token**: Settings → Personal API tokens → Create API token\n   - Name it \"Error Handler\" and **copy the token immediately**\n2. **Add Credential**: Settings → Credentials →"
      }
    },
    {
      "id": "0b9b7a2a-02fb-411b-9184-f695a9c6d27c",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        944,
        1008
      ],
      "parameters": {
        "width": 464,
        "height": 480,
        "content": "## Quick Test\nSend yourself a test email using an Email Send node to verify SMTP works, then test the n8n API by listing your workflows.\n\n## Common Issues\n- **Gmail not working?** Use App Password, no"
      }
    },
    {
      "id": "3b74a6cd-f618-4e53-a310-511a1d59bc37",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -96
      ],
      "parameters": {
        "width": 432,
        "height": 288,
        "content": "## Choose Your Template\nThe workflow includes two options:\n- **Basic Template (Top)**: Simple Deactivate/Ignore choice via email\n- **Advanced Template (Bottom)**: Adds rerouting to another person + cu"
      }
    },
    {
      "id": "924a90d1-b86e-4890-92f1-69cf9c973bbd",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        208
      ],
      "parameters": {
        "width": 432,
        "height": 272,
        "content": "## Connect to Your Target Workflow\n1. **Import this error handler** into your n8n instance\n2. **Open your main workflow** (the one that might fail)\n3. **Add Error Trigger connection**: \n   - Go to wor"
      }
    },
    {
      "id": "a958f2cf-e7d3-45da-9e34-194854215afd",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        496
      ],
      "parameters": {
        "width": 432,
        "height": 352,
        "content": "## Activate and Test\n1. **Activate your main workflow with a temporary cron trigger**\n2. **Create a test failure** in your main workflow:\n   - Add a temporary HTTP node with invalid URL like `https://"
      }
    },
    {
      "id": "937a74ca-c5da-4301-9423-a1d2ce714540",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        864
      ],
      "parameters": {
        "width": 432,
        "height": 320,
        "content": "## What Happens When Errors Occur\n1. Your main workflow fails → Error handler automatically runs\n2. You get an email with error details and response options\n3. **If you choose \"Deactivate\"**: Workflow"
      }
    },
    {
      "id": "f47e91a4-547b-408a-ac0b-6b20807a4910",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        1200
      ],
      "parameters": {
        "width": 432,
        "height": 288,
        "content": "## Pro Tips\n- **Test with non-critical workflows first** to get familiar with the process\n- **Set up email filters** to ensure error notifications don't go to spam\n- **Use the rerouting feature** for "
      }
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Point Out Message & Node",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Deactivates": {
      "main": [
        [
          {
            "node": "Deactivate n8n Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reroute Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate Workflow": {
      "main": [
        [
          {
            "node": "Send Deactivation Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If User Deactivates": {
      "main": [
        [
          {
            "node": "Deactivate Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "User Ignored",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Message & Node": {
      "main": [
        [
          {
            "node": "Inform User & Wait for Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Reroute Error Message": {
      "main": [
        [
          {
            "node": "Second User Deactivates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate N8N Workflow": {
      "main": [
        [
          {
            "node": "Send Deactivation Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deactivate n8n Workflow": {
      "main": [
        [
          {
            "node": "Send Deactivated Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Second User Deactivates": {
      "main": [
        [
          {
            "node": "Deactivate N8N Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Second User Ignored",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Point Out Message & Node": {
      "main": [
        [
          {
            "node": "Send Email & Wait for Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email & Wait for Response": {
      "main": [
        [
          {
            "node": "If User Deactivates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Inform User & Wait for Response": {
      "main": [
        [
          {
            "node": "User Deactivates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}