Skip to content
Get App

n8n Beginner Course (8/9) - Debugging

Final beginner n8n video on debugging workflows: using debug in editor, retry executions, edit output, and version history, with a worked example fixing a missing-ID webhook error.

Key Takeaways

  • Debug in editor lets you pin failed execution data into the canvas to test fixes against real inputs.
  • Retry and edit output are complementary tools for reprocessing failed executions, each with limits.
  • Robust workflows handle missing or invalid input explicitly, using conditional branches and Stop and Throw Error nodes.
  • Version history allows reverting to earlier workflow versions when changes introduce bugs.

What the video covers

  • Introduces debugging as fixing workflow errors so they don't recur, and explains why failures happen (misconfiguration, unavailable services, missing input data).
  • Explains that failed executions appear in the execution log and that workflows can fail silently without an error tag, which is why error handling matters.
  • Covers the 'debug in editor' feature, which pins data from a failed execution onto the canvas so it can be reused for testing fixes.
  • Notes that only one set of pinned data can exist per workflow, so multiple bugs must be handled one at a time.
  • Describes the retry feature for re-running failed executions with either the saved or original workflow, and its limitation of starting from the errored node.
  • Describes the edit output feature for manually altering a node's output, useful for testing webhooks without resending events, but not scalable.
  • Shows workflow version history as a way to inspect or revert to earlier saved versions of a workflow.
  • Walks through a Google Sheets lookup workflow that sends Slack messages, comparing a successful run against a failed run caused by a missing ID.
  • Fixes the bug by adding conditional branches that look up the user by ID or fall back to email, then uses a Stop and Throw Error node when neither is present.
  • Tests the fixed workflow against both the failed and successful executions to confirm the changes behave correctly.

Answers

Questions about this video

What does the 'debug in editor' feature do?

It copies the data from a failed execution into the current workflow canvas as pinned data. You can then use that data to test and fix the nodes that failed, much like pinning data in a webhook node.

When should you use the retry feature versus edit output?

Retry re-runs multiple failed executions, either with the saved or original workflow, but it starts from the errored node. Edit output manually changes a node's output and is best for quick fixes or testing webhooks, though it is not scalable for large backlogs.

How was the webhook missing-ID error fixed in the example?

A conditional check was added so that if an ID exists it is used for the lookup, otherwise the workflow checks for an email and looks up the user by that instead. If neither exists, a Stop and Throw Error node halts the execution with a clear message.

Full Transcript — Download SRT & Markdown

