/n8n-tutorials

How to debug workflows in n8n?

Learn clear steps to debug n8n workflows effectively, fix errors fast, and optimize automations with practical troubleshooting tips.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web app? RapidDev builds application with your growth in mind.

Book a free consultation

How to debug workflows in n8n?

A reliable way to debug workflows in n8n is to run the workflow in the Editor UI, activate Manual Execution, inspect every node’s Input and Output data, and use Execution Logs to review what happened. The key is to look at the data flowing between nodes and isolate where it changes in an unexpected way. You can also use Error Workflow, Debug nodes like Set/Function, and the Execution Preview to trace values. n8n debugging is really about watching the JSON move step‑by‑step.

 

The Core Things to Do When Debugging in n8n

 

To debug in n8n, you want to slow things down and look at the actual data that each node receives and sends forward. n8n executions are just a chain of nodes passing JSON. Problems usually come from wrong assumptions about that data, missing fields, incorrect expressions, or API responses not matching what you expected. The tools below are how you uncover that.

  • Use Manual Execution: It lets you run the workflow step‑by‑step inside the Editor so you can inspect each node.
  • Check Node Input/Output: Every node shows exactly what data it received and what it produced. This is the single most important debugging technique.
  • Use the Execution Logs: These show past runs, including errors, raw responses, and stack traces for Function nodes.
  • Inspect Fehler Screens: When a node errors, n8n shows the message, the payload, and often the failed HTTP response.
  • Use Expressions Panel: Hovering over an expression shows the resolved value, which helps catch undefined or wrong paths.
  • Log inside Function nodes: Using console.log sends output to the execution data so you can see it later.
  • Add a temporary Set node to snapshot data at specific points.
  • Configure an Error Workflow to capture errors and notify you with full execution details.

 

How to Debug Step-by-Step

 

Here’s the practical approach I use in production when debugging a workflow.

  • Start with Manual Execution. This mode shows live node‑by‑node output. Great for testing triggers that accept manual data (like Webhook with Test URL).
  • Trigger the workflow with real sample data. If it's a Webhook trigger, send a real request using a tool like Postman or curl to the Test URL. This gives you the exact JSON shape you're working with.
  • Check each node’s Incoming Data panel. This is often where the “aha” moment happens—maybe the field you thought was data.id is actually payload.user.id.
  • Hover over all expressions. In n8n, an expression like {{$json["email"]}} might resolve to undefined and you won’t know unless you hover. That’s how you see what the workflow actually sees.
  • Temporarily insert Set nodes. Example: if you're not sure what an API returned, drop a Set node after the HTTP Request node and map {{$json}} into a property called debug. This helps expose nested objects.
  • Use Function nodes to log. For example:
// Use console.log() to inspect deep structures
console.log($json);  

return items; 
  • This log appears in the Execution page under the Function node, which helps understand what's going on.
  • Check Execution Logs. For long‑running or production workflows, look at “Executions” in the left sidebar. Each run shows the full history, inputs, outputs, retries, and timestamps.
  • If a workflow fails silently, make sure Save Data > On Error is enabled in Settings so you can inspect partial runs.

 

Debugging HTTP/API Calls

 

API calls are the most common source of errors, so here’s how to debug them properly.

  • Look at the Raw Response tab in the HTTP Request node. This shows the real body the API returned.
  • Check the Status Code. A 400/401/403/500 always gives clues.
  • Disable "Simplify Response" temporarily to see the full structure with headers and body.
  • Validate request data by checking the node's "Request" tab—headers, payload, URL, etc.

 

Debugging Expressions

 

Most expression problems in n8n come from referencing the wrong path. Use the Expression Editor to preview values, and rely on the Autocomplete list on the right side. When in doubt, print the whole object with a Function node and inspect it.

 

Using Error Workflows

 

If you're debugging something that only breaks in production, you can attach an Error Trigger workflow. When the main workflow fails, n8n starts the error workflow and passes:

  • $json containing error details
  • Execution ID
  • Stack trace (if applicable)
  • Failed node name

This is extremely useful when workflows run at night, when rate limits hit, or when webhook payloads change.

 

When Debugging Becomes Architecture Work

 

Sometimes the root cause is not a node bug but workflow design: too many items, long loops, or API rate limits. If a workflow keeps breaking in later nodes, consider splitting it into sub‑workflows, adding rate limits, or using queues.

 

The main idea: debugging in n8n means inspecting data at every step, confirming assumptions, and using the tools n8n gives you: Manual Execution, Node I/O, Expression previews, logs, and error workflows. Once you get used to watching the JSON flow through, debugging becomes fast and predictable.

Want to explore opportunities to work with us?

Connect with our team to unlock the full potential of no-code solutions with a no-commitment consultation!

Book a Free Consultation

Client trust and success are our top priorities

When it comes to serving you, we sweat the little things. That’s why our work makes a big impact.

Rapid Dev was an exceptional project management organization and the best development collaborators I've had the pleasure of working with. They do complex work on extremely fast timelines and effectively manage the testing and pre-launch process to deliver the best possible product. I'm extremely impressed with their execution ability.

CPO, Praction - Arkady Sokolov

May 2, 2023

Working with Matt was comparable to having another co-founder on the team, but without the commitment or cost. He has a strategic mindset and willing to change the scope of the project in real time based on the needs of the client. A true strategic thought partner!

Co-Founder, Arc - Donald Muir

Dec 27, 2022

Rapid Dev are 10/10, excellent communicators - the best I've ever encountered in the tech dev space. They always go the extra mile, they genuinely care, they respond quickly, they're flexible, adaptable and their enthusiasm is amazing.

Co-CEO, Grantify - Mat Westergreen-Thorne

Oct 15, 2022

Rapid Dev is an excellent developer for no-code and low-code solutions.
We’ve had great success since launching the platform in November 2023. In a few months, we’ve gained over 1,000 new active users. We’ve also secured several dozen bookings on the platform and seen about 70% new user month-over-month growth since the launch.

Co-Founder, Church Real Estate Marketplace - Emmanuel Brown

May 1, 2024 

Matt’s dedication to executing our vision and his commitment to the project deadline were impressive. 
This was such a specific project, and Matt really delivered. We worked with a really fast turnaround, and he always delivered. The site was a perfect prop for us!

Production Manager, Media Production Company - Samantha Fekete

Sep 23, 2022