Modern Creator Network
Nate Herk | AI Automation · YouTube · 13:20

I Will Never Fix Another n8n Workflow (Claude Code)

A 13-minute live demo of a self-healing automation system that boots Claude Code when your n8n workflows break in production.

Posted
3 months ago
Duration
Format
Tutorial
educational
Channel
NH|
Nate Herk | AI Automation
§ 01 · The Hook

The bait, then the rug-pull.

Every automation builder knows the dread: a workflow that ran clean for two weeks suddenly errors at 2am over a missing comma. Nate Herk decided that was a problem Claude Code should own — and in 13 minutes he shows you exactly how he wired it up.

§ · Stated Promise

What the video promised.

stated at 00:18wouldn't it be really cool if you could have Claude Code automatically go fix those? So that's what I'm gonna show you guys today.delivered at 01:55
§ · Chapters

Where the time goes.

00:0001:55

01 · Demo 1: order pipeline self-heals

Live demo of a failing Order Processing Pipeline. Claude Code finds the upstream code node returned an array instead of individual items, rewrites it, and sends a ClickUp confirmation.

01:5503:18

02 · Architecture reveal

Error trigger to HTTP request to ngrok tunnel to local bridge server to Claude Code spawned in terminal. Raw terminal output shown so viewers see the full flow.

03:1805:37

03 · The grocery store vs. apartment metaphor

n8n is a public grocery store; Claude Code lives in a locked apartment. The bridge + ngrok gives n8n the address and the key to knock on Claude's door.

05:3707:06

04 · What Claude can and cannot fix

Fixable: logic errors, data-type mismatches, JSON typos, code node bugs. Not fixable: expired credentials, API outages, rate limits. A Google Doc slide enumerates the matrix.

07:0608:13

05 · Demo 2: email agent JSON schema fix

Invalid JSON in a structured output parser node. Claude repairs the schema and confirms success.

08:1309:43

06 · Demo 3: Tavily research form with injected quote

Deliberately broken JSON body (double-quote injected). Live terminal split-view. Claude patches the expression to sanitize input so future submissions cannot break it.

09:4311:16

07 · Demo 4: the unfixable case

Wrong API key (VAPI key in Tavily slot). Claude returns user action required with a step-by-step remediation message. Zero code changes made.

11:1612:18

08 · Run it 24/7 plus Claude Project context

Keep the bridge running all the time. Load it with Claude Project context about your business and workflows so fixes get smarter over time.

12:1813:20

09 · 18-page PDF guide plus AIS+ community CTA

PDF guide covers prereqs, architecture, ngrok, MCP setup. Free Skool community link. AIS+ paid community pitch (3,000+ members, weekly live Q&A).

§ · Storyboard

Visual structure at a glance.

hook — prior video callback
hookhook — prior video callback00:00
ClickUp: workflow fixed
proofClickUp: workflow fixed00:55
terminal output reveal
valueterminal output reveal01:55
grocery store metaphor slide
valuegrocery store metaphor slide03:18
architecture diagram
valuearchitecture diagram05:05
fix/no-fix Google Doc slide
valuefix/no-fix Google Doc slide05:59
bridge server waiting screen
valuebridge server waiting screen08:13
error handler workflow canvas
valueerror handler workflow canvas11:16
18-page PDF guide
cta18-page PDF guide12:18
AIS+ community screen
ctaAIS+ community screen12:50
§ · Frameworks

Named ideas worth stealing.

01:55model

Self-Healing n8n Architecture

  1. Error Trigger in n8n fires on any workflow failure
  2. HTTP node calls ngrok tunnel URL
  3. ngrok forwards to local bridge server
  4. Bridge server spawns Claude Code with the error payload
  5. Claude Code uses n8n MCP server to read and fix the workflow
  6. Claude notifies via ClickUp: fixed or user action required

Six-step pipeline that makes Claude Code the on-call engineer for your n8n stack.

Steal forAny agentic system where the AI needs to be reached by an external service that cannot directly talk to localhost
05:59list

Fix / No-Fix Taxonomy

  1. CAN FIX: logic errors, data-type mismatches, empty arrays, JSON expression typos, code node bugs
  2. CANNOT FIX: expired credentials, API outages, rate limits, IP blocks, external service changes

Claude Code operates on code and config — not on credentials or third-party uptime.

