This error debugging workflow has saved me many hours
Sharing is caring. This is a very simple workflow that reports errors to you, AND tells you what to fix. It has saved me many hours trying to figure out what was wrong. It uses n8n itself to debug your workflows. It costs nothing, and will point you to the exact problem with your workflows. Simply replace your n8n key and your ‘send from’ email, and you’ll get immediate notification when a workflow fails, a detailed description, and suggestions of exactly how to fix it. After setup, just go to the “Settings” in each workflow and under errors, select this workflow. Whenever/if it fails, this workflow will be triggered. Here is an example of the email you receive, with a link directly to the execution that failed. Hello, there has been an error in a workflow. Please check below for details: Direct Link To Affected Execution: https://xxxxxxxxxxxxxxxxxxxxxxxxx Name Of Affected Node: Clean up email Type Of Affected Node: n8n-nodes-base.set Error Message: Node 'Get Call Data' hasn't been executed 🤖 AI Debugging Assistant Analysis: Root Cause Analysis: The error "Node 'Get Call Data' hasn't been executed" occurs because of a logical branching issue in the workflow. The Check for CallID (IF node) creates two distinct execution paths. True Path: If a callId exists, the workflow proceeds to the Get Call Data (HTTP Request) node to fetch additional information. False Path: If a callId does not exist, the workflow bypasses Get Call Data and connects directly to the failed node, Clean up email. The Clean up email (Set node) contains an expression for the phone field that explicitly tries to access data from the Get Call Data node: $('Get Call Data').item.json.customer.number. When the workflow takes the "False Path" (because there is no callId), the Get Call Data node is skipped. Consequently, when the Clean up email node tries to execute its phone expression, it fails because Get Call Data has no output data, leading to the reported error.