Create your first AI Agent in n8n : Step by Step Tutorial

Hi everyone, and welcome back to the channel, today’s goal is super simple. I’m just going to help you build your first AI agent. If you haven’t done something like this before, this video is perfect for you. So let’s get started. Now.
I’m going to use a tool called NA 10. It’s an amazing AI workflow tool, which can do literally anything in the world, and we are going to use that to build.

You can simply go ahead and click on get started and sign up. once you come here, you get to something like this and you have to click on create a workflow. I’ve already done that, and I have this particular workflow with just a simple note.
And I’ll also tell you how can you add a note in a second? This is the blank space that you’re going to get started with, so let’s build together. When you are thinking about building an agent, start with an idea. My idea is pretty simple. I want to do two things.
Ask for a topic from the user, and create content about that topic using an AI agent and send an email. I’m just going to click add first step and select my trigger. Now what is a trigger? A trigger is literally, as the name suggests, to trigger your workflow and trigger your AI agent. when does it get started?
I’m going to search for chat trigger and click here. Once this is done, I’m just going to like, you know, I can put settings, I can add parameters, I can do something.

I’m just going to keep chart, trigger here, and that’s it. And then a couple of things that you can do here to make your UI look better is you can write user input, I am just renaming this so you can understand that, and that’s pretty simple. We have our building block with us, and now what I’m going to do is click on this plus button and select.
As you can see, there are multiple options. We are just going to click on advanced AI right now.

That’s all you want to do. Now, you have a ton of template options and another a hundred different options you can select from there. We are just going to pick the first option, which is the AI agent.
Now, as you can see, it automatically comes up with some settings created. just to show you this is how it looks connected to a chart, trigger note. there is an error because we still have to do a lot of things, but just getting started, the first thing that you would like to do is click on this chart model option. And once you click on chart model, which model do you want to use Now you can select any model that is there. The only thing is all of these models are external So that means you will have to go ahead and sign up on any of these platforms, open AI API, or you have to sign up for Cloud API and anything like that, right?
So you have to pay separately for all of those things.

You can go and sign up here and get a API key and you can do the same with Claude from an API perspective and purchase their keys. doing that is super simple, given that you are doing this for the first time, I’m going to show you how does this work, right? So first of all, you’ll come to something like this and you can log in and sign up. Once you do that, you’ll end up on this platform where you can see multiple options exist.
So if. I just show you there’s dashboard logs, traces, and everything. This is for open AI right now, for cloud, the system looks a bit different, but the logic stays the same. I have different API keys available here. these are all saved and obviously I’ve hidden them so they are not revealed.
you’ll come to something like this. Now, what you have to do here is create a new secret, a VI key, I’m just going to write.

This is YouTube test, And you can select different projects or something like that right now, just like, don’t even worry about it. And click that. And here is where you get the whole key.
Don’t worry, this key is not going to be usable. I’m going to delete it after this. Click on copy. And now you are technically done. You come back here and the first thing that you can do is now you can come to this language model and select open AI Now.
As you can see, I already have a credential created for open air.

Now, what is a credential? It’s nothing but just an authentication process that says, okay, you know what? This is my key. I own this, and here is the proof that I own this.
So you are going to click on create new credential. I’m going to enter my API key here, right? And I can enter an organization ID or a base URL. Something like that. But again, very simply here we are just going to write API key paste that and I’ll just read him this to YouTube test so that I remember that what is this key usage for?
I’ll click on save and. This is ready it online tested. The key is valid, and I can then select YouTube test. You will probably just have a single credential, Now another thing that I should not miss to mention is that you need to pay some money to run this.

So for example, this API is not free.
Now, to use any of these APIs, you have to pay some amount of money, click on settings, and once you click on settings, you’ll get to billing. Once you get to billing, you can add a credit balance. As you can see, I have three point $14 now, so I don’t need to do that, but once you click on add to credit balances, you can then add some amount here, and select your payment method. Let’s come back here. I have the YouTube test credential.
I have this, I’m just going to keep this here. Now again, this is what I need to connect as a chart model. As you can see, I can only connect a single chat model, right? I can’t have multiple chat models available here. Next thing that I want to do is, now obviously I have the user input.
I have this agent, but this agent knows nothing on what it has to do. So I want to come back here and select, as you can see, an option system message.