Steal forSetting honest expectations in any Claude-powered automation system
03:18concept

Grocery Store vs. Apartment Metaphor

n8n is a public grocery store (cloud-hosted, accessible to anyone). Claude Code is a locked apartment — n8n cannot visit unless you give it the address (ngrok URL) and a key (bridge server endpoint). Best teaching metaphor in the video for one-directional API access.

Steal forExplaining any NAT/firewall/localhost access problem to non-technical audiences
§ · Quotables

Lines you could clip.

03:18
N8n is like a grocery store. Anyone can go to it because everyone knows where it is. It's public. But n8n can't just go out and visit Claude Code because Claude Code lives in an apartment building in a specific unit and the door is locked.
Self-contained analogy, zero context needed, punchyTikTok hook
06:49
It's cool to Frankenstein our own solutions so that when the models get smarter and smarter, we're already there.
Quotable thesis on building with current-gen AI — forward-looking, energizingIG reel cold open
12:06
I literally started off my prompts to Claude Code with, hey, I've got this crazy idea. Yeah. Here it is.
Humanizes the build process; great for how I actually use Claude Code contentNewsletter pull-quote
§ · Pacing

How they spent the runtime.

Hook length18s
Info densityhigh
Filler8%
§ · Resources Mentioned

Things they pointed at.

04:13toolngrok
05:07tooln8n MCP server
05:37tooln8n skills pack
12:18product18-page Self-Healing n8n PDF guide
12:50productAIS+ community (AI Automation Society Plus)
§ · CTA Breakdown

How they asked for the click.

12:18product
I did compile an 18-page PDF guide on exactly how I did this… I'll drop this in my free Skool community which you guys can access for completely free.

Soft lead-in with free PDF, then upsell to paid AIS+ community. Well-sequenced: value delivered before the ask.

§ · The Script

Word for word.