00:01
Speaker A
welcome to video number eight and our final video of the beginner course for nadn in this video we'll be covering how to debug workflows so in the previous video we talked about error handling how sometimes workflows when they are push
00:19
Speaker A
pushed to production when they are activated can encounter errors and debugging is the process of fixing those errors and making sure that they don't uh happen again so let's start by talking a little bit about what debugging is and why it's
00:37
Speaker A
an important skill uh to master so when workflows or rather when specific nodes within a workflow fail it can be for many different reasons they can be configured wrong the uh underlying service can be unavailable for example um if you are using Google
00:59
Speaker A
Sheets or slack you might get a 500 error meaning that the service is simply unavailable at the moment or problems can be related to input data so let's say you're receiving a web hook the web hook can be missing information causing
01:18
Speaker A
the workflow or one of the specific nodes to fail by default this stops the workflow from finishing its execution and it sets its status to f failed from the execution history or execution log we can find the list of
01:37
Speaker A
all of the workflow executions that failed and then debug them one by one to make sure the errors don't happen again it is important to note that sometimes a workflow can fail from an automation standpoint without necessarily being tagged as failed in
01:59
Speaker A
the sense that if you are trying to automate a certain task but no node had an error then sometimes the task will not be automated and the workflow won't be tagged as an error so this is why error handling is extremely important uh
02:17
Speaker A
to make sure that your workflows execute correctly and uh we'll be covering an example of this in just a minute the easiest way to debug bug your workflows is by using the debug in editor feature in nen um this is a super
02:36
Speaker A
powerful feature that lets you pin data from an execution history into the current canvas of the workflow what this does it is is it effectively copies over whatever data was in or whatever items were in the failed execution and pins them into your
03:02
Speaker A
current workflows editor so that then you can use this data to debug the same way that when we um used the pin feature in the web hook node uh a few videos ago this is the same thing it allows you to PIN error data to uh
03:23
Speaker A
your workflow canvas pin data will have a blue or purple symbol in the bottom right corner and workflows can only have one set of pinned data at a time so you have to work through uh different types of bugs
03:40
Speaker A
one by one uh making sure that um you are fixing them all and that by repairing some you aren't creating other bugs once the error is fixed or handled um we can use the retry feature to trigger again all of the failed
04:03
Speaker A
executions this is a super useful feature because when um a workflow fails we might have five or 10 executions that were unsuccessful and from the execution log you can decide whether you want to retry with currently saved workflow or with
04:24
Speaker A
the original workflow from the time of execution the retry is executed from the node with an error uh this means that if the error in your workflow comes from a wrongly configured node previous to the one with an error you will have to use
04:45
Speaker A
the copy to editor node to re-execute these because it only executes from the errored node another useful feature when debugging is the edit out output feature the edit output feature lets you manually edit the output for a specific
05:07
Speaker A
node while it come while it can come in handy when testing or debugging workflows um specifically if you're using web Hooks and you don't want to have to send uh many different kinds of tests events um without requiring you to
05:25
Speaker A
execute all of the past nodes and uh do all your Transformations on the data uh it should be used sparingly as it is not a very scalable method however in cases where retrying is not possible it can be
05:41
Speaker A
a quick way to fix a backlog of a few executions another very very useful feature when debugging is the workflow version history so when making updates to workflows error handling or debugging sometimes it happens we make mistakes and we can lose sight of where we
06:05
Speaker A
started from luckily we have the version workflow version history from here you can see all of the previous versions of a given workflow that were saved uh this can be useful if you need to revert some changes that
06:22
Speaker A
were made to a workflow that might be causing bugs or to inspect the structure of a previous workflow version of the workflow uh this can be combined nicely with the retry feature if you need to revert to a previous version and then
06:39
Speaker A
retry multiple executions with the currently saved version let's jump into nen and do two different examples of debugging a workflow so here we are in nen and uh we have this workflow that we're going to uh debug the first step of debugging any
07:02
Speaker A
workflow is well first of all understanding what the workflow is supposed to do when it executes properly so here we can see uh we have our execution logs we have a successful execution a failed execution but let's first look at the successful execution
07:20
Speaker A
to sort of figure out what the workflow does so here we can see we receive a web hook in the web hook we have an ID key with a specific identifier then we get the user so this is another function of the Google Sheets
07:39
Speaker A
we're going to be uh getting rows but specifically filtering on the ID column and we're going to be uh looking pretty much for the row with the specific ID uh this returns all of the row information uh all of the information
07:58
Speaker A
from the different columns in the sheet so we get an email first name last name and a company as well as the ID that was the same one as we filtered on and then we send a slack message with info for
08:13
Speaker A
the specific email their first name last name and Company now we can look into the failed execution here we can see uh quickly by looking uh we have an error error cannot read properties of undefined reading to string so clearly here it tried to read
08:36
Speaker A
the body. ID and in uh the web hook we can see that this web hook did not have an ID so what we're going to do is we're going to click debuging Editor to copy the data over and we're going to deal
08:52
Speaker A
with the different cases so first of all we could say we could add an if and make sure that we have a valid uh ID so here we want the json. body. ID this time to be to exist and if this is the
09:18
Speaker A
case then we can go up this path and get the user and send the slack message here there are multiple ways we could continue debuging message either we could say if we don't have an ID so here let me rename ID if we don't
09:39
Speaker A
have an ID we could for example send a slack message saying um web hook received did not have ID uh and that way we can look into it but we could also be a bit smarter here and see the goal of this workflow
09:59
Speaker A
is to look up a user in uh the specific database and here it's with the ID but we also saw by looking at the uh past execution that in the database we have an email so instead of looking up the ID
10:22
Speaker A
if we don't have an ID but we have an email we could try looking up using the email so going back to the editor we have the case with a valid ID then we could say we have the case
10:36
Speaker A
where we have an email and this would be json. body. email exists and then all we would have to do is do the same actions instead of looking up the ID we would be looking up the email json. body. email and then we would send
11:04
Speaker A
the same slack message with the information from uh the contact what we can do from here is then deal with the case where we have none of them this would be a great place to use the Stop and throw error um node
11:23
Speaker A
here and a little message no ID or email from here we have a fixed workflow so first of all we can verify that with this error data it still works so I can test the workflow and as we can see here
11:44
Speaker A
it didn't have an ID so it went down to the email field it had a valid email so it got the user and it sent the message in this specific case we wouldn't be able to retry this work flow
12:00
Speaker A
because we made we had to make the modifications before this um specific uh node another case I'd like to cover is this execution what we can see here is we received the web hook we tried to read the user
12:20
Speaker A
and nothing happened here no message was executed and what this is what I was mentioning earlier where sometimes a workflow can not fail but can also not be successful and this is a very good example of this so what happened here
12:38
Speaker A
well clearly we tried to look up someone with an ID that we can see here in the input data but no data was returned so something that we can do here is again this time it won't be debug in
12:56
Speaker A
editor but copy to editor because um it wasn't errored and what we can do this time is now deal with the case with this case so if we test the workflow we can see that the updates we made still work with this execution
13:17
Speaker A
except we're still not getting the output we wanted so here something we can do is in this get user um sheet by heading over to the parameters we can um set Sorry by heading over to the settings we can ask it to always output
13:36
Speaker A
data and this means that even if it doesn't find a contact here we'll have um here we'll have the information of an empty item from here before sending the slack message we can set an additional check so here we could say does the
14:00
Speaker A
contact have an email so this would be by reading the information we would have here in slack json.
14:13
Speaker A
email if we have an email exists then we send the slack message here we would have to do the same modifications so copy this put it here we also check and if we have a valid email we send the message in the cases where we
14:41
Speaker A
don't have a valid email and so there was the lookup was unsuccessful we could just uh drag a stop and throw error contact not found in database and this we can do it this way here we could sort of factor this a
15:05
Speaker A
little bit better seeing as all of these do the same thing we could just use a single if and a single throw error by attaching this one here this way we have debugged the workflow and whether if we can't find the user next
15:27
Speaker A
time we'll have an error someone can hop in and deal with the case where we don't have a user if this is usual then we handle the case differently if it's not usual we can figure out what's wrong thanks for listening to the eighth
15:43
Speaker A
and final video of the end beginner course where we looked into debugging workflows and fixing failed executions in the advanced course we'll be covering some much more advanced topics Advanced workflow building complex data flow those more advanced examples as well as
16:02
Speaker A
well as error handling and debugging thanks for your attention and for some of you see you in the advanced course
Topics:n8ndebuggingworkflow automationerror handlingexecution logretrypin datawebhookversion historyno-code automation

Get More with the SozAI App

Transcribe recordings, audio files, and YouTube videos — with AI summaries and speaker detection. 30 minutes free.

Or transcribe another YouTube video here →