Transcription
Today I'm going to show you a cool ninja trick that will allow you to clone any N8N workflow that you see within a matter of minutes. So if you ever seen a cool, complex, nerdy YouTube tutorial on N8N and you don't want to spend hours recreating that workflow, this is a tutorial that you will need to watch.
All right. So because N8N is written in JSON code, what we're doing is reverse engineering all of the nodes that is in that workflow and we can do use AI to do it and get AI to write that JSON code and all we need to do then is to import that JSON code into NAN and we have the entire workflow completed within seconds. And now if this sounds like mumble jumble to you, don't worry. watch this entire video and I promise you it's so much easier than you think.
Now, the two tools that we're going to use to complete this tutorial is Google AI Studios and you also need Claude AI and don't worry, you don't need to be on the paid plan in order to do this. You can do everything that I'm doing here on the free plan as well.
Now, so I'm in Google AI Studios here and as you can see, we can select our model here. Now, it's very important that you are on uh Gemini 2.5 Pro or higher. So, in the prompt section, here is the prompt that we want to put in. All right. I need you to act as an N8N workflow analysis and prompt generation expert. Here is the YouTube video URL. Feel free to replace this with a blog URL or a video URL from somewhere outside of YouTube. I actually found this YouTube video from Nate on how to build a WhatsApp agent on NAN. So, what I'm going to do is just copy over this URL and paste it right here. And then below here is the prompt that I would tell Google AI Studio exactly what to do. I'll also include a copy of this prompt below as well. I told it that its task is to analyze this video, understand the N8N workflow that's being built, and then here is all of the elements that I wanted to extract, including the workflow overview, all of the nodes, the node configurations, the API endpoints, authentication, and data transformations. And then the output is basically a written document of like what nodes are being used and where they are being used. And then after I have put in this prompt again just copy and paste over this prompt and then copy and paste over the URL that you want to uh extract the NAT template from and then Google AI studio will now go to work and actually write out a workflow summary of the workflow that we are seeing here.
Okay. So, now that we have the workflow summary created by Google AI Studios, we actually want to turn all of this into JSON code and we're going to use Claude AI to do so. So, to do that, we just go to claude.ai and create an account. By the way, I'm on a free account now, so you can absolutely do this for free. And then what we want to do is to upload the N8N documentation to Claude so that it knows how to write the JSON code associated with N8N. And so we're just going to press the plus button here, upload a file, and we want to upload the compiled N8N documentation. I will also include a link to this documentation below as well. Basically, it's 50 to 70 pages or so of documentation that will go over how these N8 agents and automations are built so that Claude has all of the instructions that it needs. And now what I'm going to do is put in my prompt and the workflow summary so that Claude knows which workflow to create the JSON code for. Okay, here's the prompt that I put in. you are an NANE workflow builder using the provided NAT documentation agent JSON example. We're going to put this in in a second. Workflow speculation. What I want you to do is build an N8 workflow that matches the video demonstration exactly include all of the node configurations, has proper error handling, and is formatted as JSON. Okay. All right. So, then I put in here's the workflow summary. This is where we're going to go back to uh Google AI Studio and copy the whole workflow summary here. And then we're going to put this into Claude here. And lastly, I will attach an N8 AI agent example so that uh Claude will know what the JSON code should look like. And then just like this, I will press uh continue here. And as we can see here, Claude is actually going to go ahead and actually write the JSON code for us on the right hand side of the screen here. And once it's finished, all we're going to do is press the down arrow here and download as JSON. So, we're going to give it a few more seconds here until this entire code finishes.
Okay. And by the way, if you notice anything wrong with the workflow summary in Google AI Studio, you can reprompt it here. tell Google AI Studio where it went wrong and then it will rewrite the workflow summary here for you. All right, it's been a few seconds and we can see that Claude has finished writing all of the JSON code for us here. So, we're going to just download the entire JSON code here.
Okay, so now that Claude has finished writing our code, and by the way, same as what I said for Google AI Studios, if you notice anything that's written wrong here, just chat with Claude to tell it exactly what it needs to fix. And as you can see this basically describes in code exactly what we want to build what the node is which node does this one follow what's the logic between the nodes etc right so this is the code that the computers can understand uh whereas the visual diagrams that we see on platforms like zapier nent make is what we can understand okay and so basically all we're doing is importing this JSON into naden now and this will translate into the workflow that we see. So let me show you how to do that now.
Okay. So now that we have our JSON file, the last step is to upload it into our N8 account. So once you have logged into your N8 and account, go over to the top right hand corner where it says create a workflow. Click on that. Then click on the three dot at the top here and click on import from file. And then the last thing you need to do is just to select the JSON file that you have just downloaded. So here is ours. And now all you need to do is put in the required authentication for the different nodes. And if you notice that any of the nodes are wrong, you can repeat the process. Go back to Google AI Studio if you notice the workflow summary is wrong or go back to Claude AI if you notice that Claude actually got some of the uh notes wrong in it, the JSON code. And then you can reimpport this again. So, this will still save you a lot of time from recreating everything from scratch. You may need to do it a couple of rounds until you get the exact results that you need, though.
Just to summarize here, you can go into Google AI Studios, put in any YouTube or blog video on N8N automations, put in this prompt right here, and it's going to give you a workflow summary. You're going to take that workflow summary and put it into Claude. give it all of the instructions on how to compile N8N documentations. It's then going to give you the JSON code which you can upload into N8N and have the entire workflow recreated within seconds. Super cool. I hope you give this a try. We talk about everything AI, agents, automation on this channel. So, if you want to be in the know on the latest tech, please like and subscribe. And if you like this tutorial and want to dive in deeper, I've got a free AI course that you can sign up for as well. The link is going to be in the descriptions. Now, thank you so much for joining me for this tutorial and I'll see you next time. Bye for now.