analogy
00:00So last week, dropped this YouTube video where I showed you guys how you can use Cloud Code to build and and in workflows instantly. And after I posted that, I was thinking to myself, wouldn't it be really cool if you could have Cloud Code fix and optimize your workflows? So I tried it and it worked.
00:13But I wanted to take it one step further and think about when my workflows error, could I have Cloud Code automatically go fix those? So that's what I'm gonna show you guys today. So right here, I've got this workflow.
00:22It basically captures orders and it can either go this way or it can go this way. And I've put in here something that's gonna break the workflow. So I'm gonna go ahead and call it and show you guys what happens.
00:30So I just got a message in my click up that says, this workflow demo order processing pipeline had an error. The failed node was the validate each order node, so it was this one right here. And the error message was expected individual order items but received an array.
00:44Data must be split into individual items using a split out node before validation can process each line. So then what Claude did was it found the root cause, which was the enrich order data code node, so the one right before it, returned all orders as a single item which was an array. So the fix was it changed the code node to return each order as a separate item.
01:01So that's kinda cool because n n n itself suggested using a split out node, but Cloud Code realized that it's easier to actually just fix it by changing the code in this node itself. So then it basically says the fix was applied and the workflow should now be all set. So I'm gonna give this workflow a refresh.
01:16It probably didn't actually change anything physically that we could see, but this is the more updated version. So now what I'm gonna do is go to the executions. You You can see that this one was the most recent one we just ran, and it failed right there on the validate each order node.
01:28And what I did is I just triggered this workflow once again. So we should see a new execution pop up live. And now you can see this time it actually succeeded because what Cloud Code did was it went ahead and it fixed the workflow, and now everything flows all the way through.
01:42Alright. So that was a little demo to show you guys that this workflow just failed. I didn't touch it at all, and then Cloud Code fixed it and then sent me a message and said, hey.
01:49It failed, but I got you. So I'm sure you guys are wondering how this actually works behind the scenes, so let me show you. The way that we're doing this is we are using an error workflow.
01:58So as soon as that previous workflow fails at all, it triggers off this new one, which basically sends an HTTP request essentially to Cloud Code. So when you have a workflow in n n n in production, what you can do is in the settings, you can have an error workflow.
02:12So this basically means if this core workflow ever fails, you can trigger a different one so you can log the error, send yourself a message, or in our case, use Cloud Code to fix it. So So you can actually see right here in the nasty looking terminal. What happened was it said error received this workflow.
02:27I sends over the workflow ID. We got the failed node. We got the error, and then it says starting Claude code.
02:32Prompt saved. Starting Claude code. And And the Claude code is running locally, and it basically goes through its system prompt to understand, here's the workflow.
02:39Let me look it up. Let me get the data. Let me understand what went wrong.
02:42Let me understand all the nodes, all the workflow patterns, and all of the, you know, JSON expressions that I can use. And then I'm gonna go ahead and fix it. So I've now fixed the workflow, and I'm going to notify Nate in ClickUp as you can see right there.
02:54So you guys know that when I'm using Cloud Code, I'm gonna try my best to stay out of the terminal, but to the best of my knowledge, this is the way to do it right now because of the fact that we had to set up some, like, tunnels and stuff. Okay. So I know this is cool, but I'm gonna talk about how this could actually be practical, and we're gonna show off a few more examples.
03:09But first, I wanted to talk about, like, how this actually works because I know it's a little confusing. And before I actually built this, I was kinda confused about it too. So the first thing that's confusing is the fact that ClaudeCode can talk to NNN using the MCP server, and it can look at your workflows, fix them, change them, whatever you want.
03:25But NNN can't talk to Claude code, at least the way I'm doing it here where I have my NNN hosted on the cloud. So this is the best way to think about it. N n n is like a grocery store.
03:35Anyone can go to it because everyone knows where it is. It's public. It's on the cloud.
03:39So Cloud Code could easily walk over here to the grocery store and interact with n n n. But n NNN can't just go out and go visit Cloud Code because Cloud Code lives in an apartment building in a specific unit and the door is locked. So the only way that NNN could visit Cloud Code is if we give it permission to.
03:56If we give it the address, if we give it a key to the door. So that's kinda what we're doing and that's what we set up. So how do we actually do it?
04:02Well, let me just run you guys through a little story. So this is the workflow we just saw in N eight N. And what happens is something fails.
04:09And actually, I put an x over the wrong node. It was this one that failed. So this node fails.
04:15And so when that happens, that triggers our error workflow. As you guys saw, it triggers the error trigger, which calls this HTTP request.
04:23And this HTTP request is calling ngrok, which basically just helps you set up tunnels. So if you've never heard of a tunnel before or it's really confusing to you, I have made a video where I talk about how you can expose your local instance with a tunnel so you can do more things.
04:36I'll tag that video right up here. But anyways, ngroC sets up a tunnel and then feeds data through it, and that ends up going to essentially a terminal, which is where ClaudeCode lives locally on my computer, and it starts up ClaudeCode.
04:50Once it starts up ClaudeCode, Claude's able to see all of the, you know, error messages and the workflow that we need to fix, and then it gets to work actually fixing the workflow and not just, like, coming up with a plan to fix it, but actually implementing those changes in the workflow itself. And then the last piece is that it sends me a notification on ClickUp that you could change.
05:07You could also have it do a log on Google Sheets, an email, whatever you want. And the reason why it's able to so successfully do this is because we give Cloud Code access to the NN MCP server and the NNN skills. So I'm not gonna dive super deep into this.
05:21Basically, the MCP server gives Cloud Code access to tons of different documentation on how end to end nodes work, different workflow templates, different patterns, and access to your own end to end environment. And then the end to end skills are a set of Claude skills that give Claude access to information that it would need.
05:38So really good prompts about how to use expressions, how to validate things, node configuration, coding, workload patterns. So we're basically supercharging Claude code with information about n n n. I made, like I said, a full video diving into this and setting it all up.
05:50If you wanna check that out, I will tag that one right up here. That So brings me on to my next point, which is basically about workflows failing after they've been running successfully for a week or two. There's lots of different reasons that a workflow can fail.
06:01Unfortunately, Cloud Code cannot fix all of those reasons. So what Claude code can fix are issues with the maybe the logic, the code, the data.
06:10So missing data, no values, wrong data types, empty arrays, typos and expressions, code node bugs, things like that. What Claude code cannot fix are things like expired credentials, an API is down, your rate limited.
06:24I actually think that Claude code could figure that out because maybe it would be able to say, hey. This was a rate limit. Let me go ahead and add a loop and a wait node and, like, use my logic to actually get there.
06:33At least if it can't do it right now, it will be able to do that eventually because what it will do is it will reason, it will search through the API documentation, figure out what the rate limit actually is, and then build a fix for it. So this stuff definitely isn't perfect, but it's cool to see where we're going, and it's cool to experiment to see how we can Frankenstein our own solutions so that when the models get smarter and smarter, we're already there.
06:54But anyways, of course, there are certain things that Cloud Code cannot fix, but there are lots of things that Cloud Code can fix. So that's why getting a notification is cool because either way, if it runs into something like an expired API key, it will still let you know. So here's another example.
07:08We have an email agent. It's very, simple. And what happens is it wants to respond to emails, but we know that when we send an email with a Gmail node, we have a subject and a message.
07:17So what we do is we use a structured output parser to put those out into two different fields so that we can send it properly. And so we just did a run of this.
07:25You can see that it failed right here because the structured structured output parser was invalid. This, of course, triggered my error workflow, which looks like this. And then I get a message and click up that says, hey.
07:35The workflow has been fixed. The test form responder, email responder agent had an error in the structured output parser. It had invalid JSON in the actual schema, so I fixed it and now it should work.
07:46So like I said, this is the most recent run. You can see in here, this wasn't correct because we were missing commas. But now if I go to the current version that clogged code actually fixed and we just go ahead and run this workflow, we should see that it's able to use the structured output parser correctly now that Cloud Code has fixed it.
08:01Okay. Let me show you guys another cool example. We've got a super simple workflow here that takes a form submission, and then we're gonna go ahead and do research on Tablet.
08:07So we're gonna put in a topic, and this time I'm gonna let you guys see what actually happens in the terminal once this errors. Alright. So we've got the terminal up on the left and we've got the research form here.
08:17Now what I'm gonna do is I'm gonna send over you know, I want you to research bananas. What I'm gonna do is I'm gonna accidentally put a double quotes right there, which if you guys know, that's gonna break the JSON body. So I'm gonna go ahead and hit submit.
08:29We'll close out of this, and we can see instantly we already received an error. Error received workflow test JSON body, which is this one right here. We errored in TAVALISSE because the JSON parameter is not valid JSON.
08:41So what happened here is okay. Take two.
08:47Gonna do it again. So the terminal's up over here. You can see that it's waiting for n n n errors.
08:50I'm gonna shoot over Apple this time because it didn't really like banana. So submit this. We're gonna see that pretty much instantly we have Claude code getting started up over here.
08:59So prompt has been saved. We're starting Claude code. And now you can see in the error handling workflow, it's running right now.
09:05So it's running for thirty eight seconds. You can see that based on the error and based on what it needs to do, it can run for longer. But we're getting some content back right here.
09:13It looks like it's finished up. So the fix has been applied. The root cause was that the JSON body parameter in the TAVLISSE request node had an expression syntax which didn't work.
09:22So what it did is it went ahead and fixed that syntax so that that double quote in there wouldn't actually break requests in the future. So it's a really good guardrail that it baked in there. You can see in my click up, I have a notification.
09:33Once again, I have a link to view the workflow in NNN if I choose to. And now back in this workflow, even if I put in Apple with a double quote in the front, what we're gonna see is that we should get a successful run if I go to the executions, and we can see right here that we get no errors.
09:46Even though in the actual form, I submitted Apple with a double quote right there. Because what it did is it actually changed the JSON body. So instead of it looking, you know, the way that I had it structured, it basically wrapped all of this up, and now it made sure that when it comes through, it can actually be read by Tablet.
10:02So I wanted to end off with one example of what happens if Claude can't actually fix the workflow. So there are certain times when it can't. In this case, what I did is I switched the API key to be a VAPI API key, which is obviously not gonna work for Tablet.
10:14So I'm gonna show you the way that I've configured the Cloud Agent to notify me in a different way. So once again, we have the server right here, and you can see that it's waiting for any of the errors. I'm gonna go ahead and submit this form, and we are gonna get an error.
10:26Pretty much instantly, we get this notification in our terminal that Cloud Code is now working on it. So Cloud Code is finished. You can see that it says user action required, and we got a message in ClickUp.
10:35So I'll open that up, and now you can see it's a different type of message compared to when it would say that it was fixed. And this time it says user action required in this workflow. TAVALISSE had an authorization failed.
10:45Why Cloud Code couldn't fix it? Because it's authentication and that requires the human to take action. So it also says here's what you need to do now.
10:52You need to select an existing TAVALISSE credential and verify it's correct, or you can go ahead and create a new one and then paste in your API key. Save it, test the workflow. Once you've configured that valid Tableau credentials, the workflow should work on the next execution.
11:05And then it says no changes were made to this workflow because it really couldn't do anything to fix it. So hopefully, you guys can see by combining an error workflow with ClaudeCode with NDDMCP and NDDM skills, we were able to build this system where when your workflows fail, they automatically get fixed.
11:21They notify you. Or if ClaudeCode can't fix it, it tells you how you should go about fixing it. I think this is super cool because you could have obviously that bridge in the tunnel running all the time so that even if I'm not standing here watching it, if you're sleeping, if you're on vacation, every time a workflow fails, it can still do that for you.
11:37And because it's in Claude code in a Claude project, think about all the different context you could give it in there, about your business, about other documentation, about the workflows themselves, so you can really make these things better and better over time. So I know I didn't really show you guys exactly how I built this.
11:51Let me just tell you, I did it all using Cloud Code, using natural language, using plan mode, asking it questions, telling it what I wanted to do. I literally started off my prompts to Claude code with, hey, I've got this crazy idea. Yeah.
12:02Here it is. I'll actually show you guys. I said, I need your help with the crazy idea I have, and then I explained what I wanted to do.
12:07But anyways, I did compile an 18 page PDF guide on exactly how I did this. So I go over the prereqs, the architecture, installing Cloud Code, setting up the MCP server, all of this kind of stuff, talking about ngrok. The other good news is if you're running n n n locally, this is even easier because you don't have to configure that tunnel.
12:23But this should pretty much walk you through all of it. But like I said, you could give this to Claude code or you could just brainstorm with your own Claude code, and you should be able to get this set up in thirty minutes to an hour. Then obviously, it's all about testing it and going back and forth and refining it a little bit.
12:36So I'll drop this in my free school community, which you guys can access for completely free. As always, the link for this will be down in the description. And if you're interested in diving deeper with n to n, Cloud Code, and pretty much anything that's gonna be in the AI automation space, then definitely check out my plus group.
12:49We've got a great community of over 3,000 members who are building automations every day and building businesses with automations. So it's a really cool spot to be if that's kind of, you know, what you're looking to do. We've got a full classroom section that's always being worked on, and we're planning to bring a lot of new stuff with all of these changes in the space.
13:04We've got one live q and a every single week. So I'd love to see you guys in these communities in the live calls, but that's gonna do it for today. So if you enjoyed the video or you learned something new, please give it a like.
13:13It definitely helps me out a ton. And as always, I appreciate you guys making it to the end of the video. I'll see you on the next one.
13:18Thanks so much, everyone.
§ · For Joe

Build the bridge first.

Automation operator playbook

Any time Claude Code needs to be invoked by an external system, the pattern is always: tunnel plus listener plus spawn. Everything else is context.

  • The ngrok + bridge server pattern works for any local AI tool that needs to receive webhooks — not just Claude Code.
  • The grocery store / apartment metaphor is the cleanest teaching device for one-way API access. Steal it verbatim.
  • The fix/no-fix taxonomy is the responsible version of AI fixes everything — use it to scope agentic features honestly.
  • Nate built this entirely in Claude Code using plan mode and natural language. Build your own reference doc for every system you set up.
  • Load the bridge with Claude Project context: your workflow docs, business logic, node patterns. The fixes get smarter as the context grows.
§ · For You

What you can take from this right now.

If you run n8n automations

You do not have to babysit your workflows anymore — you can set up a system that fixes itself while you sleep.

  • If your n8n workflows run in production and you are tired of getting error emails, this architecture is worth setting up once.
  • Start with the free 18-page PDF guide (linked in description) — Nate says it covers everything from scratch.
  • You only need ngrok (free tier works), Claude Code, and the n8n MCP server to replicate the whole system.
  • Even when Claude cannot auto-fix an issue, it sends you a plain-English message telling you exactly what to do — that alone saves debugging time.
  • Join the free Skool community for the PDF and live Q&A access if you want to go deeper.
§ · Frame Gallery

Visual moments.