📱

Get Our Mobile App

Take your business learning on the go!

Download on the App StoreGet it on Google Play

Как сделать Автоматизацию за 1 промт? ИИ-агенты + n8n MCP — Легко! (полный туториал)

Lazy Income AI34:54

Transcription

What if I told you that now you can create entire workflows, ready to be refined in N8N, with just one prompt? By running MCP servers in tools like Cloud Desktop or Cursor, you can now build quite robust workflows with a speed that was previously impossible. And all of this is because I'm going to show you two of the most powerful methods available right now. To do this, in the first part, I'll show you how to use Cloud Desktop along with a so-called Docker container, which will allow you not only to generate a workflow but also to send it directly to your N8N application. And in the second part, we'll see how to take things to the next level by bypassing some of Cloud Desktop's limitations and moving to Cursor. If this is completely unclear for now, I'll show you a quick demo now so you can see how it works. Let's get started right away. Okay. So, you can see that we are now in Cloud Desktop, and we have a Search and Tools button. If you click on it, you'll see that we actually give Cloud Desktop access to several different tools. This is kind of an AI agent section because we give it access to and we see that we give it access to web search, Drive, Gmail, calendar, as well as these custom tools that we've configured in the configuration file in the background. Yes, I'll show you how to do that later. But for now, I'll click here and show you the custom actions that it has. Okay? All these actions are specific to N8N. They are based on the N8N documentation. Right here below, you'll see N8N Create Workflow. This will allow us to actually create a workflow and publish it to our own N8N application. We have other features as well, such as workflow validation, which will allow the agent to actually work with real N8N files to determine in the background whether the generated workflow is actually good or not. I'll give it two prompts. Okay. The first one will be very simple. Generate an N8N workflow that will create a transcription from my YouTube video and then create a blog post on Webflow. Let's keep it as simple as possible and see what happens. I just want to show you what's happening in the background. Okay, you see that we are giving it access, allowing it to run these tools in MCP, and we see the prompt here. Yes, we'll allow this always so we don't have to constantly interrupt the process and we can see what tools it's running from the MCP we've configured. This is really powerful because we can intervene and see what's actually happening. We're looking for nodes, and the system is smart enough to look for the nodes that best fit our scenario before generating anything. Make sense? This will simply reduce the amount of hallucinations we get. It's now looking for Open AI and HTTP request nodes. Very smart. We get the core nodes and here we can also see the response with all the relevant data. It even understands that it needs to look for a suitable trigger node. And since the task was quite simple, the system didn't do any complex reasoning because we gave it a very simple prompt, so we're giving it the ability to decide for itself what to do next. So, we see here that it's generating a file, okay, and it's even creating system and user prompts with dynamic variables that are usually found in N8N. This is something that if you ask another language model or, for example, Cloud Desktop without MCP, to do, they won't be able to. We're really going to check this when we see the result in N8N to see how well it works. So, we have an overview of the workflow, and it really explains well step-by-step what its key functions are, and so on. Okay, now it's telling us to import the workflow into our N8N instance, but we can actually ask it to do that for us. So we can say, "Upload the workflow for me to my N8N instance, because I've already given it access to that through MCP files." Okay. Here, look, it's now performing an N8N health check to make sure it actually has access to my N8N instance. It has indeed checked, your N8 instance is available. Now it will create the workflow for me, and I don't have to intervene at all. I don't even have to copy this, paste it, and come up with a name. Everything will happen automatically in the background. So this is really very cool, very powerful. Okay. And now we see that it says here, "Great, I have successfully uploaded your YouTube post to Webflow blog." And we see the name that it has given here. Okay, now we'll actually check our N8N instance. You see that here is the post from YouTube to Webflow blog. And, basically, it's done. I don't know if you've tried doing this in ChatGPT, Perplexity, or elsewhere. Usually, they don't quite understand correctly which nodes to add. So sometimes you see nodes with a question mark. This means that the JSON it generated, at least for that node, is incorrect. Something is missing here, or it's a community node, but it's unlikely to be the latter. Most likely, it just generated the wrong code. But you can see here that with the first attempt and with the not-so-good prompt that I gave it, it was able to reason and actually give me the correct nodes. So this is really powerful. So, get information about YouTube videos. I might need to check this, but the fact that it can write on top of it correctly, and even name the nodes for me, is impressive. The query parameter V. Okay, I'll need to check this, but pretty good. It even generates the code itself for me on this node, which is really powerful. Transcribe audio. Okay, in this case, it uses Open AI, so that's also pretty good because one of the MCPs actually accesses live documentation. Make sense? It gets the latest updates from most of the services that can be used within N8N. If we actually use this, the URLs really work for Webflow settings. Yes, perhaps the most difficult part is adding Webflow nodes here. Okay. Adding actual elements inside Webflow nodes, because this is one of those underused, non-obvious nodes. We can see here that it's even filling in dynamic expressions, which is very, very powerful, right? Webflow settings, create webflow, post. So, yes, some of the names. Oh, yes, it's actually passing it through. I just wanted to check this. You know, it's actually calling the correct nodes and doing it correctly too. Usually, if you do this in standard ways with ChatGPT, Perplexity, or even Cloud or Cloud Desktop without MCP, this is what usually goes wrong, which is calling previous nodes. Here, for example, Webflow settings. It calls this Webflow settings node with the correct name. Usually, this is where everything stumbles, but now it's done correctly. I'm honestly very surprised that with the small details I gave in the prompt for Cloud Desktop, it produced this result. And even with the Open AI node, it did very well too. Here you can see that it added the system role, as well as the user role. Maybe it forgot to change the expression, but all I need to do is fix it, and it's done. Pretty good. It even simplified, added sampling, temperature, and token count, which is very good. So, now that you've seen how it works in Cloud Desktop and how impressive it is, in my opinion, I'll show you how to set it all up. Okay, before we move on to the actual build, I think it's important that you understand how it all works behind the scenes. Essentially, we give Cloud Desktop access to three different resources. The first resource is the N8N source code. As you may know, N8N is actually an open-source project, which means we can see how they've implemented it with code. And this gives Cloud Desktop additional context. Right? Very important context about how N8N is structured, especially how the more than 530 nodes that make it function work. This will allow it to start building any workflow property. Then, we give it access to a collection of over 2,000 pre-built N8N workflows. So while it's building, it can just check that it's doing it correctly for a specific use case. That is, it can do this both during the building process and after everything is built. This simply gives the Cloud code additional confidence that it's actually building something good. And finally, we give Cloud Desktop access to up-to-date documentation. Because I don't know about you, but I've definitely tried connecting and communicating with services via HTTP requests in N8N. And when I sometimes ask ChatGPT or Perplexity, they often make mistakes with URLs, as well as with JSON, with the information requests that we send to or receive from a service. So sometimes they make mistakes, and it's a bit annoying. Thus, by giving it access to the up-to-date documentation repository for the services we commonly use, we ensure a minimum number of errors when Cloud Desktop generates a JSON API request URL. Essentially, these are the resources we provide it with. But the point is, we want Cloud Desktop to use the online search tool solely for reading these files. We want to have a closer connection to these data sources because essentially they are all GitHub repositories, meaning they are just code snippets stored on GitHub servers. Make sense? Thus, by fetching these GitHub repositories and turning them into MCP servers, we can actually perform actions on these code snippets. Okay, Cloud and Desktop can actually fetch them and manipulate them to build something based on them, right? That is, not just read this information, but actually get the code and use it to create the workflows we need. Therefore, we will use a tool called GitMCP. We will turn these two GitHub repositories into small MCP servers, which will be hosted by these people here on Gitmcp. Make sense? So we will turn this into a remote MCP because we are running it outside of our computer. It's a remote MCP. And for this, we will use Git MCP. To create this MCP server, we will use something called Docker. Okay. With it, you will run a so-called container. And you might be wondering. Essentially, what I want to do with this MCP server is slightly different from these two. So with these two, I'm basically just taking all the information from the repository on GitHub and passing it to cloud C D for processing. Okay. But with this one, I want to perform more complex actions. I want to have direct access to my N8N account to perform actions such as creating workflows directly in my N8N account, without having to copy, paste, edit workflows, delete them, and so on. And to do this, I could simply install certain packages or libraries that provide such functionality to perform these actions. But the problem with installing this directly on my computer is that many errors can occur because I need to install certain things that could break my computer or damage any future projects I create. So instead of installing all this on my computer, I'm using a so-called container. And you can imagine a container as a virtual machine. Okay? It's a virtual computer on which I can install this MCP server. Make sense? Thus, I can install all these packages, all these things, all the necessary tools inside this container so that I don't have to do it on my laptop and break anything. I just want to give you a general idea, I don't want to overcomplicate it. And this is an example of a local MCP. I'm running this MCP server on my computer. Even though it's in a container, everything is still happening on my computer. Make sense? And from here, I get access to my N8N account in the cloud. Okay. And from here, I get access to my N8N account in the cloud. So, this MCP server runs locally on my computer using Docker, unlike these two MCPs that run on this server in the cloud, because I need to perform many complex actions. I hope that was clear. But why use MCP or MCP servers? I'll just quickly clarify that for you. If you know, MCP stands for Model Context Protocol, and it simply allows us to call or create tools for LLMs much more easily. Let me show you what I mean. Let's say I have an LLM here, and I'm going to give it access to different tools. Okay, we'll ask it to perform various actions with our Google Drive. We'll allow it to upload files, download files, and delete files. Traditionally, this is done like this. We need to create an HTTP or API request for each of these actions. And we need to add the URL. Right, with an endpoint that describes the upload action. So something like Google Drive, blah, blah, blah, upload, download, delete, okay. And, uh, as well as many other manual things that you need to configure. Now imagine you want to add 10 more different actions. Okay, you probably understand how tedious that is. So instead of adding all this manually and having the LLM get confused about which action to use, let's combine all of this and be able to call all these actions using a so-called MCP server. This saves us a lot of time because now all we have to do is just configure this MCP server, on which all these actions will already be configured. So instead of doing all this manually, you just need to configure it. Okay. I hope this illustration also helps. But essentially, we are accessing, for example, Slack, Google Drive, GitHub. We are just combining them under one roof. And now, by just configuring this, we can access these individual APIs. Okay. I hope that was clear. I want to briefly interrupt the video to announce my Telegram community. In this community, you will find everything. From all the templates that I will make based on YouTube videos to exclusive templates that will only be on Telegram. So join right now. I also post the latest news in the AI industry. I'm waiting for you on Telegram. Let's continue the video. Let's move on to the setup. So, the first thing you need to do is install clod on your computer. To use this, you will need a paid plan or the maximum plan. Okay? Make sure you have one of them and install it on your device. I really advise you to try it. I am affiliated with them. I think it's worth trying. Pay for the plan, try it for a month. If you like it, stay. If not, leave, download it to your device, and then open Cloud Desktop. Now you need to go to the settings of this application, scroll down to the developer section, and you will see something like this. Okay, obviously, you won't have this because you haven't configured it, but you will see a button that says Edit Config. You will open it and see this configuration file, where we will add the credentials for our MCP servers. Okay, in this case, we have three of them. So, I'll double-click on this file, and it will open. Jon file will open in a regular text editor or your code editor. Okay, in this case, it's open in Cursor. And we have this MCP server that was configured in Docker, and then these two that were created with get MCP. You might have nothing here, but don't worry, because we will tell Cloud Desktop to create it for us. So, we will use clД to create a configuration file for ClД, which is quite funny. But yes, I'll show you how to do it now. First, I'll show you three different GitHub repositories that we will use and turn into MCP servers. The first one is the one we use in Docker. We'll talk about it later. This will essentially allow us, as I said, to access our N8N application. To extract, add, edit, and do whatever we want with our N8N application. But essentially, what we will use, scroll down, should be this one. So we will use this particular one. And note that we have two modes. We have a basic configuration, which is similar to the other two MCP servers we will create. And it only gives us access to the documentation tool. Make sense, we can get some data from the documentation and use it to build our workflows, but we want to go further. These are the superpowers that Docker gives us. We can go into this full configuration mode. which allows us to use these N8N management tools. This will allow us to get direct access to our N8N application to add any documentation, edit documentation, and so on. As you can see, we have our API URL and our API key, which we will add a little later, but I just wanted you to understand what we are doing here. Now we will move on to the second repository. And this is the repository where all the fully pre-built N8N workflows are located. For this, we will take this URL and go to get MCP. This is an amazing tool that will allow us to convert this into an MCP server. Add the URL to MCP. And now we have just launched a very simple MCP server. Now select Cloud Desktop. Okay. So you will copy this, and we will go to Cloud Desktop, and there you will paste. We will open a new chat. I will write. Create an MCP configuration file for Cloud Desktop to connect to these MCP servers. And we will add all the files step by step. First, we will add this first one that we have. Then we will add the second one, that is, the third one, sorry, this is the last one that I haven't shown you yet, and this is to access up-to-date documentation. Okay. So, we will just copy this URL, go to get MCP, delete these, paste the new one, and click for MCP. Now we will go to Cloud Desktop, do the same, copy this, and go back to Cloud Desktop. Great. I will separate this with a couple of commas to understand that it is a different JSON object. Okay, let's add another separator here. And now we will add the last one. This one here. I left it for last because we need some API credentials. Now we need to find option two. Here it is. And you will go to the full configuration. Copy and paste this here. Add another separator. Now we are going to say for the last MCP server that my URL is the N8N API. Now you need to paste the link here. Go to the browser and copy this address up to the first curly line, like I did, and paste it into Cloud Desktop. We will actually let Cloud Desktop create the configuration file for Cloud Desktop for us. Just add a couple of commas and specify my N8N API key, and I'll leave a space. Cloud desktop should be smart enough to determine the differences. For example, what exactly is the API key. Okay, now we go to settings. We have already copied the URL and within N8N, go to settings. Then to the AP8N section and create an API key. Specify a name, for example, demo MCP. Cloud save. This grants all permissions. This is fine. And copy the API key. Don't worry, I will delete this API key as soon as I finish the video. In any case, go back here and just paste it here. Okay. Now you are fully ready, because we have this. This requires no credentials from us. It's the same. And for the last option, which we will use with Docker, this is the only one that requires a URL and a key, which we have already added. Now we press Enter. Now an MCP configuration file will be created, similar to the one I have here, right? Which we opened using settings in cloud desktop. You will most likely have something similar there, because you have nothing there. And what you need to do is just copy all of this, just copy, go back here, select everything, delete it so it's empty, and then paste it like this. Just don't forget to save with Command + S or however you usually do it. I'll do it with you, and then we'll put everything back the way it was for me. But when that's done, you can save and close it. Now you have Git MCP, the ones that require Docker. This should already work correctly. So, if you close Cloud Desktop and open it again, then you go to Tools, and you should now see N8N Workflows Doc and MCP Server Doc. They should be available. The only thing you shouldn't have available is N8NCP. This is because we haven't configured Docker yet, as this server requires Docker itself to run. So now we'll see how to do that. Now we need to run this last MCP server, which will run locally. So we will need a Docker container. For this, we are going to download Docker Desktop, so choose your device and as soon as you download it, open it. Here is the application itself, we will not go into details, I will just explain the main things you need to do and understand. So, we have Docker here. The first thing we need to do is, first, keep it open. If we want the MCP server to run. And, second, we will now execute a command in our computer's terminal, and this will download a so-called image. You can imagine an image as a recipe for creating a container. A container is essentially the same virtual machine I told you about, which will power our MCP server. And this MCP server will communicate with our N8N account to add new workflows. when we create them with Cloud Desktop, edit them, delete them, and so on. You probably don't see anything here yet, because we haven't downloaded the image. So, this is what we will do now. Now go to the bottom right of the screen. There you will see an item called Terminal. Open it, and we will add the following command. This command, as you can see, if you read it, Docker PULL, we are going to download the image. And this will be the latest version. I will leave it in the description. Or you can download it from the repository on GitHub. It should be somewhere here, yes? Right here, under option two. When that's ready, you can run the command. And now we should download the latest version. For me, this was quick. For you, it will likely take a bit longer because I already have the image downloaded. Okay, when you're all set, all you need to do is go back to cloud and close it, because we've already closed the configuration files. That's already done, but now you need to close Cloud Desktop. and we will open it again. With Docker desktор. So, we will open it. And you will see that when I launch Cloud Desktop, we create a new container. For for this same image. Right, this last container that was created, it is in this one that the MCP server will run. You need to use this last container. So, make sure that at least the last container you created is green, meaning it's running. Okay, don't forget that. Now go back and open Cloud Desktop. If you go to the Search and Tools tab or button here, you will now see that in addition to these two MCP servers or tools, we now have this one with thirty-nine different tools. So, this server with thirty-nine different tools. This is exactly what will allow us to expand our capabilities when creating any workflows, because now you will be able to connect to your N8N account - this is pretty good, and essentially that's all you need to do. And the last thing, to keep everything working when using Cloud Desktop, is to keep this window open. In general, this part is almost finished. Now I will show you a second way to create Anytтаe workflows. I will use Cursor, but you can use almost any AI-enabled code editor. Now we will open a new project, and I will just add it here. I will create a new folder here and name it whatever I want. Okay. Okay, I'll just call it demo, and we'll open it, because you won't have any files. You will need to create a new file here. As you know, workflows for N8N are JSON files. Right? Now we will give our Workflow a name. Here we'll call it something depending on what you want to create. Essentially, I'll just call it YouTube Transcript, meaning YouTube Trans.json. This will automatically create a JSON file here. Okay. So, when you have this, now we really need to allow the AI agent within Cursor to access these MCP servers, which were created similarly to how we gave access to Cloud Desktop. But the difference here is that we can have a more iterative back-and-forth dialogue there.

as an agent within Cursor, without encountering any limitations, because, if you remember, when I used Cloud Desktop in the demonstration, you saw that I was already hitting limits. And we can see here, let's see if we can select different models. Right? So here we can select, we have a variety of different models, and we are not limited to just models within Cloud. We can also use all three, for example, GMI 2.5. So we are limited to staying only within Cloud. Among the models we choose, we can actually extend this even further and choose other models. Can we also go into max mode? Yes, we can. This is what we will try now, so you can see the power of this. We will turn this on. You don't need to do anything. This is just me showing you that you can do it. But I am talking too much. Now, I think it's time to set up the MCP servers. You need to go into Cursor settings, okay, Cursor settings. Then Crystal settings, then scroll down to Tools and Integrations. And you should see a section called MCP Tools. You need to click on the Add Custom MCP button. Okay. And this file should open for you. It should be empty or contain some value, a placeholder, or something like that. We have already done this. If you remember, if you open the cloud.config file, which should be somewhere here, in general, you can just open it again by going to cloud, this will open the cloud developer edit config settings. Essentially, we need to copy all of this and add it to the MCP file from Cursor. After you add this, save the file. And in general, that's it. Now you can close this. Close all of this. And now you will see that you should already have these MCP servers enabled as tools. Everything is already set up because we have already done this for Cloud Desktop. Now we can just proceed and refine this Jon file. Here, let's do something a little different, because, I think we have already done something similar in the first demonstration. Let's call it an email agent and just say: create a simple any workflow that will monitor my Gmail, incoming for new emails and use AI for analysis. If it's a sales inquiry or a customer question, then automatically create appropriate draft responses for potential clients. It should ask clarifying questions about budget, timelines, or needs for support questions, provide helpful answers, or if the question is complex, forward it to my email. And for general inquiries, it should respond professionally, while, for example, collecting contact information. and it should maintain my writing style and company voice, save all interactions in a Google Sheet for tracking, and send responses only after my approval through a simple email confirmation or Slack notification. And we want to give enough details so that it understands what's happening. Okay. So, let's press Enter and see what happens. And, as I said, I'm using Mac just to see what it will do. I'm just very curious to see how it works in Max mode. But I think using Cloud Sonet in normal mode is quite enough. You have O3 that you can try. Gemini 2.5. If you want, connect any API keys. And maybe you can also add Open Router to get even more access to other models. Let's see what it suggests. See that it's already calling MCP, something like 10. MCP is looking for nodes, yes, that's pretty good. This will increase the accuracy of generation, gets the basic data on nodes, such as notes, Google Sheets, and the like. Just reads them, right? That's how it is. We have generated a workflow, and now we will just ask it to write a detailed setup guide. But we don't need a setup guide, so I will just ask it to create this workflow in my N8N account, using the available MCPs. So we will just send this directly to my account. We check that it has access success true and my URL. All of this is quite powerful. Okay, we are giving it access to run this tool. That's how it is. Done. So, the workflow is created, and we can just stop this. We don't need it. And if we now go to NN and come back here, we will see that we have created an AI-based email automation assistant. Let's look at this. Okay, now it's quite complete. I mean, it added a good nurture node and all that. Let's clean it up a bit and see what came out of it. I mean, look at this. I've never seen such progress, really, and the fact that there are no missing nodes. Well, except for this one, probably. But that's, I guess, a secondary thing. We have AI nodes. I think this is probably what I need to configure here, but that's a problem. Various Open AI nodes. It even added some. Also added code for preparing response data, which is quite good. Logic for categorizing emails. And also sending Slack requests, approval requests, and sending. Yes, so I would say it's not 100% perfect, but look, it's a great start. Apparently, all that needs to be done is just replace all the nodes with the correct credentials, tweak the details a bit, and most likely, you'll already have something working. Think about it, was this possible before? If you tried to generate this with a regular AI or language model, you wouldn't get this accuracy at all. As I promised, most of your nodes would look like this. Okay. And the fact that this didn't happen, and the system actually filled everything in and added the correct triggers, that's very difficult to do. It's really impressive. And especially with Cursor, considering that you can create more than one workflow, one can imagine that if you give it the right instructions, because you can go into Cursor settings right here and give it custom instructions. So, let's say, if in this session you are only using it to create any workflows, you can add rules and specify specific things that you want the agent to do, which are unique to building such workflows. So you can refine it even further here. And I'm sure you'll be able to create really interesting workflows and automations in general, just by adding a few prompts. And the fact that you can also easily refine the automation back and forth. You can edit this same workflow. Right? If you look at it visually and see that something isn't working, you can go back here. You can tell it: "Edit the workflow directly from your N8N account." So you can do many other things. That's why I'm very interested to see how this will develop. But I'll stop here, because I don't want the video to be too long. I hope you understood how powerful this is. Who knows where we will end up with such settings in a few months or half a year. Yes, it can become even more accurate. So, what I did here is the best way I launched it. Okay, I just wanted to show a quick demonstration, but the right way is to first go into prompt mode. If you are using Cursor and having a dialogue with Cursor so that it really understands what you are trying to create, I would advise doing it all at once, like I did. This is what, in my opinion, needs to be done, and then immediately go and build it. I recommend you go into prompt mode and plan first how the workflow should look. Okay. You can also use MCP to check any other available workflows to understand which nodes are available and which are not, and do this in a dialogue. And when you are ready, then you can switch to agent mode. And that's when you can start building. So I would not advise doing it exactly as I did. As I said, go into chat mode to plan the workflow. I will zoom in if you can't see. Okay. This is called prompt mode, but I call it planning mode. And then you switch it to agent mode to actually create the workflow. If you want to do it right, then I advise doing it this way, in addition to adding rules. Okay. Now that I remember, you can go and add rules right here in the repository. Technically, they are for, let's say, for cloud projects, but honestly, I think it's important. Just add it here. Add it, as a rule, click done, and try again. Okay, try building the workflow again. Just as I said, first do it in chat mode, and when you are ready in agent mode, and add this Cursor rule here, which was provided by a wonderful person who created this repository, on GitHub. I think these are all the tips I can give you so that you can start and build really cool workflows like this without any help from me, at least. And by help, I mean that I would have to intervene and, you know, build workflows. This was done with a simple prompt, as you saw. This was done with a very simple prompt. Imagine if you actually do what I advise you to do, first plan the workflow, then add rules, as I just showed, and then switch to agent mode. I'm sure you'll be able to go further than me, so I advise you to try it. Let me know in the comments below what you managed to achieve. And yes, if you want to learn automation, then I have prepared a good Telegram channel for you, which you can join right now. I also have other videos on setting up automation. I advise you to watch them. And yes, if you liked the video, please give me a like and subscribe. I would be very grateful. And if you have suggestions for future videos, let me know in the comments below. And if for some reason you didn't like the video, also let me know in the comments below. Any feedback is good feedback. Thank you very much. See you in the next video.