Every LLM model works on two things. It has. A system message and then a user input.
the response that we get back from the AI is called assistant message or AI message, whatever you want to call it. Perfect. So when I write, hi WhatsApp, this is the response that I get, right? Hey, I shall not match X, Y, Z, whatever. This is a user message and this is a.
AI message, but now in behind this open AI has written something called a system message, which is the definition on how the LLM should respond. So they might have written B fund B. Serious or something like that. And that’s what we call as a system message. So in the system message, what we will use it for is to define how should the agent perform.
So we are going to keep it super simple. I’m not going to make it an extremely complex prompt here. I’m just going to keep it super simple so that you can get started by building a first agent.

I’m just going to use basic personal prompting techniques and say you are. A newsletter expert who has been writing newsletters for the last 20 days.
Based on the user input, create a small newsletter to send to the user. Is this the right agent prompt? No, but we are just going to get started and reply and use this. That’s it. I can now technically start testing my model.
So if I come back, I just have a chart. I’m just going to write an example of. India history, right? This is the newsletter that I want based on this. If I’ve given this the topic, it should use AI agent.
As you can see, it started using.

It has started working, and then it will also go ahead and use the open AI chart model and reply back to me with a newsletter about the history of India or hopefully something around that. As you can see, it has responded with a pretty good newsletter, which I believe is Well modified for the prompt that I’ve given it, very simply,. Welcome to the Indian History Digest. It has given some important stuff, upcoming events, which it has automatically thought by itself.
Interesting tidbits and a couple of other things, which I believe is super cool given that we gave it very simple stuff. It also gave itself a name, the Indian History Digest team, Now, this is amazing to get started, right? But the goal is not just to have an AI agent. actually, I can technically do this in charge video also, obviously true, but the idea is an agent is not complete until we add a tool.

Now, what is the difference?
With a tool being added. Let me just show you. Okay? Now the point is when you add a tool to an AI agent, AI agent gets access to do stuff, to do stuff outside its own current parameters. Right?
Now what you did, you could do it in charge PD, because it is just interacting in a chat based format, and an AI agent can do.

Actions by its own understanding based on the instructions So if you remember, we want to create an content about topic and send an email. So I’m going to come back here and connect a Gmail route so you can just, so Gmail and there is like a ton of tools here and select all these options. obviously you’ll have to set up a credential. You can use your Gmail account, log in directly from there, I have custom.
Credentials created, click on create new. You can input all of these details, or if you’re using NA 10 on a public option you will have an option to sign in and completely link the account by just a click of the button.

Given that I’m on my own server, this is a complexity that I have to deal with, you don’t even have to worry about that. Okay, perfect. We are gonna close this.
We are going to close this, and now you can see there are multiple options when you’re setting up a tool. So let’s go one by one, what is the tool description? this is very simply where we are going to define. What is this tool going to do? So if I have set automatically, then this is technically automatically set by an attend and by the LLM concern is something I love to use the manual option, it gives you a bit more understanding on how you use it, It gives you a bit more space to completely expressively tell what it is used for.
So I’m gonna say it. It’s simply to send an email with a newsletter in the body, right? Again, I’m doing a very clear description of what the tool is.

I can also just say, send an email using Gmail. That’s it.
If I come back here, click on resource, you can see there are multiple options. I can reply to a thread, I can create a draft. I can label something, or I can just send a message. I want to just send a message and then I’m going to come back here. I’m going to input my email idea and also input the subject.
Right now, you would be like, I don’t want to write a subject. I want AI to write the subject, and you will be absolutely correct. Again, for this, we are going to use our simplest, easiest format. Just come back here and you will be here. Just click on this particular button.
then you can define what the subject should look like. I will say a simple forward word subject as a headline for the newsletter. So this is an input that the AI model will get when it is going and looking at the tools that it has access to.

When it figures out that this is the tool that has access to, and it has to use this tool, it’ll use this tool by describing the subject itself the same way. I’m also going to describe this particular message, which is the.
Email body. So message here is nothing but the body of the email. That means just zoom it properly so you can see. This is automatically the body of the email. That’s it, right?
we can say description should be here, like this is the newsletter audio or something like that.

But if you see the email type, there are two options. Text and H, TM LI would like to actually use htm l I’ll show you. How does that translate? Now here, I’m just going to input my email id.
It’s the same email id, which the email is going to actually get triggered from, but I don’t want to send anywhere else, so I can just show you all on a single page. Now, again, you can obviously ask the model to define this but given that it’s an email. You would probably want to use your own email to test it out, or the email that you want to send the newsletter to. And given all of this is done, we are pretty much good to go. I’ll just do this and then if you can see this like, you know, ignore this.


This is just, kind of a warning that says because you have changed so much stuff, the responses need to be reconfigured and we have all of this, but there’s one thing still missing, which I’ll show you in a second. Let’s save and let me show you. How does this. Look like. Okay, click on open chart again.
Let’s reset this. And I’m just going to write US history this time rather than Indian history. It’s going to process everything, but if you see the response I’m hoping is just not going to, and as you can see, it has sent an email automatically, even without writing a prompt. Right. And that’s interesting ’cause AI tool would’ve seen that this is the input and I’ve, I have a tool, I’m just going to send the template.
I’m going to send the email myself and that’s crazy, right? I did not define it. I should have technically gone and input there, but that’s pretty cool.

And the reason behind that is very simply because we have a small newsletter to send to the user AI agents are pretty smart because the LM models that we are using are pretty smart. They understand that if I have access to a tool and the user is asking me to send a newsletter, they’re going to use the email to send the newsletter.
Let me quickly show you the email that the agent has sent. Now, as you can see, this is the actual email that I got right now. Obviously, this email looks horrible.

Not formatted well and everything else, it just does not look well. But what is the problem there, right?
And that’s where you have to understand that every tool has a different configuration. the way that we are using. LM agents. you see this is the body of the email, and we have the email type at HTM L, but our agent is actually not responding in html, right? It’s just responding in a language for markdown.
So markdown is a language used to define content like this. So if I come here, and if you see this also uses markdown, if I just remove a hashtag, it becomes this big and heading, and if I had a hashtag, it becomes a smaller one. So markdown is used to format content in the simplest way possible using Simple, options.

Now again, you can learn a lot more about Mark, but the problem here is it’s not responding to htm. So what I’m going, come here and say, and this way you have to make sure that the prompts are better, which respond based on the user input.
Create a small newsletter to send to the user and strictly create the newsletter in an HTMI format, which is beautiful. Right now, this is done, and I’ll say a reply with the HTMR only, or now once I’ve written this, I’m just going to come back here and test it again. Again, you are going to have issues.

Don’t expect your agents to be perfect in one shot. they’re not going to be.
So come back here. We are going to try US history again Press enter and give it a couple of seconds and let it run its course. it should be able to respond in html this is the mistake that I would’ve made. I knew this now because if I have asked this strictly respond in html, it’s going to respond to me, right? I did not define it that, you know, reply with the H TM L only for the email tool.

Even that is done. It won’t work. So what I have to do is again, create a newsletter in H format, which is beautiful. And then use the email tool to send the newsletter in the same format. Right?
And let’s test it again, Literally just test this whole step again. So we’re gonna come back here and let’s see how this runs. It already has an input from us. But if it wants me to give an input, I’ll give it an input again, but keep testing, And the best thing is like you are facing all these errors because our prompt is not great. And once you start seeing the prompt to be better, you’ll actually start exploring and seeing that this can be really, really better.
This is the output that I got, this is so much better. this email newsletter looks a hundred times better than what we were seeing before and that’s the beauty of this, Now, the one thing that has happened here is I got two emails and the reason we had that is probably got triggered twice or something like that.

Obviously we can control that. You can say only run it once or something like that. But again, those are things that you just figure out as you go.
But this is literally your first AI agent that takes a topic, writes a newsletter, and sends the newsletter to anyone that you want across the world. Now, the one thing that I’ll recommend all of you to do is to click on this tool tab and see the number of tools that exist. There is a sheer amount of tools that you can use and can really, really utilize it for literally anything. I am like you have Airtable hair, you have phantom buster hair, you have LinkedIn tool hair. You have literally anything that you can think of, right?
And the best thing is in case you can’t find a tool, you can use the HVP request tool. Now again, but if you’re done and follow the tutorial along, tell Long. I will just say. Give yourself a huge pat on the back. You’ve created your first AI agent and I’m super proud that you followed through the whole tutorial.

If you’re here, I’m going to give you a really big reason to subscribe, I’m going to do more of these tutorials where I teach you step by step how to build agents so that you can go from this to this kind of agents and amazing templates and upskill yourself and also utilize that in your daily basis. Now, if you’re interested to learn more and engage with me directly, we have recently launched a community. I just got my first member two days back. So again, if you’re interested to join, go ahead and sign up. The link will be in the description, but other than that, please, please hit that subscribe and like button.
It really helps me out and check out the description. There are a ton of free resources that you can utilize Until then, I would love to see you in the next one. Bye-bye.

GPT: The GPT5 Profit Playbook https://warriorplus.com/o2/a/q409g22/0

ACCESS THIS BONUS HERE


Discover more from Marketing Revolution

Subscribe to get the latest posts sent to your email.

This entry was posted in Chat GPT and tagged , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply