[gpt3]
Write a Medium-style article using the following rules:
Create a bold, results-driven article using a highly casual, non-formal tone. The AI MUST generate a full title that follows this core structure:
A Specific Earnings Claim (e.g., “How I Made $X,XXX in Y Days”).
The Solution/Topic Fragment (This must be generated based entirely on the content of the Welcome to the most comprehensive NATO course where I take you from a real beginner in AI automation to someone who’s actually able to build automations and AI agents for themselves or for other businesses. And in case we haven’t met, my name is Mikuel and over the past 12 months, we’ve helped over 40 businesses implement AI and automations and taught over 20,000 people in the process. All starting with zero technical knowledge. So, we’re going to go through everything from understanding what is AI automation to setting up your own end to end account, understanding how to build stronger and faster, more scalable AI automations and AI agents, and finally actually building systems step by step. By the end, you’ll be an AI automations and AI agents expert and you know exactly how to build systems that drive real business value. So, the course itself is split into six different modules. Module one is getting started with NAT foundations. We’ll go through exactly what automation even is to understanding how you can set up everything within Nitn and build your first automation. Module two is core niten foundations using automation logic and APIs and walking you through exactly how automation really works in the back end. Module three is AI agent fundamentals and really understanding how AI agents work. Module four is building smarter AI systems using frameworks and prompts which allow our automations and AI agents to make sure that everything that we build is actually scalable, tangible and can actually be implemented into a business. Module five is real world AI agent projects end to end builds showing you exactly different use cases within a business that you can implement AI agents and showing you how I build it step by step. And module six is real world AI workflow projects end to end builds where I show you exactly how we now not only just use AI agents but use entire workflows to be able to implement into a business and showing you how I build different use cases step by step. By the way, if you want access to all the resources that we’re going to be talking about in this video, plus being part of a community of over 3,000 people who are actually building automations every single day and growing their own businesses. Check the second link down below. I’m going to leave all the timestamps down below in case you want to skip through some modules or go to the direct part or even come back to this video. Uh because I know it’s really long. Um so without further ado, let’s dive in. All right, before we jump into Nit, let’s talk about what is automation. Automation is the process of using technology to do tasks without you. Whether it’s AI agents, whether it’s workflows, whether it’s all these stuff, that’s exactly what it is. It’s using softwares to be able to do things without you. Now, every day we all perform many regular ad hoc tasks. Ad hoc just means it is repetitive. Whether you are a working professional, whether you are a business owner, whether that’s in sales, marketing, operations, finance, or business management, we all have different parts of the business that we have to do because that’s what drives the business forward. But the problem is these tasks are repetitive, so they happen every single time. They’re notori. They’re low value addition. So you do them but they don’t add that much value into your day and most importantly they’re effort and timeconuming. So you do them they take a ton of time. You don’t want to do them. They are repetitive. They’re very easy. And so the solution is automation. Now you might not be fully conscious of it. But automation actually plays a big role in our everyday lives. For example, when we have a meeting in our school community, so we have two weekly calls. One is a weekly huddle, the other one is a bip coding session. when the meeting is 1 hour away then it sends a notification over email to my school members or Netflix when you watch a certain type of movie then Netflix recognizes that. So it says hey he watched this movie that means he must like something else right and it gives you a recommendation that is automation because it automates the process of you having to find a movie that you like yourself or a coffee machine and you might be asking yourself how does a coffee machine even play a role in this? Well just hear me out. Whenever a coffee machine finishes making the coffee then the timer finishes and lastly chbt right because when you give a prompt to chbttt then it gives you the output right now chbt is a bit different just because it’s non-deterministic so nondeterministic that means that one series of input so you can say hey can you do this for me and it does something else you can say the exact same thing and it might do it differently next time right because you can determine the output that you get but at the end of the day everything is automation now I don’t know if you noticed the way that I was actually explaining these concepts but we actually use a very simple principle which is if this then that. So if we have X then it goes to either A and B. If it’s B it go it goes to either E and F. If it’s A then it goes to either C and D. And that is exactly how automation works. Everything and everything is built on logic right whether you’re building code whether you’re using automations whether you’re using niten make.com zaper power automate all these tools they’re all built on logic. If this happens or when this happens then you do this. And the question then becomes, what can automation do for you? Well, as a business owner or an individual, it increases productivity and efficiency, which means that you can do more with less, more leverage. You save time to do other things, right? Because automation for a business means that they can now focus on other areas of the business. Has an increase of availability because automation doesn’t need holidays. They don’t need any emotional support. They’re always there working 24/7. You can scale with less resources. And by the way, we’ve come to a point where automation allows us to be able to build a oneperson company as you might have heard. Uh but it’s all because of the softwares and technology that is out there all because of automation. And it’s more robust and less errors. Especially when it comes to the repetitive tasks that you have to do every single time. Because if you are anything like me, when I do something over and over again, I get tired and my quality of output goes down, right? And so with automation, it’s consistent. And with that said, let’s jump into N8N. All right, so this right here is N8N. Now, all you have to do to get to this page is go to nitn.io and you’ll have this dashboard. Now, as you can see here, is a flexible AI workflow automation for technical teams that allows us to be able to build automations without needing to know how to code. Now, the automation can vary, right, depending on what you’re using it. IT, security, dev, sales, you can do a bunch of stuff within this exact platform. And it allows us to have so much flexibility around what we build as well as plugging it to over 500 integrations, which is a bit lower than other platforms, but it still allows us to be able to speak to different softwares altogether. And also, it has the ability for us to code when you need it, the UI when you don’t, which means that you can go either way, which is why I mentioned that it’s flexible in what we do because it’s great for two kinds of people. All right. So, if I go to pricing right here, I can see how much we actually have to spend to be using any. Now, N10 does not have a free plan on the cloud version, right? Cloud version. Now, if you’re a beginner to N10, you have probably heard about self-hosting versus cloud hosting. Cloud hosting just means that you just use N10 within the cloud. Literally just here on Chrome, on Safari, whatever it is. But we do have the option to self-host, which means that we create our own server and we self-hosted in our own server. So, we don’t have to pay. Now, don’t worry. I’m going to show you exactly how to self-host as well in the next few videos. So, you’ll have that, too. Now, for the cloud hosting version, which is the one that most people use. We don’t have a free plan, uh, but we have a starter plan, pro, business, and enterprise. Now, most people use the 24 plan, which is, I believe, about 30 bucks. And the way that Niten actually prices us is through work for executions, which I’ll speak about in just a second. But we do have the ability for us to start a free trial with no credit card required which allows us to test any for about 14 days before we have to upgrade to a paid plan. And here we have one shared project, five concurrent executions, unlimited users, 50 AI workflow build credits, and forum support, which is more than enough for what we need. Now, if you are building Nitan for a bigger company and you want more workflow executions, then you’re most likely going to be using the pro plan, which is €60 a month. Now, honestly, this is not super cheap, but when you think about the concept of how they actually price their automations, it is much better than any other platform that I’ve seen before. And same thing here, but it has a bit more stuff when it comes to the actual plan. All right, so for you, just press start a free trial right here. Then you can start filling out the form and then you can press start a free 14-day trial. Go through the onboarding questionnaire right here where they ask you a few questions just so they get to know you a little bit more. Okay. podcast submit. And you can also invite members into your workspace. Let’s just press skip. And now our workspace is starting up. Now, I do really like the onboarding um sequence that Enit has. Is really, really quick and is really, really easy to follow. Now, because you’re watching this video, there’s no need to press this video right here cuz I’ll show you everything that you have to know. Uh but it is a pretty good starting video as well. And this guy is a legend. All right. All right, once the workspace is ready, just press start automating, which will take you to a dashboard that looks like this. So, welcome to Nintend. Now, on the top, you get to see that you have 14 days left of your free trial, and you have a,000 executions, which is again the way that N10 charges you. And then on the top, you have upgrade now, which is a button to upgrade. I’m going to press X, and now we have this page. All right, so on the top right here, we have a dashboard that allows us to visualize the numbers. So, I can actually press inside each one and be able to see the different graphs. Now, production executions just mean that hey, how many executions? So, how many times did our automation run every single uh 7 days? How many times did the automation run but it didn’t work? Then out of all the executions that didn’t run in the past 7 days, how many of them did not work, which is this percentage right here. And then how much time did you save or how much time did the workspace save with these automations in place which is good to have but at the same time it isn’t super accurate because to understand how much time you saved for a company or for yourself any needs to know how much time did you take in the first place to do it right because then you’re saving them that much time and lastly runtime. So for how long are the automation running now right here and on the top as well you have the ability to create a workflow and this is how you start from scratch. This is how you start building. Now before we get to that we have workflows here. Then we have credentials right here, which is the ability for us to be able to add credentials for the different software APIs. Now, if you have no clue what APIs are, it’s how automations are basically happening, how they’re existent. I’m going to go through APIs in much more detail in the later stages of the video, so don’t worry. But here, we’re basically adding the username and password for each software. So, we always have it here. We don’t have to re-upload it again. It’s always a repository of passwords. Then, we have executions. So we can see all the executions which is hey this automation just ran it logs it so you have everything logged and uh secured here which is great. And lastly it’s data tables. Now I’m going to dive into data tables in this module I believe or next module um where I show you exactly how you can use data tables how they’re powerful how they’re better than using tools like Google Sheets or Air Table or Notion. So we’ll dive into that. Now without further ado let’s press start from scratch or you can press create a workflow. All right. And once you get to this dashboard you’ll be introduced with two different options. The first one is adding a first step which is adding a first step manually right here trigger which is the first step of the actual workflow automation or you can start using build with AI. Now build with AI is only something that depending on when you’re watching this video it only came out about a month ago. But when I press this button right here it takes me to this right page right here. Now the good thing about any is that it has two different types of support. It has the support where you can ask any questions about anything and you can simply type any message here and it will give you an answer sort of like an annot coach that helps you when you’re building your AI agents or automations. And then we have the feature which is build. Now build again is something that recently came out but it allows us to actually give it a prompt. So we can tell it hey what would you like to automate? And it actually builds a thing. I’m going to just do this real quick so you get to see exactly how it looks. I’m going to say AI agent that drops my emails and we have only 20 credits a month to use. I want to press go. As you can see now, this is thinking it’s searching through the nodes. I’ll explain exactly what a node is. Essentially is a step in an automation. It’s getting the node details. So, it’s understanding exactly automations in any understanding which steps to put together and what. On the left hand side, you get to see that this is working. Now, you get to see that it’s adding the different steps of the automation. And the best way to describe this is that it’s searching through a puzzle. It’s understanding exactly what pieces do I need for the puzzle and then it’s getting the pieces and then it’s putting the pieces together right here and then it’s connecting making connections inside those pieces which we have right here. And now we can start using the automation. Now I’m going to delete this and start from scratch because I want to show you exactly what it looks like without the build with AI. As you can see now we have no option to build with AI. We just have the first step. So when I press this I can see that on the right hand side it asks us what triggers this workflow. Now a trigger like I mentioned before is the first thing that starts the automation. Now in N10 we have the ability to trigger manually. So we can manually trigger this. We just press this button right here which is execute workflow which means that we’re starting the automation and it executes manually. We’re able to trigger from an app event. So something happens within any of these apps we can get notified and then it starts the automation. And there’s about 500 apps here. a bit lower than other platforms but N10 is constantly adding it here which is great. We have on a schedule. This is in case you want to start your automations maybe once a day or you want to run it once a week or every other Tuesday on a July. You can do this. You can do on web hook call. Now a web hook is something that I’m going to explain in a later stage of the video but it’s something that we use when we want to get notified when something happens. We have on form submission which is for us to be able to use forms inside of any end so that when someone submits the form it then sends us the information inside the form and then we can start the automation. Then we can do when executed by another workflow. So we can actually have a workflow that calls another automation right. So workflow calls another workflow and then brings the data back. Then we have on chat message in case we want to create a chatbot within any then we have when running evaluation. So this is in case you want to test the performance of your workflow or of your AI agent and then you can do other ways as well which in this case it’s using other different service. Now I will cover this in the later stages of the video but understand that a trigger is just the first step of the automation because let’s say we do it manually. Now we have the ability to then add the next steps. And so when we have the first step here the way that this works is that we have this connected to another step right here and I can choose the next step. In this case we have the ability to use AI in our workflows. We have the ability to use any applications, so any softwares, the ability to transform any data right here. The ability for us to have some sort of routting, which means that if we send the automation one way, if this happens, the other way if something happens and again all these things might look complex because you’re new to Nit, but trust me, they’re much easier when you actually put them into practice. We have core which is using code HTTP web hooks a bunch of stuff that you shouldn’t worry about now and human in the loop which is another feature that I’ll be explaining. So we have the first step then we have the next step. So let’s say I want to talk to notion or Google sheets. Let’s say Google sheets. Now we are introduced with Google sheets and these are all the actions that we can do within that software. Right? So with every software that we have, let’s say even Gmail, if I press on the actual software, I can see all the actions that I can do within that software. I can add a label to message, delete a message, get a message, get many messages. I can do a bunch of stuff within each software, which is where automation truly shines because it does the things that we don’t want to do or that we don’t have to do. And so let’s say I wanted to go back to Google Sheets. I can just press Google Sheets here. Action and app, which you find again right here, action and app. So in I can go Google Sheets I can choose the action that we want to take which is append the row and now we’re introduced to this page right here now every node has an input then has in the middle the configuration which is how do we actually set the thing up and then the output which is okay using the configuration here what was the output all right so I just made a Google sheet here that has name email phone number company row and address let me name this contacts now here if I go back to any the first step to building any kind of automation with different steps in the flow is connecting our accounts to these softwares. So we’re able to access them without us having to go to the actual software to do it. So right here you get to see on the top that we have credential to connect with which is just press here. You can create a new credential which means that you’re connecting your account and you’re introduced to this page. Now if you see ooth 2 service accounts allowed HTTP and you get overwhelmed don’t worry just sign in with Google. It’s just a simple login verification and you’re all good. I’m going to press the account that I want to connect to. You can press select all. So you’re basically saying, hey, I trust Nitn to have access to my Google Drive and my Google Sheets. You will get to this page which is connection successful. And you’ll be redirected here to Niten. I can make a name. So I can say Mikuel system account. So on press save. And usually what we have is also the date. And the reason why we add the name is because when you connect 20 to 30 accounts here, you want to know exactly what the account was. And so the only way for us to know exactly what the connection is is to name the actual connection. Once you have this here, now the resource is usually what is the thing that we’re manipulating. What is the thing that we’re taking and doing something with? In this case, it will be a Google sheet. The operation is always the action that we’re taking. So as you can see here, you have different options. We have create, delete, delete rows, get rows, update a row. You can do a bunch of stuff and in this case you have append a row which is create a new row in a sheet right here. The document is choosing the actual Google sheet which in this case is contacts right here. See how I just here and also what you could do is actually go to the ID or the URL of the Google sheet which I can find if I go here I can find in the URL here and the ID is usually right here and then the sheet which is a sheet within the Google sheet which in this case is sheet one. That’s a lot of sheet right there. Um, and finally, you have this right here. And so, this is where you start to map columns. So, again, what we’re doing here is we’re adding a row inside here. So, we’re adding a row into name, email, phone number, company name, role, and address. Which is why when I go back here, I can see that it’s asking us, hey, what are the different values that you want to send? In this case, for name, let’s just put James Arthur. Let’s do email. My email here, my phone number, my company, the role, and the address, so on. And now leave everything else as is. These are just other options that you can um sort of play around with, but there’s no need for that. And all we have to do now to actually run the automation is to be able to connect this to here. So this is saying, hey, the first step now is connect it to the next step. And so if I press here execute workflow, this should now start the automation and do the action append the row like we mentioned and adding these details in a new row. So let’s try it out. Let’s say I go to execute workflow. I can see that the first step executed. And we know this because it was all green check mark. And the second step as well. And if I go to my Google sheet, I can see now that James Arthur with his email, phone number, gem solutions, CEO in Spain was added to our database. And that right there was a full execution from the start until the end. Workflow executions from the first step until the last step. Now we can add another step which let’s say is Gmail. So I just type Gmail. I can choose a software here. And now I can choose the action. So in this case it can be send a message. And now we’re introduced to this page right here which is very very similar to the one that we had on Google Sheets. But the only difference now is that we have access to the previous we call them variables right because there are different variables here. And now we can use these variables in the automation. And that’s why we don’t call them variables but we call them dynamic variables because they change every single time. Because when I put name somewhere here and I run the automation again later if the name changes this automatically changes the name. So all I have to do here is do the same thing. So I can send a message which in this case is send an email. I can sign in with Google. I can choose my account. Select all. Connection successful. And now I can name this. Press save. X. And now we have connected our account to any. So now N10 is able to use our Gmail. The resource which is what is the thing that we’re manipulating again changing is a message which in this case is an email. And you can use draft thread label. You can do whatever. Operation which is what is the action that we’re taking. In this case, it’s sending, but we can do a bunch more stuff here depending on what you want to do. And then it’s asking us who do we want to send the email to? What is the subject line of the email and what is the message of the email, which is the email body. So now, as you can see here, when I pressed on two, it gave me the ability to drag an input field from the left to use it here. So now I can take the field from the previous step, drag this across over here, email, and have this be the variable that we use every single time instead of putting the email here, right? Instead of putting the email manually cut to5gmail.com, because if you do it this way, it’s going to be fixed. But if you take the variable from the previous step and I drag this across here, then only are we able to change the variable dynamically without us having to go here and change it manually ourselves. And so what we’re doing now is that we’ve just pulled in the variable here. We can do name. So pull this name here and say welcome to the team. And also one more thing that you start to see is JSON code. Right now, this looks very intimidating for someone looking to get started with automations and going into Nitn. But trust me, it’s actually quite easy because this code right here is literally just the variable here that we just pulled across. So, you don’t really have to know exactly what this is. But in case you’re wondering, we can actually hardcode it. So, we can do curly bracket curly bracket. This opens this up. You can do JSON dot the actual step from the previous step. So, you can go to let’s say email. And when you press email, it automatically takes us back in the same place as if I were just to drag this across. And this is great for us in case we want to reference any variables from the previous steps. And there’s a ton of variables and we just want to reference them really really quickly. We just manually hardcode it. But most of the times you’re just going to drag and drop. And then we’re going to ask the email type. So in this case, let’s just do text. HTML is just the way that you make your emails look pretty. We can say hey brother happy to work with and let’s do company right here. So now we’re saying hey brother happy to work with JSON variable which is company which is this name right here. We just don’t see JM solutions because it’s a variable right here. Now the good thing about N10 is that we can actually see the output. So we can see the actual variable before we run it which is amazing because now this gives us the ability to visualize whether it’s correct or not. So, James Arthur, welcome to the team. Hey, brother. Happy to work with JM Solutions, which is great. Now, what I can do is go back. I can go back here. I can change the email. So, let’s say this one here that I have, make [email protected]. And now, all I have to do is execute the workflow again from the start until the end right here. This now goes into Google Sheets and goes here. I can see now that I have the name, the email, and I guess the email changed, right? because we changed them manually in N10. The phone number JM solutions CEO in Spain. And as I showed you, it also sent the email. So if I go to my email here, I can see that we had a new email called James Arthur, welcome to the team. Hey brother, happy to work with JM Solutions, which is the exact same email that we added into our Nintend. And so now that we built this, I can explain exactly how the pricing works. So from the start until the end, right? When you are testing. So when we’re pressing this button and we are executing this, we’re not paying for it from the time that we want to set this live. So we don’t have to manually do it every single time. We can turn this on by pressing this button. So right now the workflow or the actual automation is inactive, which means that the automation is only running when we manually run it. When we go inside the platform, when we manually press this button and it goes here. But in the case for clients that you want to set this live, it’s sort of like this is just for testing. When you’re building automations, you’re testing here and there. And the lives when you want to actually set this live, it goes live. Now it works by itself and it runs through this at whatever interval you want. And the good thing about this is that we’re not paying for it when we’re testing, which is great because it allows us to be able to spam the testing as much as we we can because the way that they actually charge you is by word for executions, which is from here to here. As you can see, we have the green check marks which tell us that everything went good, which is awesome. Now, let’s say something went wrong, right? So, if I go here and I just create a new credential and I just save it. So, I just put a fake credential. Close Gmail account. This shouldn’t work. So, now if I execute the workflow, I can also execute it here instead of going here. I can see that now in the bottom, you can’t see it because my face is there. But if I just move myself here, I can see that I have problem in node here, right? Which allows us to see that we have a problem in our automation. And so this node right here, again, a node is just a square within any is a step in our automation. We can see that we have an issue. And it tells us the actual issue unable to sign in without access token, which means that the authorization, the actual account was invalid. And on the right hand side, you can also see if something went wrong, what is it that went wrong? And you can also ask AI, which is amazing because this AI is actually good. It’s not some sloppy thing that they just added into the software. It actually works and it’s pretty good. With that said, make sure that when you build automations, you always save right here on the top. And up here, you have the ability to edit. So, this is where we edit our workflows. Executions is where we get to see all the times that this executed that this ran, right? The first time it ran, the second time when we had more steps, the third time when we had even more steps, right? So we get to see exactly the previous times that are run. And then we have evaluations in case you’re running some more advanced evaluations. You’re testing your your actual workflow. If you’re building this for clients, you’re most likely going to use this, but it is not necessary to start. Going back to editor right here on the top right here, I have the ability for me to duplicate the actual workflow. So if I duplicate this, I have to rename this. And I can press duplicate. And this will now make the exact same workflow here. And then I have the ability to download. So if I download it now, I get a JSON file. And so the good thing about that is that this in the back end is all JSON, which is is all code. And so I can simply just press download like I showed you. And then you can press import from file, which allows you to import the automation into your own workspace. So if I go to a blank workflow, I can simply press this button right here. I can import from file. And now I can put the actual file that I need. And suddenly I have the actual automation which is imported into your my own account. And then finally, we have change the owner. So you can change the owner of the actual automation. You can rename the automation like this right here. And you can import from URL. So in case you turn the file into a URL, you can simply import it there. On the right hand side here, like we mentioned, we have the ability for us to add steps. We have the research. So we can command bars. We can actually search through the different notes that we have here. We have notes, which is a big part of Beniten because we can actually start documenting our automations. So I can go in here and I can say first step is manual and I can delete all this and I can put this over the automation which is great because when I want to give the automation to someone right I can actually give them an explanation of exactly how it’s working. If I go here I can also say this step allows us to be able to manually trigger the automation. Right? And so we have the text here and you can start to see how bigger automations and bigger workflows use this and it’s something that I use all the time when I have to give workflows in AI agents to my community members who are looking to get them and then start using them right away and now they have an explanation of what it is. Then we have right here focus panel in case you’re doing some note stuff here. We don’t really use this that much so don’t worry. Uh and finally we have AI which I mentioned is able to build the actual workflow. Let me turn this off. Which is able to build the actual workflow for us or is able to assist us whenever we have any questions about automations. Now, you probably might be asking yourself this question, right? Which is if we can build with AI, why are we learning this at all? It’s because AI only gets you so far. When something doesn’t work, how do you know if it doesn’t work? How do you know if it’s not good enough? How do you know if it’s not efficient? Which is where understanding the fundamentals is very, very important rather than relying on AI for everything. All right. So now that you understand exactly what automation is, how you can set up your own niten account, howen actually looks visually, plus building your first automation inside of niten. Now it’s time to go a level deeper because in the next module we’ll dive into actually understanding how automations really work. We’ll dive into APIs, web hooks, and how data flows within automations. We will look at credentials. We will look at transforming data and also understanding error handling. So if something goes wrong, what do we do about it? And lastly, understanding the core 17 notes that you need to know when you want to master N10. So by the end of this section, you’ll not only use any 10, but you’ll actually understand it. If I had to learn just one skill for AI automation, it would be understanding how APIs work because fundamentally they are the things that allow softwares to speak with other softwares. And so once you understand really understand how APIs work, you’ll be able to use nitend zapermake.com Power Automate all with no problems without getting stuck and without any limitations. And the problem is most people skip this. They go straight to the platforms to build automation step by step. And when something breaks, they have no clue why. So in this video, I’m going to break down exactly how APIs actually work, how to read an API documentation without freaking out, and how to build your first real API request inside of Venet. Let’s dive in. All right. So, API stands for application programming interface. Very fancy term that nobody even knows the meaning to. Uh, but what it means is the ability for softwares to speak with other softwares. Now, think of a waiter in a restaurant, right? This waiter has the chef and he has the customers. And between the chef and the customers, there’s a series of actions that happen, right? So, take the order, bring the order from the kitchen, they deliver the order, make the order. There’s a whole repetitive loop that happens over and over again. And so that is the exact same when it comes to APIs for softwares where we have one software here, one software here and these two softwares communicate to each other through a series of requests and responses. So request in this case would be to make the order. The response would be the actual order being delivered to their table. And that is the exact same when it comes to the softwares. And so fundamentally the waiter in this case is the API and the chef is one software and the customers are other softwares. And this right here is the thing that allows the softwares in make.com and it end to speak to each other to be able to have a sequential order. So we send data to a place and get something back. And that’s how automations and AI agents are built. Now what can APIs do with software? There’s a few things that APIs can do. We call them requests. So requests are just a way for the server, the API server to send information to the actual software itself to then create an action. Now the first thing it can do is post. So this is when any type of new record is created in a software. So this is like making a Google sheet row. It’s creating a contact on ClickUp, a contact in Hopspot, it’s um you know sending information to OpenAI to make a LinkedIn post. This is a post request which is sending information from one place to another. Then we have get. So get is extracting any details from any record from the software. So let’s say someone filled out a form on your website. You wanted to get the information from that form and then use it for whatever you want. Right now you’re getting information because the information is going from somewhere else to us. That’s getting information. Then we have putter patch which is updating records uh in a software. So let’s say John’s name is not John anymore. it’s James then you use a put a patch request right so updating information and then we have deleting so you can’t see this fully but it’s deleting a record from a software so let’s say we had a Google sheet or maybe a contact we just want to delete the row or delete the Google sheet or we just wanted to delete the contact that is a delete request so again post is to send information get is to get information then putter patch is to update information and then delete is to delete information from somewhere now I’ll share a story here so I was on a call with a client a while back and she asked to automate different parts of her onboarding process. And she used Zoho CRM as the CRM, which by the way is just a place for companies to store information uh to be able to send information to Zoho to make a new contact whenever someone filled out a form. Now, the problem is I had never used Zoho CRM. So, I had never used it. I didn’t know exactly what you can and cannot automate with Zoho CRM, which is why we get to the next part, which is finding the information of what you can automate and cannot automate within a software. So all I did is a simple Google search and I searched up the software name. So in this case it can be Zoho CRM Monday, it can be openi, it can be whatever it is API documentation. And this is where we get to the fundamental concept of an API documentation which allows us to be able to see exactly what you can automate within a software and how to set everything up. Now here’s an example of an API documentation. This is Apollo’s API documentation. And at first you think this is way too complex. But the reality is if you understand how this looks, all the others will be very very easy because they all follow a very similar structure. So the way that an API documentation works is that on the left hand side right here, you get to see all the types of requests. So this is enriching people, it’s searching people, searching organizations, creating an account. There’s different things that you can do within Apollo’s API, which means automatically without having to go to Apollo, right? And so each action right here, so each thing that we can do has a corresponding type of request that follows through. So people enrichment in this case would be a post request because we are sending information to the server and then it’s enriching the person. Then we have let’s say organization enrichment which is a get request or update account which is a put request right so we have different types of request and different actions that we can do using Apollo automatically within our automations and the only way to know is actually just looking here. Now let’s say we go to people enrichment. So this will now look at what you can do within that specific request which in this case is enriching people. And this request right here has the type of request and then has a URL. Now the URL is something that is very very important in our API requests because they are the thing that allows us to be able to send the information the right way. It’s sort of like going to google.com, right? The server knows that you want to go to google.com because because of the request, because of the URL. And so this is the exact same because this allows the server to know, hey, he wants to use Apollo and he wants to enrich people. Then in the middle here, it gives us a summary as to what it is, how it works and so on. So these down here are basically saying, hey, this is the type of request. So right here, this is the information you have to send to the server to call the request to make it happen. In this case, it’s enriching people and you have to send the first name and the last name, right? And those are the details that you have to look into understanding exactly what to send to the server. And on the right hand side, you get to see the um the actual setup. So how can we set this up in our automation platforms? And quick side note, the reason why we look at the API documentation is because here if I go to Apollo, I can’t find it. Which means that now we have to set up the API request using the documentation. And so the left hand side is the type of request. The middle is to show you the exact request and sort of to give you a summary of what it is and what it looks like. In the right hand side is saying, okay, we have the request, we have the summary. Here’s how you can set it up. Now, the main thing that we have to look at when we have to set up an API request through an API documentation is the curl. Now, the curl is the thing right here that you see which basically gives us a heads up or an understanding of how the request actually works. And if I go to any time right here and I go to HTTP request, which is the thing that we use to make the actual request, we can see that we have a button right here, which is import curl. And this will be the place where we import the curl, which is the one that we saw on the API documentation. And then this basically makes the whole request for us, which I’ll show you in just a second. Now, this will make much more sense once we actually build the API request, which is super damn easy. So, don’t worry. Uh, we’ll go through it step by step. But now you got to see what a structure of an API documentation looks like. And this is for a software called Apollo. Now if I go to the second API documentation, this right here is for a software called Instantly, which is a cold email software. As you can see, it follows the exact same structure. On the left hand side, we get to see all the actions that we can take. On the middle, it tells us this is the summary or this is what it is. And these are the different variables that we have to send to the server in order to make the action happen. And on the right hand side, this is the way that we set it up through a curl, which is in code, right? But again, we don’t have to know how to code. It’s just telling us the way that we have to set things up. And usually the curl in this case has a URL, which is the action that we’re taking, telling the server, hey, we want to enrich leads. We want to send this information somewhere else. And then we have the headers, which usually are a way for the actual server to authorize that this is your account. And the way it does that is through something called an API key, which we use for tons of things. OpenAI API key. We use claw API keys. Perplexity API keys. It’s just sort of a way for the server to know like a password to say, hey, this key is only for me for my account. So you can take action on my account and you know it’s my account if it’s this key. And then we have content type application.json. Sometimes it’s there, sometimes it’s not. It’s just a way for us to tell it to format the information in the right way. And then D, which is the body, which are these parameters. So these variables which we sent through to the actual server to make things happen. And if that confused you even more then just wait until we build the API request cuz it will be very very easy. And then the last API documentation will be ClickUp. As you can see I’m just showing you the example. So you get to see the reoccurrence in the structure of an API documentation which is the one right here. On the left hand side we have the types of requests. In the middle we have the summary, the URL, the type of request which is post uh the title and then here will be the parameters that we have to send through to the server to say hey here’s what you have to do here’s how to do it and so on and on the right hand side this is the way that we set it up which is the exact same and as you can see the thing that we really care about is the curl request because this is the right hand side part of these API documentations which allow us to be able to know exactly how we set things up and if you read API docu documentations. A lot of the times or most of the times you will see something that looks like these. These are three random API documentations and they all follow the same exact structure. So let’s set up the API request. Uh let me give you a use case. Let’s say we want to get the weather of a country or a location. Right? If you go here to weather, we can do the open weather map. But there’s actually this other software which is called the weather API. So if I go here to weather API, there’s this software right here, free weather API, which isn’t listed here, right? And this is when we start using the HTTP request. Okay, so HTTP request again like I mentioned before is on the case where we can find the exact software for the specific action that we’re taking. So we actually make our sort of custom API call which is saying, hey, even though we might not have an end, it doesn’t mean it’s impossible, right? we can still make the actual request which is where the HTTP request comes in. So all I have to do is go here put HTTP and then we get to this page. The first thing is the type of request whether it’s a get, delete, head, options, pat, post, put, which we went through just now and we have options head which I have never used so probably not something that you should know about. Uh then we have the URL which is the action that we’re taking uh which we get from the API documentation. Then we have the authentication which we’ll go through in just a second. And then we have the parameters which I mentioned will be here. And then also the body which is this right here right or you can also use JSON uh which we get from the API documentation. Now we’ll have to set one up so you understand. And let’s go to the free weatherapi.com. We get here and now I’m saying hey I don’t have it within any so I really have to go to the docs. And usually you find this here. So docs. All right. So this right here is the API documentation. And so all we have to go is to the request, right? So we have the getting started, we have the authentication, we have the request URL, we have a bunch of things, but the thing that we really care about is the bulk request, which is the request, which will be up down here, I believe. Yeah, down here, which will be the request that we will use as an example for the actual uh API request that we do within N10. So all we have to do is copy this, go here and set up an HTTP request, import curl, just paste it here. Now we can see that everything was done for us. We have the post, we have the URL, we have the fields, the key, the Q, which in this case would be um we can see here we can see that we can do the city name, we can do the US zip code, UK postcode and so on. Um which is required. And then we have the API key which is the one right here which is sort of a password that says hey this is my account this is um related to me just use mine and the body in this case we actually don’t need this because this is just an example so I can delete this and we can just work with this. So type a request which is post URL which is the URL that we do. So what is the action that we’re taking and then we have the key which is the API key which we find on my account. So when you make a free account, you can go here to the dashboard and up here you will copy the API key and paste it back here and then the Q will be the city name. So we can do London or whatever it is and I press execute step which will now execute the step. So as you can see here it successfully uh ran this and I get the weather. So the current weather, the temperature of that specific place which we can then use for whatever it is. Right? All right. So now you got to see exactly what it’s like to build an API request, an API call, uh, which we call and this is exactly what you can then use in between your automation steps. So let’s say we had a next node which would be let’s do an edit fields and we wanted to get the temperature. So temp temperature in Celsius 9.3. Yeah, thank god I’m not in London. uh I can execute the step and this will now call the server bring the data back and then here you can see that the temperature was 9.3 because this is a variable that we found here but again the reason why we using HTTP is because if I go here to free weather API it’s not listed here it’s not here right and any only has about 4 to 500 it has the main softwares but sometimes softwares that we want here are not here which is exactly why we have to then go to the API documentation and find or understand how we can set up the API request test. In this video, I’m going to show you how you can master and attend just by learning 17 notes. And these are the exact same ones that we use pretty much 80% of the time when building automations for clients. And honestly, these are probably the only ones that you’ll ever need. So, the first one is the trigger. Now, the trigger is essentially the first step of the automation. Like, what is that thing that starts the automation for us to then do the next steps? In any we have different types of triggers. Uh, the first one is a manual trigger. So we can just execute the workflow manually. Now this right here is something that we use most of the times just for testing, right? Because we want to test something. So there has to be a first step and that’s where we add a manual trigger. Now the second one is a schedule trigger. So this trigger right here is primarily used when you want to run the automation let’s say once a week, once a month or at certain interval of time. So if I go in here, I can see that I can run it um in seconds, minutes, hours, days, weeks, months, and even custom. So this is cron which you can put your maybe every 2 p.m. on a Tuesday or every 3 p.m. on a Friday of every month and you have different settings that you can put so that you’re able to um to run the automation at a very specific time of the month of the year of the week of the day right so to give you a use case let’s say we had a content system let’s say we wanted to generate content automatically every single day what we would do here is we would go to trigger interval which is days 1 midnight and trigger minute zero and this is where we put this as the first step of the automation so that it runs every one day at midnight of the week right so we’re able to run the autom information without us having to manually trigger it. And this is for the time trigger. And then we have the type form trigger. Now, this is just to show you an example of a trigger that is not native to N10. These two are native to N10, which means that N10 owns those nodes. But in this case, type form is not any. It’s a different platform. And so, Type Form itself is a platform that generates forms. So, we can generate forms. And this trigger right here starts whenever someone fills out the hiring form in this case. So I have the form pulled out here which is a form that is connected to this type from trigger and what happens is that whenever someone fills out the form this sends a signal to this node because it’s an onapp trigger. Uh that will allow us to then be notified and start the automation. So I’m going to press exit workflow. As you can see now this is waiting for you to create an event in type form which is waiting for me to fill out the form. I’m going to press submit and as you can see here this is now triggered and we got the data the name the email the phone number and location as well. Right? So this essentially is an on-app trigger which means that it triggers whenever an single app starts something or whenever something happens within an app that we can all find right here. Add another trigger. We have all these triggers and the on app event is the one that you can use for whatever it is. So these are all different softwares that can be the first step of the automation that triggers whenever something happens within that software. Now the next part of the nodes are going to be storage solutions. Now, storage solutions is just a fancy way to say we use nodes that allow us to store information in them, right? And so, typically we use Google Sheets, we can use Air Table, we can use notion, we can use any new native data tables which only came out a few days ago in order to store information. This could be a simple Google sheet that looks like this, which has full name, email address, location, and phone. But could also mean a data table within N10, which has name, email, phone number, and location, which is the exact same. The only difference is that one is stored in Nitn and the other one is stored in Google Sheets. So let me show you exactly what I mean here. Let me put the um manual execution here and I can see that inside I am adding a row. So append row means I’m adding a row in the N10 17 nodes which is the name of the Google sheet right here and I’m putting the first name or the full name as Melatory the email is this and the location is this. I can press execute workflow which will now run the step right here and it will add the row into the Google sheet which will be mik email and uh location as well and I can also add the phone which you can also add by refreshing and let me add let’s do 1 555 1 2 3 4 5 6 7 and if I execute the step again I can now see that I will have a new row that will be added here with email location and this as well. Now the reason why it gave us an error is because Google sheet doesn’t like when you put plus signs or equal signs and so on because these are native equations within Google Sheets. Uh but you get the gist here. You just store information into Google sheet. The second one is within the Nitn data tables. So let me connect this. And in this case we do the exact same thing. It will be new people because that is the name of the database. And we’re adding the first name or the name as Mikell authority my email my phone number and location as well. And if I press execute step, I can see that now it was successful. And if I go here and I refresh, I can now see that the data was added here. Full name, email, phone number, and location as well. Now, the amazing thing is that once you master Google Sheets and Nintend’s native data tables, you can pretty much use Air Table, you can use notion, you can use Asana, ClickUp, all these places where you store information, they’re all very, very similar, right? So, if you understand one, the setup will be very, very similar for the other ones. All right? So now we get to the universal data processing. So here is where we manipulate data, right? Manipulate data just means that we take some sort of data that comes in and then we structure it in a way where it makes sense for us to structure it in. Now in this case I want to take the um manual execution here. I’m going to attach it here. And I can see that inside the edit node if I execute the step I can see that I have an array which is basically a list of people’s uh information. So we have name, email, phone number and location. David Smith, David Smith, Emily Chan, Carlos Ramirez, and Asia Khan. And these are basically giving me the different pieces of information. Now, the only problem with this is that let’s say we want to add this to our Google sheet. We can’t because this is an array, which means that it’s inside this right here. So, this is where the split out comes in. So, what this means is that if you want to process each name individually, right? If you want to process this right here individually, then this right here, then this right here, and this right here, and this right here as well, then we have to split them out. We have to take them, as you can see by the diagram here, it’s taking them, which is a singular thing, and then it’s splitting them out based on the amount of items that are in the array. So, let me just show you. Let me just run this right here. And let me show you that now we have five items. So, as you can see here, it went from one item, which is the array, to five items. And so what we’re doing here is we’re processing each person’s details individually through the automation in the next steps. And this is splitting out. So this is when you have an array and you want to split out each item of that array. Now aggregate right here is the exact opposite. As you can see the diagrams are opposites. And so what we do here is just bring it back to the way it was before. Right? And if I press execute step, I can see that now I have the array that is back there which is one item. So you can see we have one item, five items and one item as well. Now, typically you would use split out whenever you have because a lot of the times we get data all within the same array. We get a bunch of details, contacts and so on all within one singular item. And so what we want to do is go inside that item and take them out of each one and process them individually in case you want to add them individually to let’s say a native data table or even a Google sheet, right? You have to process each one individually for it to actually make sense to add them to a database or whatever it is that you want to do. Whilst this node right here basically when we have a lot of information that is a lot of items and we want to put them all together smash them all together to then send them through to the next steps right so it’s aggregating data so it’s not everywhere it’s not in different places it’s all within one place then we get on to the logic which is if so this is saying if this equals to this then it’s true if not it’s false so if I say in this case let me just uh take this out there we go right here so let me say if the name contains um contains Sarah which should only be one name then we send it through the true route right so if I go here I can now see that only one went through here and the other ones went through here now this is great because automation again is logic so if you want to send the automation in different ways based on whether something is true or false then you can use the if node right here now the switch node is a bit different because it gives you more flexibility right let me I show you exactly what I mean. Let me say right here inside I have options to basically route the automation. So I can say if the name equals to Sarah Johnson if the name equals David Smith then we can rename the output to Sarah rename the output to David. And what this will do is that it will run through every single one and the ones that are Sarah or Sarah Smith in this case. Sarah Smith, Sarah Johnson, it will send them through Sarah. And if it’s David Smith, then it will send them through David. So if I run this, I can see that we only have one item and one item here because those are the only ones that applied to the logic. And so how is this different from if? Well, if only gives you the opportunity to add conditions, but don’t add more than true or false options. While here, you can put as many options as you want. And this is great because you could have a use case where you have emails. You categorize the emails based on whether they’re FAQ, whether they are uh promotional, whether they are just normal, whether they are something else. And an AI categorizes it. And then you can use a switch node to then say if the email is FAQ, then you send it this way. If it’s something else, then you send it this way. If it’s something else as well, because you can keep adding root rules. You can say if this equals to whatever, just hello. You can rename it to FAQ. And this will be another option, right? And you can do as many options as you want which is amazing because that allows us to be able to route the automation based on the type of input or the output that we get in the previous step. All right. Then we have the code node. Now the code node is amazing uh because it allows us to be able to do a lot of things at once and code is one of the things that again a lot of no code platforms don’t have because in the name no code. Uh but the fact that Enit added the code option here made it so much easier for us to be able to to transform information from unstructured to structured in the easiest way possible and it’s very very fast. Yeah. So let’s say we have the array here which is the exact same as we had before which are just a bunch of names that are all uh within the same array and we can process each one individually. Now what we can do with the code node using code and by the way if you’re asking how did you write the code? I just said split out the items from the array and the array is this. And then if I run this, I can see that now really quick it uh split out the items in five different um separately. So now we can go through five items individually. Now this did the same function as this. So this wouldn’t make a lot of sense. But if you have something a lot more complex and you need the data to be transformed in a way where it would take you seven or eight different nodes, then you can do it all within the code node. Now I’m not going to get into detail about this because again, we’re all here to not write code, right? Uh, but just know that you have this option to be able to write code with Nitn and it makes it a lot easier to do more complex stuff. You won’t really need them for most of the time, but just knowing that you have the option there to use gives us a lot more flexibility when we’re building automations. And then we have the merge node. So, let me actually set this up. All right. So, for the merge node, what I did is I put two different fields. One is hello yo and then the other one is hello ciao. And when I run this automation, it will run this one first and then it will run this one. And let’s say I put a wait node here where I can put two two seconds just for it to wait two seconds. I can show you that this right here will run first and then it will run this one. Right now let’s say that we had an automation where we had to run this and then we wanted to run this and then we wanted to go right without us having to go through here first and run the whole automation and then run through here first. Now let’s say that we had an automation that we start here and it goes two different ways but then we want to aggregate the data. We want to send the data in the same way as two different inputs, input one and input two to then be able to take both pieces of information to then be able to go to the next steps. So that’s exactly what the merge node does. If I go here, I can see also I can add more inputs. So if I press four, it basically uh it can it can intake more inputs at the same time. In this case, I can do two. I can execute the step. And now we can see that we got two items. One is yo and one is chao. So what it’s doing here it’s it’s aggregating both of them together. Now there are other options as well um to combine to then SQL query. So we can query different things or different data points and then we can also choose a branch. Now honestly the one they’re mostly going to use is going to be combine and it’s going to be append. Now append in this case will be output each item individually and combine is taking these two and just putting them all in the same sort of array that you can use for the next steps. Now, here’s a system that I built that uses the merge nodes, three different ones. Uh, and the way that this works is that we have um the LinkedIn post which is made, the Facebook post was made, and then we want to merge them. So, we have the Facebook post and the LinkedIn post, and then we have the Twitter post which is made, the article which is made, and then we’re merging these two together as well to then finally merge all four things together. So, we can directly send them to the Google sheet. And the reason why we’re merging them is because if we run each one individually, then we would have to set up a new automation for each row at a single time to add them to the Google sheet, which we can actually just remove by just merging them all together in the same sort of structured way, different items to then send them to the Google sheet. So the next nodes right here are going to be connectivity and API. Now API is the most important skill when it comes to automation. And if you haven’t watched my video about fundamentals of API, just watch it up here. Um, but it is the reason why apps get to talk to other apps, right? It’s the reason why this app right here can talk to an attent but this app right here can talk to this one right or we can just talk to each other um in different ways. So in this case the first node that we have to learn is the HTTP request. Now this is one of the most powerful nodes in any because when we go here and I go to action app. So this is taking an action within a single app. We can see that we don’t have an infinite amount of nodes, right? Like we can stop here and then what? What if we have a software that we want to use but we can’t find it here. What do we do then? Well, in this case, we use the HTTP request. So, let’s say I wanted to use the free weather API which gave me the API of the weather. And if I go here to NN, I can’t see any app that’s called free weather API. So what I have to do is I have to set up the HTTP request of the few other API which I can find in the documentation right here. By the way, I covered this in a API fundamentals video. So if this makes no sense to you, please go watch that video cuz it will help a lot. Um, but this right here is the API documentation which is essentially a documentation which allows you to see exactly what you can automate and what you cannot automate within a software and also how to set up the automation. And so by looking at this um documentation here, I was able to set up the um the automation of the weather API which looks at the temperature in London right now. And if I execute the step, I can see that now I’m still able to actually run the automation. I was still able to use the software without having to use the software here which are already pre-made by 10. And you can see here we have the different outputs. So London, we have the temperature, degrees in Celsius, Fahrenheit, and different other informations as well. Then we have web hooks right here. Now, web hooks are a way for us to get notified when something happens. So, let’s say someone fills out a form. Well, it sends a data to the web hook. You remember this right here, the type form trigger. Well, behind the type form trigger is actually a web hook which allows us to be able to get notified when something happens. Well, in that case, it’s whenever the form is being submitted, it sends a data to the web hook through an API. Right? So, right here we have the test URL which is used for testing and production URL which is used when the automation is set to active. And then we have the different type of HTTP method which again is very similar to there because we have post. We have all these options and these are the same ones that we have here. And then we have the path which is just the way that we uh that we name the URL. And then this right here is a thing that you would connect to the software itself to then be able for us to get notified when something happens within that software. And respond to web hook will be the thing that will then respond back to the server that we got the information from. Now, to show you exactly how it works, what I’m going to do is use a software called Postman API, which allows us to send example uh test data to the web hook, right? I’m going to go in here, copy this. Make sure you change this to post request. And then I’m going to paste this here. Make sure this is the post request as well. And then the body will be what is the thing that we’re sending the web hook. In this case, let’s just do full name, my name. Let me run this here. I’m going to press send. This will now start the workflow. As you can see here now we started the workflow and we sent the full name here which is the body right and this is how we send information from one server to another through a web hook. Now let’s say I had this connected now all I have to do here is I have to change this to using respond to web hook node. And here um what we can do is we can just respond with workflow as finished. And so when I run this, I send this here, I can see that now we get the data workflow has finished. Now this is amazing when we are sending data to a software or to a web hook in this case and we want to get something back. So let’s say we send the signup link to a user in some sort of software, he signs up, we get something back. Lastly, it would be the AI integration. So this is one of the ones that are most uh commonly used. Um first one is the AI node. So this is just to create something with AI. So in this case we can say create a LinkedIn post about life and here we have our openi connected the resource is text the operation which is the action that we’re taking is good uh the model it can be um you have a list of models here you can use GPT4 or latest or you can use whatever you want and then you have the prompts right here the prompts there are three different prompts that you can write the first one is a system prompt the system prompt is a prompt that you tell the AI uh you give it an identity so you are a helpful intelligent XY XYZ assistant. Then you have user. So user is when you tell it to do something. So your task is to do XYZ. And assistant is when you give it some examples. In this case, let’s keep it simple. I’m going to press execute step. And this will now create a LinkedIn post about life. And as you can see, sure, here’s a thoughtful and professional LinkedIn post about life. And then it gives me a whole LinkedIn post that we can then use. Now this AI step is used whenever we want to have some sort of data or some sort of input sent to AI just like we would on chat GBT automatically and then give us the output for content for any structured data that you want structured for anything pretty much that you can think of AI playing a role in the automation just as a linear thing for it to do just that task in specific only that task and then we have the AI agent if you haven’t watched my AI agent 101 video make sure to watch it up here uh it explains exactly how you can build your first AI agent from scratch using N10. But the AI agent is the reason probably the reason why uh N10 blew up so fast is because it had now the um opportunity for us to use something that was connected to AI that could think through or that could remember the different conversation we had, but that was also uh hooked up to different tools. So in this case, if you scroll down, we can see that we hook it up to Gmail, we can hook it up to Air Table, we can hook it up to well, pretty much anything. uh we have all these different softwares that we can use to then be able to connect it to the AI agent for it to actually take action and a good thing is that the Gmail tool can be connected and the air table tool can be connected and the let’s say notion tool can be connected and you can have as many connections as you want and this acts as a personal assistant that allow us to be able to take action on different things based on the input that we give it. So in this case what it would look like is we would have a trigger which would be usually it would be an on chat message which means that we’re chatting with the AI agent itself and if I open chat I can now see that I can speak to the actual AI agent something that you can’t do with AI step. So I can say hello what this will do is that it will then talk to its AI. It will remember the conversation and then bring it back. It’s sort of like a person that we’re talking to. And the good thing is that the person itself has access to our software which is amazing because now it can take action on our behalf based on the input that we give it. So if we say draft an email it will then go to the Gmail tool and then do its thing. Same thing with air tableable and same thing with notion. And the use case that you can think of this is pretty much anything any task that you want a singular input data store. So you basically have let’s say one chat message right where you have one place and through a series of inputs. So through a series of send Gmail, send an air table or create a notion task or whatever it is, it takes actions in different softwares without us having to create a new automation for every single uh action that we want to take. In this video, I’m going to walk you through everything that you need to know about data transformation and using JSON within your automations. Now I know this topic scares quite a few people and it scared me coming into automation as a beginner with no technical knowledge but it actually is quite easy and very very important to understand. All right so JSON 101 JSON stands for JavaScript object notation. So if you see JavaScript here and there it stands for JSON cuz it’s JavaScript. So J S O N right here. What it is? It’s a way for servers to store and transfer data. Right? It looks like text, but it’s structured so computers can read it. Now, the best way that I can describe JSON is English for computers. It’s the language that computers use to speak to each other, right? And that’s why it’s very, very important for us to understand it because pretty much everything is built in JSON, right? APIs, which I spoke about in another video up here, uh, config files, databases, but also your favorite platforms like make.com, Nitan, or Zapier, they’re all built on JSON. It’s crazy to me that people still don’t understand that because behind the nodes, the squares, and the the steps, if you really look at it, it’s all JSON. That’s why it’s very very important to understand. Now, we use a very basic structure uh in JavaScript. When we write JSON, we use key value pairs. So, the keys are strings. They’re always going to be in quotes. And the values can be string can be my name, number can be an age, boolean which is true or false. Null when you get no data it’s going to be zero zero data object which is basically a JSON inside the JSON and array which is a list of items which I’ll walk you through step by step. So these are all the different types of values that you can get using the key. Here’s an example of a basic key value pair. We have the key which is name. We have the value which is mika in quotes because it’s a text string. The age which is key right which again is in quotes because it’s always a string. The age which is not in quotation marks because it’s an age so it’s number. Then student and then true which is boolean true or false right? So we have again name key and key and these are values but they’re different types of values. Now arrays are ordered in a list inside of the brackets. Now let’s say you go to the grocery store and you get the groceries, right? The groceries isn’t one thing. Groceries is a list of items inside the key which is groceries. And so this is the same exact example when we have skills. So the key is skills and the value is automation, AI, notion which are my skills. And so why do we use these? Well, we use this when we have the same key like groceries or skills. But we want to add multiple items in the array, right? The array is just the list of things um to to explain the key, right? To explain skills, to explain groceries, to explain whatever it is. We have nested objects which are JSON inside the JSON and for example we have the key which is person the key is also name but the name is inside the person so it’s JSON in JSON um and then we have contacts which is email and phone number so we have different pieces of information but it follows a very clear hierarchy. Hierarchy just means what is the first thing that you should see and then what is the next thing and what is the next thing. Of course, the first thing is person. The next thing is names. And we have contacts within the name. And we have email and phone number. And then we close off with three curly brackets because we start with 1 2 and three. Right? So nested objects is usually the thing that we always use. And that nit make.com usually uses when they want to show different types of data inside the data, right? So you might have a Google sheet and the Google sheet might show the ID of the sheet. It might show the sheet name. It might show the row values. It might show different types of things. And so to show those things, it uses the nested objects. And so JSON applying into APIs. And if you’ve never heard APIs, it’s just basically how a software speaks to a software. How these softwares are actually able to work is through APIs. This is a HTTP request, which is a request that we send to a server to do something. So in this case, we have a curl, and a curl is just a bunch of JSON. Now, don’t worry about what this means, but this is a request. This is something that we sent to the server saying, “Hey, can we get something? Can we can we do something?” Right? In case you want to get new rows or you want to add a row to Google sheet or you want to add a contact on ClickUp or do something else, this is what you use. And then the response, which is always going to be in JSON, looks like this. So let’s say we’re looking for users in a software, let’s say. And the output that I get is the ID of the user, the name of the user, the email, whether the user is active or not, and the roles of the user, which is an array because it can be different roles within the same person. And so we have the keys which are all inside the quotation marks because they’re all strings. And we have the values but the values can change based on whether it’s a number, a string like this, a boolean or just an array. So how does this now apply to end? So if I go to edit first step, I can add a manual trigger which is just a first step of the automation manually. And let me add another node which is edit fields. Now this node right here is very very important and it’s something that we typically use to transform data which is getting an input which can be a name it can be a bunch of values then pulling it here right inside the edit fields node which transforms the input and then gives us the output. So if I go here to mode I can see that I can do manual mapping. Let me zoom in or I can actually write things in JSON and this again is the key value pair key value which is the exact same as the thing we spoke about. Now if I go to manual mapping I can now start adding fields to set. So I can say my full name is Mika Tori right and I can say that this is a string. Why is it a string? It’s because it’s text. If I put number and I ran this would be null because there is no number. It’s just text and it deletes it. Right? And so if we go back to string put my name. What I can do here is execute the step which will show me the output in schema which is basically the way that we all look at it because it looks a bit messy in JSON the table version or JSON right so if you’ve never pressed on this button JSON this is what it looks like we have an object right here we have the key and we have the value right here now let’s say I wanted to do age and we do um 20 if I execute the step now you can see that the object right here is increasing in the size because there’s a new key value pair. And bear in mind that this is text right now. It’s not a number. So if I wanted to change this to a number, look at the color list. It changes the actual type of output, but it changes the type of output that comes here to 20. Let’s say I wanted to do boolean. This is true or false. I can say student false or you can do true. So we’re saying, hey, his name is Mik Torti. He’s 20 years old and he’s a student, right? And then you can also be adding an array which in this case can be skills like we mentioned before and you do square bracket square bracket to end it and you put skills. You say notion you finish it off then anything then make and then you do something else right but we are adding items inside the array which is here and here which are items right here. Boom. Now if I press execute step this will now show the skills like this. It will show the full name. It’ll show the age, the student and the skills right here which are wrapped up in square brackets right here. Notion make and so on. And finally we have the object right and the object can be a summary. Let’s call it summary. And let’s copy this full thing this whole object because this is an object again from here to here. And I can paste this here. And if I execute this step, this will now add the new object that we have which is called summary. And we have this again which we just copied up here. Now why am I showing you this is because typically when we get inputs from the previous node, the previous step, we send it here to then be able to change the data. So let me show you an example here. Let’s say I have let me delete this. Let’s say I have the full name and I wanted to get just the first name. So let’s say I run this and I have the output which is full name. Let’s say I add another edit node right here. I can go here. I can remove this. And now let’s say I wanted to take the full name and I wanted to transform it into just the first name. What I do here is I press here. I can say first name. And if I go here to expression, I can put curly bracket curly bracket. And now inside here, it says anything inside the curly bracket curly bracket is JavaScript, which is JSON, right? All right. So, we’re saying I can actually reference previous variables using this. So, I can say dollar sign JSON, which is the way that you start where you want to reference some sort of item here, dot full name, right? Which you got right here, full name. And so, that is how you can reference these variables from the previous steps to the next steps. And that’s how dynamic variables work, right? Because they are dynamic, they change every single time. Cuz right here, if I ran this, I would also have the first name, which is Nicola Torti. But if I go back here and change it to James and I ran this again, this will now be James, right? Which is why it’s dynamic, which is why automations are brilliant because they change data and you can automate the process. So you don’t have to do it yourself. So okay, let’s say we have the full name here. Let me go full screen by pressing this button right here. And let’s say I wanted to take this name. I just wanted to get James. Now inside N10 and the reason why I would say for a beginner it looks a bit technical uh because of this because make.com doesn’t actually show you this but that’s what it is in the back end I can after the whole variable. So full name which again is this what I can do is actually use some formulas. So I can put dot which now allows me to see different things that I can do with this full name. I can split the first name which we’re going to do. I can check whether the um the name includes something, right? So you can see here whether the team includes T and it says true. And so these are all formulas that you can’t use within your um the full name. Honestly, you’ll probably use maybe five or six of these. So don’t even worry about understanding each one. U one of them that I use a lot is split because I usually want to split the full name so I can get the first name. So in this case, what we’re doing here is we’re getting the full name which is James Torty. What we’re doing is saying, hey, let’s split this name by the presence of a space. So it gives me this, which is first name, and then last name. And then we want to get the first first one, which is James. And that’s the way that this works because everything in JSON is logic. Everything in code is logic, right? So if you put logic here into this automation or not automation in this variable, then you’re saying, hey, let’s split this by the presence of a space. So we do the apostrophe here and we actually put the space on our keyboard. So now we can see that we have the first one and we have the second one. And now after we put split then we want to put dot first because we’re returning the first element of the array cuz you can see here this is an array right because it has this comma this comma that right so let’s say I had the full name being James Torty Arthur. It will then be Jamesa Thory comma Arthur. And so after this we want to put first. And this is how we get James. And that’s how in emails you can turn the full name into a first name by using JSON and by using formulas within the JSON. Now you’re looking at this right now. It probably looks very overwhelming and it was very overwhelming for me at the start as well. But when you understand the ones that actually do matter cuz let’s be honest, you’re not going to be using all these. They work very well, right? Like if you understand split for example and understand that this is the formula they use every single time to split a full name from something else then you’re pretty much set. That’s it right. And the good thing is that you have an AI on the right hand side that you can ask any questions to which can also help you. And so that is how we can transform data. We can take some sort of full name. We can then use some formula and then we can output the first name right from here to here. And that is data transformation. That’s how we use JSON to be able to take an input and turn it into something that’s an output. And quick side note here, if you’re wondering what’s behind this, I mentioned it’s JSON. Let me show you what I mean. I can copy this. I can go here and if I paste this, this will be JSON because these are nodes that have parameters that have different stuff which are all JSON. And the reason why this and make.com works very well is because we don’t have to see this. But just know that behind this is this, right? So it’s all JSON. That’s why understanding JSON is very very important because it gives you the understanding of how things actually work together and how the English language in computers actually works. Now that we have this full name and then going to the first name now we can add some branching. So we can add some some conditions and we can add if. So if is saying hey if this variable which again we can get by doing curly bracket curly bracket JSON dot first name. So JSON dot the variable that’s here right JSON do first name equals to James this will say true true branch and if I go outside of here I can see that this is a true branch this is a thing that is true then we can now send the automation one way if that specific criteria or condition is true and if it’s false let me go down this way and for example if I change the the name to Mikuel execute the step now this will be a false branch so this will go down the false and again behind this what it does is that it uses this variable. It then says, hey, is this variable equal to this? If yes, then it’s true. If not, then it’s false. Because again, everything relies on logic. Everything is logic in automations. Whether you have this or whether you have this conditioning in two different paths. All right. So, right here I have an AI agent. So, we’ll see how JSON actually applies within the AI agent. I can open chat and I can say hello. And what it’s doing now is it’s it’s sending the information here JSON which is session ID action and chat input which is the thing that I just told it to do. So these are different items that we get as an output from the actual thing. It’s transferring the data. So what you see here the line is actually just transferring the data here to this AI agent which is given the chat input as an example in JSON here. Then using the chat input is then talking to the actual open AI by giving a JSON again which is messages right here. And then the output that we get using OpenAI is this. Hello, how can I assist you today? Which again is the output which goes here. Hello, how can I assist you today? So everything that you see within your automations, data here and data there or some sort of variable going to the AI agent and then going to something else, it’s all JSON. That’s how data flows within different automations. And so let’s say now I wanted to take action on my email. I can say send an email to mika.25gmail.com saying we have uh football tomorrow. I can press go. This will now send the data here. It will then call the tool and then it will send the email right and if I go inside here I can see that this is the input. The messages is the input, the subject line and the email body and the output is the response which is the email ID that I just made, the thread ID which is a thread of the email and then the label ID telling us that this is sent. And this right here is an object right right here the same way that it was person name, it was contact, it was whatever it is. All right. And lastly here we have a form that I just made. If I go to the form, I can see that I have the full name, the age, and the date. So I say the age will be let’s say 20 the date let’s say the date is today the 20th I can press submit what this will now do is it will send the data to our automation and we get back the full name which is a key value key as you can see here this is a value but it’s not in quotation marks because it’s a number and then everything else is a key value pair with this because it’s all a string it’s all text now some fundamental rules to remember for JSON is that the keys must always be in double quotes. The keys right here, name must always be in these two quotes because it’s always a string. If you don’t put it that way, it’ll break, right? The second thing is to understand the difference between string, number, boolean, null, object, and array, right? and how these sort of function because then you’re able to understand JSON as a whole because it is just that it is just strings which are text numbers which are just numbers with no quotation marks boolean true or false null no data object which is JSON inside the JSON and array which is a list of values then we have the third rule which is separating pairs with commas so we have the key which is name the actual value the next thing the next thing and then the last one doesn’t have a comma the one nearest to the actual curly bracket which finishes of the JSON structure. And lastly is wrapping the whole thing in quotation mark if it’s an object. And an object in this case is just a list of key value pairs, right? Key value, key value, key value. And we wrap up the whole object using curly brackets here and curly brackets here to finish it off. And if you’re someone who’s serious about starting and scaling your AI agency, then you might want to check out the first link down below, which is a video that walks you through our one-toone mentorship program, which is a program where we get to work with you onetoone to help you start and scale your agency to 10K a month. Web hooks are by far one of the most powerful thing within automation. Yet, most people still have no idea how they work. So, today I’m walking you through exactly what a web hook is, how you can use it in real life, and how you can set it up within your own end. So by the end of the video, you’ll be able to use it within your own automations, even if you never touched it before. So let’s dive in. So what a web hook is is essentially a URL that allows us to get notified when something changes within an app. So think of it as someone coming into your house and ringing your doorbell. As soon as they ring your doorbell, you instantly get notified, right? And we usually refer to this as an instant trigger. That’s exactly what a web hook is. As soon as something happens, we instantly get notified in the web hook. Now, the business use case to this could be someone filling out a form. So as soon as the user fills out a form whether it’s in the website or something else we instantly get notified. So the web hook receives the data meaning receive the responses from the form and then starts the automation which is the one right here. All right. So let’s jump on to any end right here real quick and we can add the first step. So adding the first step just asking us what is the trigger? What is that thing that starts the automation as I mentioned when someone fills out the form the first step will be the web hook because that’s the thing that allows us to actually start the automation. Now the web hook can be found here. So on web hook call we can obviously trigger manually on app event on a schedule form submission. We can do a bunch of stuff but the web hook itself is this one and it runs the flow on receiving an HTTP request. Now HTTP stands for hypertext transfer protocol. Very fancy way of saying that data is passed from one app to another when we get notified right. So when we tap on here we get introduced to this page right here on the left hand side is basically pulling in from the web hook. So it’s listening for new events. So when we press this button it now the web hook itself it’s listening for notifications coming from some server some sort of server. till I stop listening and in the middle this is the configuration and on the right hand side is the output. So when we get notified the notification will show up here. So right here the first thing that we see is the difference between a test URL and a production URL. Now this is quite misunderstood between uh what they are but a test URL. So if you look at the the actual thing the actual URL in this case it says test but production doesn’t have test. Now when you want to deploy which means that when you want to activate your automation you typically want to uh use the production URLs. That’s the main use case for this. But you can use the test when you test and production is again when you want to activate your automation. Now right here you can see that you have a URL. So again the web hook itself is URL that’s accessible to anyone. It’s literally it goes on the web. It’s just a normal link that you can use for anything that you do. So if I press here I can actually copy it and I can go to to Google and actually search it. But again this is a thing that allows us to actually get notified when something happens. And we also get this this long string. So this is the the unique part which is 38 26 BB 2D 9056 and this is the path. This is what we call a path. Now the path can be changed to something else like hello right hello whatever it is or we typically want to have a long string. It doesn’t really matter but again this can be this can vary. This can change right and it doesn’t really matter what you put here. Now when it comes to the web hook itself we have different types of method. Now when you want to get notified from a server you typically want to use one of these different HTTP methods. So the HTTP method can be a get which is getting information head patch post put and delete. Really the only ones that I’ve actually used after building hundreds of automation is get and post. So a server could say hey I’m sending you the notification but it needs to be a put request or a post request or get request. Right? So this is the thing that you put here. The path again I explained which is the last part of the web hook. Authentication is basically saying do you want to add a password? So only you only the people who know the username and password can actually access it. You can use it but I don’t really use basic o and header or JSON web token off. It doesn’t really matter like the difference between that doesn’t really matter but just know that they’re used as a way for us to say hey don’t breach across this point. You need to have a password to actually use it. So that’s what we use authentication for but typically I would have it as none. And then for the response we have immediately we have when last note finishes. So immediately just means like when this happens immediately send the data here we can have when last node finishes return the data when the last node which means that the last step of the execution is finished the last step of the automation and then it sends the data back and we can use a respond to web hook node which I’ll show you in just a second and then streaming as well which we don’t really use uh so don’t worry about it too much and then we have different options so for options I would usually have the raw body so in case we need it but for most of the times because we’re getting notified because we’re getting something we wouldn’t use any options but you can have the opt option to basically have some different options here that you can use for the different types of requests that you’re getting but typically we wouldn’t put anything here. So with that being said if we go here to web hook when I spoke about the respond to the web hook we also get a web hook response respond to the web hook. So what this means is that when we get notified from the server we can actually give it a response back to the server. So let me show you what I mean. So because this is accessible on the internet I can copy this I can listen for the test event and let me just go like here and then I can see that now the message says workflow has started. So if I go back here I can see that on here I get a bunch of output. So I get the user agent Mozilla which is basically telling everything about my browser a bunch of Kodi stuff that you have to worry about but just know that because we opened it on the browser it’s basically giving us a bunch of information that we then can use for the automation. So, let me show you exactly what I mean by respond to web hooks. So, let’s say we add this here and I go in here and I say all incoming items. So, we’re basically saying, hey, I’m going to give you back everything that you gave me. So, if I execute this workflow, I think I have to change this to yeah, you respond to web hook as well because this is the response. Execute the workflow. And now I go here, I can see that I get a bunch of different text. So this is exactly what sends to us. But because we’re sending it back, we get everything here. So that’s why it’s sending us everything back. All right. So you understand what a web hook is now. You understand sort of the different things, the different settings. Let’s actually put it to work and see how it actually works in a business case scenario. If I go here, let me just put it in production mode. And let me copy this. Um the workflow that we’re going to basically make is starting from a type form, which is someone filling out a form. And then we can add it to let’s say a Google sheet. and then we can send an email back to the person that filled out the form. So, let me go to type form. So, this right here is the type form that we’re going to use for this test right here. It all starts with full name, email, and what are you looking for? Very, very simple. You can obviously add more details like company name, budget, whatever it is that you have. Uh, but let’s start here. I want to show you exactly when we fill out this form, how does it send the information to NN. So, let me go to workflows. Let me go to web hooks right here. So, you can connect with any app to send responses or trigger actions, which is exactly what we want. We want to add a web hook which will take us to this page. We can add a web hook. And then here is where we go inside and we actually what is it? Production URL. Let’s copy this and let’s put it into here. And we can save the web hook. Now once this is done, we can we typically want to send a test request to make sure that it does work. So let me go here. Go inside and listen for test events. I can send a test request. And now it’s giving me an error. So let’s see why it gives me an error. So below on the response we can see the workflow must be active for a production URL to run successfully. You can activate the workflow using toggle. Okay. So this is what I meant before. So if you go here, I just pasted the production URL. Let’s do the test URL because again the production URL only works when you activate the automation. So let’s do test URL. Let me copy this. Let me go here. Let me replace web hook. And now we can test it again. So let me listen for event and I can test the request. In this case it’s giving me another error. So let’s see the response. And now it’s telling me the web hook is not registered for post request. Did you mean to make a get request? So now this is goes back to the fundamental where I told you some servers ask us to do a different request. So in this case for the HTTP they say hey this is not set up to do a post request. So all we have to do is set up to the to do a post request in this case. And then we can try again go here and then send a test request. And now it should be successful right at 200 which means it’s all good. The workflow has started. And if I go back to end I can see that we have the output which is successful right which is everything. Okay cool. Now now that we know that this works and we know that we get a request whenever this is post and is test just to test until we set it to active. We can then fill out the form and see the data that we get. Go here listen for events. go back to TY form and then I can activate this because you want this to be on every single time. I can copy the length to the TI form and then I can start filling it out. So let me do malatory my name or my email and what are you looking for? I want to learn automations and I can press submit. And now this information will be sent to NN right here with a different output. So we have headers which is just a bunch of fancy stuff that you want to look at. But then what we actually care about is not the body but the responses. Where is it? Uh the answers. So matory my name the email is this and the text the third one is this. So these are the ones that we’re going to use for the next steps. The form submitted. It sends the data to the web hook. It’s like hey we have this data. Someone just submitted the form. Now use it for whatever you want to use. Here’s a notification. Okay. Once we have this, what we can do now is we can add it to our Google sheet. So, let’s make a Google sheet right now. Let’s name it new form request. Let’s do full name. Just the the variables that we had. Email uh once. Let’s just do once. So, let’s connect this to it end. So, I go here. I can press plus. I can go go to sheets and then what I need to do is append a row and a sheet connect it. All you have to do is go here sending with Google very very simple and then I can do sheet within a document. Append a row which means add a row and a document will be new form request. There we go. The first one and then the sheet will be one. We want to map each column manually because we want to do this manually. And then the full name will be the one here. Where is it? There we go. Text. because this is the text that we got. And you know this because these are the answers, right? You wouldn’t put it here if it wasn’t the answers. And then email would be the one here. So you just drag it across and once will be the last thing which is I want to learn automations. So it’s always good to test because when you go here, how would you know this is the answers, right? I mean it says answers right here. But it’s much better if you test to get actual answers that you know you put. So you can just map them here. And this is all good. So I can just execute step which means I’m just testing it. This is executing. So if I go here to the sheet, I can see that this is already added. So let me add this to bold. And then I know this works. So I can go to the last step which is sending an email. So email in this case will be Gmail. Uh create a message. No, send an email. Yeah, send a message. All I have to do to connect to Gmail to to an end is go here. Send them to Google. Very very simple like Google Sheets. And then here I have to put message send because we’re sending the message. And in this case, who are we sending the email to? We can either pull it from here or we can pull it from the actual form itself which is the email right I can put it here. The subject line will be thanks for filling out the form. Then it’s asking us for the email type. Now HTML is just the way that we make our emails fancy. We can leave this as text because we don’t need to use HTML. We can go here full screen and then here I can say hey I can go down to my name say hey Mika. And obviously, ideally, we want to have just the first name. And that goes into formulas. I don’t want to get into this uh just for this video because it’s a bit more complex. But I can say, “Hey, Mik, just saw our team. We’ll get back to you as soon as possible.” Thanks. All right. Cool. So, we said, “Hey, web hook name, which is a variable that we’re pulling in from the form.” Because again, we’re using dynamic variables. It changes every single time. We’re also saying, “Hey, what do you want? Who do you want to send an email to?” And that’s about it for the steps. So, let me test it. Okay, I just realized that it was actually wrong. I put an X row, so I I actually didn’t send the email. Um, but you should be getting the email when you send it through. Uh, I just had to put one OS, but that’s how that’s usually how it works. You just send it and you get this output right here. So, let’s test it from the start until the end. Let’s execute the workflow and let’s do a new form. So, let’s refresh. Let me go here and say James Low. Let me do my actual email without the extra Omations for lead generation. Submit. We go here. It’s talking to Google Sheets to actually add it. But we got the the output here. So if I go here, I can see that the answers in this case was James Low was email and then it was automations for lead generation which rhymes. And let me go to Google sheet which appends around the sheet which means that it added. So if I go here, I can see that James though was added. And obviously this would be a project management tool. It could be a CRM, whatever you have. Um, but we added it here. So you can keep track of all the different requests you’re having. And lastly, we have the email which was sent this time with the right email. So if I go to my email right here, I can see that I have an email from which says, “Hey, James Low, just saw you filled out the form on the website. Our team will get back to you as soon as possible.” Of course, you want to add more. And then it actually sends this as well, which is which we don’t want. So all we have to do is go here and then we can go to append nnn attribution. We can turn this off so that whenever it sends us an email it doesn’t say this part which we don’t want. All right. So that right there is basically how you use web hooks on nnn. I want to quickly show you how it looks like on a different platform which is make.com. So if I go to make.com I can log in. This is just another automation platform like nn. It’s just between n zapier and make.com. Make.com it’s it’s fairly easier to to get started with. But if I go here, I can see that to add the web hook to make.com, all you have to do is go here and there’s literally web hooks here and you can create a custom web hook which is the same. So create a web hook, name it whatever you want. So mik test this would be the URL that we had before. So in nn it will be this. This URL right here in make.com it will be this. They all have their own in like internal different names. In this case, it’s make.com and for nnn it’s nnn.cloud, right? So, they have their own unique sort of way that they name their um their web hooks. But on a high level, this is very very this is literally pretty much the same. Like it has the same functionality. All the web hooks are pretty much the same. It’s just that the way they look is different because of the way that um that this is set up. Press save. And this is much I don’t want to get into make.com cuz that’s more of a different video. But I just wanted to show you how it looks like to actually make a webbook on a different platform. And lastly, I want to show you how to send a data point from not from a form but from another scenario to a web hook. Right? If I go to another scenario right here. So, let me go out. Let me go here. Let me create a new workflow. And now, because I spoke about HTTP at the start, but in order for me to have a workflow and then send the information from that workflow to the next workflow through a web hook, uh I can then actually use a HTTP request. So let me show you exactly what it will look it will actually be much more clear when I actually run this. But all I have to do is copy this and let me take this out. So I copy the web hook that I need and now we will get data from the from the previous workflow. So if I execute the workflow here I can go here and then I can send the URL which would be basically saying hey I’m sending the data to you right and the web hook is getting notified. In this case, the method would always be post just because we’re posting information because that’s sending information from one place to another. Authentication is zero. And then we can also send a body. The body will be anything that you wanted to do. So you can say uh full name. So I should do case full name. So common case you just just want the capital letters to be this. So this right here will send the information with it. So if I execute the step first of all I have to run this it’s already running right now it’s waiting for this. So if I execute the step now it will send the information and I can see that we have in the body right here we have full name Mikuel. So imagine if you had a workflow right here which could send different variables so different things from one workflow to another. So you can split it up and you have all the different workflows talking to each other because you have web hooks and because you have HTTP requests. This is a whole another topic in itself, but I wanted to show you the overall sort of arcing thing of what a web hook is, how it can be used in a business sense, how it can be used or what the fundamentals are and how everything works together, how you can link it from automation to automation as well. In this video, I’m going to show you how you can handle any errors inside of Nen so your AI agents and your workflows are smarter, stronger, and make sure that they actually work. All right, so the first one here is retry when failure. So this happens when the workflow stops working because of some reason and then we tell it to run x amount of times in x interval and you know a node you know what step has this exact error handling technique because you will see this right here which says retry when fail. So if I go inside the HTTP request which is a again a node a thing that we used to send a request to some server in the internet asking for information we can execute the step and basically what this is it’s a server where it allows me to get any images of any dog randomly I got this dog right here right and I can keep going again and again and as you can see it’s successful why is because the status is success and I also know this because there’s a green check mark right which tells me that everything went good now what happens if something goes is wrong. Well, if I remove the E, right? Cuz before there was image, now there’s no image. This will now stop working. This will say there’s an error. As you can see, the resource you’re requesting could not be found. And if I go here, let’s say you have a whole workflow behind it. It will stop here, right? And so, why is this bad? Well, it’s because sometimes some servers just stop working randomly, right? They stop working for 1 to 2 seconds, maybe 3 to 4 seconds, which is why we use the retry when failure. So the way to set this up is to go to settings. You then have this setting turned on, retry on fail, which means that you’re saying, “Hey, retry these many times in this interval.” So it stops working, it tries once, then it waits 1,000 milliseconds until it tries again. Wait, tries again, right? And so it does it three times to make sure that we say if it doesn’t work, that’s cool. We’ll try again after this amount of time, right? And try back, try back, try back until it works. And so if I go here and I run this, let me put a manual trigger. I think I have this manual trigger. There we go. I can execute the workflow. And as you can see, this is now looping around because it’s actually waiting or it’s trying again after those many times in that interval. So let’s say I take this off, right? All I have to do now is execute the workflow and it will instantly error out. But by turning this on, retry when failure, it will wait, right, to try again and again and again. and at the end it will stop but there’s some process of them going through it they’re trying again um before it goes to the next step this can be applied to LLMs because sometimes open AAI claw Gemini they just stop working and we have no clue why and so to make your automation more scalable so that it just doesn’t stop every single time something goes wrong then make sure you have this the second technique is called the continue when failed now we allow the workflow to continue even when it fails and so theoretically right logically this step right here where you would continue even if it fails fails has to be something where if it fails amazing we still keep going. If it succeeds we keep going. So it can be a step that’s very very important in the whole logic of the flow. It has to be something where if it’s great great if not then it’s fine. And so the way to set this up is you have to go to on error and here we have three options. In this case it would just be continue. And so what we do here is it continues and it actually sends the error output right the error message to the next step. So if I go here I added an extra s. I can go here or extra F in this case and I can see that this is the message that I get. Now on the outside everything looks great because you can see that this succeeds right there’s a check mark but on the inside all we get is a message right we get this error message that we can then use to give to the next step. If I go here to the next step I can then pull the error message through to here like a normal variable I can execute the step and this is the output that we get right here. The third technique is called split error root. Now split error routt is a technique that we use in a lot of our automations to split the automation based on the logic because everything is logic. What that means in the plainest of English is this step runs if this step actually succeeds then it goes one way if it errors out so something goes wrong then we go the next way. Now typically this is great because with automations because everything is built on logic then we would typically have a route. So if something goes right or everything goes right then it goes one way and it continues the automation. If something goes wrong, then we notify our team saying, “Hey guys, something went wrong.” And so if I go inside here, I can see that now I have the same exact API that we had before. And this will now go through the success branch, not the error branch. But if there’s an error, so extra F, I can execute the step. And I can see that now it goes to the error branch, which is this one here. And the way to set this up is if you go to settings on error. So again, what happens when there’s an error? you can continue using error output, right? It passes the item to an extra error output, which means that it gives us two different paths to go down with our automation, one here and one here. And if I go to my email, which in this case is a step that we have right after there’s an error in a workflow. We can send the error message as an output, which in this case looks like this, right? And so right here, I have the workflow. And in this case, let’s say it’s a success, right? Just take the f out here. You can execute this and it goes the next way. And if I go to my email, right, and I have this error here, no root or get XYZ. Now, honestly, this right here makes no sense to any normal human looking at this unless you know APIs and so on. You could delete all these things, all these lines, uh, just to make it look cleaner. Um, and yeah, you could have this so you’re notified when something happens. Now, there actually is a better way when it comes to uh using the notification when something errors out, which I’ll show you in the last technique. But this is great because it gives us two options, right? It gives us the success option and it gives us the error option, all within the same workflow. The next technique is actually within the AI agent. So, if I go to the AI agent and I go on chat and I can say hello, what this does is that it talks to the brain, right? Because again, we mentioned that the brain is the LM, which means an AI that helps it think through what it needs to do. new instructions based on the prompt that we have inside. Now, this is all great until this stops working, right? There is a chance that this just errors out, that this LLM just errors out, which is where we add a fallback agent LLM. So, if I go inside here, I can see that I have an option here to enable fallback model. If I turn this off, that means that it removes the option for me to add a fallback agent LLM. As you can see, this is just a glitch that Ant needs to fix. uh but you will have no option here as well. And so the thought behind this is okay cool if we run this and it goes here to the agent then the agent called its brain because that’s how it thinks and it doesn’t work then we just break the whole thing right and so why don’t we add a step in the middle where if it doesn’t work here it then uses a different LLM to be able to try again and so that’s where we go in here we turn this on and we start adding the fallback agent LLM. Now the fallback agent LLM ideally it would be a different LLM because if OpenAI doesn’t work in that moment it will probably not work in that moment as well. Um so you want to make sure that you connect it to another LLM and you will be able to then use this as a fallback. So if I go here rename this fallback, it will use this model right here in case this one doesn’t work. So right here if I go inside and I go to my connection and I just name it fail save just put an API key fake one uh if I go out I can see that now I have a fake credential called fail which means that now it shouldn’t work right and so if I go here to open chat I can say hello this will now go here there’s an error and see how it instantly talks to the next fallback LLM to then give you an answer now this is great because a lot of the times like I mentioned LLM’s don’t work, right? And so you want a some sort of fallback, some sort of agent that they can rely on if the first one doesn’t work. It’s sort of like you’re playing sports. You have the main people and then the bench, right? Which is me when I was younger. And so when we have the main guy who’s playing and the main guy gets injured, then it calls another guy and then they call me. But in this case, they call the guy on the bench and the guy on the bench is a fallback l. All right. The next one is called the error workflow. So this is what I meant by the other way of doing this split error root because we actually set up a completely new automation which receives any error that comes from any automation in our workspace and then we can do whatever we want. Now this has to be a separate automation. So this is just the automation that we’re running now, right? But this will be a node that we add in a different automation. Now the way to set this up is we need to have a workflow. We have to activate this right here. Once I activate this, all I have to do is go make a new workflow like this, which has the error trigger. And again, you can’t activate this because it doesn’t let you cuz this is already activated. You want to go here. You want to go to settings. You then want to go and choose the error workflow, which in this case is this, right? Which is the workflow where the error trigger node is here. And you just want to attach to it. So in this case, for mine, it will be E with the R right here. I can press save. And now what happens is that I just connected this automation to the error workflow so that whenever something wrong happens here, it sends a data or sends a notification on the other workflow. So let me test it out. So now let’s say we go inside here and we execute the step. This should now work right here. Should give us a picture of a dog, right? Um and what we want to do here is we want to make sure that this will run now every 5 seconds. That’s fine. Let me make sure there’s an error here. So F. Let me run this. So there’s an error. Okay, cool. Now if I press save, this will now run the workflow every 5 seconds. And it should now send the notification to a workflow every 5 seconds because there’s an error here. So if I go inside here, I go to editor again just to refresh cuz you have to reload the actual automation. You go to executions. I can see now that we have new errors coming every single time. And on the one end, it’s a error, right? But on this end, it’s a success because that’s what this job of the error node does. Now, because I’m actually paying for executions, I’m going to disactivate this. But as you can see here, we now have a bunch of different workflow executions that we can then use to then be able to send ourselves an email, right? So, if I go in here, I can see that I have the URL of the workflow, the description, which actually makes sense in plain English, that we can now use to actually build out our workflow here. So if I go to copy the editor, which means that it now pins the actual output that we got from that run. I can then go to Gmail, I can send a message, obviously connect to Gmail by going here, press sign in with Google, and you’ll be good to go. Message send. Let’s do my email. Let’s do subject line, which means you can say error in workflow. And then the email type, let’s just do text because HTML is basically saying, “Hey, let’s make it look pretty.” We don’t have to saying, “Hey, Mikuel, there was an error in this workflow.” So URL, you can put the URL here. Error description, and you can put the description here. And you can go level and you can do warning. They’re saying, “Hey, to what extent do we have to worry about this?” You can just do warning. And now what I can do is I can run this and in that case it will error out and it will send me an email every single time with those variables that change. And if I go to my email, I can see here that I have error in workflow. Say, “Hey, there was an error in this workflow. The error description is this. The URL is this.” And if I actually go inside the URL, it will take me directly to the execution of the error of the workflow, which is amazing, right? Because now we can go here. We can try this again, right? Where we basically try it again with with something that actually works. And now we can rerun the execution to make sure that we don’t actually lose the data of this. It’s all here. So, those are pretty much the only error handling techniques that you need to know inside of any to make sure that you have a way to handle errors. Because what you start to realize when you’re working with clients is that building it for fun when a YouTube video like this and building it for a client is a tiny bit different. You want to make sure that these actually work every single time, right? Because sometimes when we’re building it for fun, we don’t think about what if it goes wrong, right? We just actually build it. It looks cool. It works in that moment, but what if it doesn’t work? And that’s when we use these techniques depending on your use case to be able to mitigate that error to be able to uh be safe when something happens. Hey, so in this video I’m going to show you 30 edit and hacks that I wish I knew when I got started that’ll help you make your workflows at least three times faster and save a ton of money on execution. All these are hacks that I had to learn the hard way over the course of the past 12 months building and selling automation to businesses. If that sounds like something that you want to improve on and learn, then this video is for you. Let’s dive in. So the first hack is actually software updates. So sometimes when you build automations on Nitnen and a lot of times when you watch videos of people actually adding steps to the automation and they go here and they look at an app sometimes you don’t have it in your own software. It’s because Nitan actually updates the platform so that they’re able to add more and more uh nodes more and more actual executions or or stuff to the platform so that you are able to make your workflows more efficient. And so the thing you have to do the way to update your your workflow or your uh account is to go to sign in. You’ll be brought to this page. All you want to do here is you want to manage. You want to go here and you want to press the latest version. In this case, this is beta. So, you might want to press the one below or alpha or the latest stable in this case, which is the most stable version of Nitto end as of right now. That’ll help you build your workflows in the current version. The second hack is deactivating workflow. So, let’s say I have a workflow right here, trigger manually. Have a HTTP request which talks to a server. And then step after this is edit or set fields. So, x equals y. Right? And in here, let’s say I have my website. So if I press execute step, now this will scrape the website. Now let’s say I run this whole workflow. This will run this, this, and this successfully. But let’s say I had a problem when I was running this. Let’s say I add some more stuff. Now if I execute workflow, this will stop right here. And we were building automations on edit and we want to execute this. Even if this fails, then all you have to do is press on the node and press D. This way it deactivates the node so that you’re able to run even the next step without this without this influencing the decision itself and this stops. It doesn’t even consider this node right here when it’s running the automation. So if I execute workflow even though there’s an error here it didn’t run it and it will go to the next step. The third hack is not really a hack but it’s more so the fact that edit end does not charge you for the amount of test executions that you do when you’re testing the workloads. So what I mean by this is that we tested this this and this. These are three different or this is one execution. But if I go to the admin panel, as you can see, right right now I have zero. And if I run this across right now, I also have zero again. Right? So when you’re testing automations in Nitn, the the actual amount of executions that you do or work for executions that you do when you’re testing does not count to the amount that you have to pay every single month. So to show you when you have to pay for something, I just added a schedule trigger. I’m going to activate this. So now this is going to run every 10 seconds. If I go here, I can see that this is running right now for 2 3 4 seconds. is successful. And if I go here to the admin panel, I can refresh and I can see that now I have one execution out of the 2,500 that I have every single month. So this is more so how edit actually charges you on the platform. Uh but just know that when you’re testing the automations, you are not charged for the execution workflow executions that you do on a testing phase. The next hack is actually pinning data. So let me remove this. Let me put a trigger manually. We have this. Let’s say I have to run this every single time. You see how this may take 10 seconds, may take 15 seconds. And to test this step, let’s say I wanted to to do all the data here. So let me drag this across. Now if I drag this across, so if I execute the workflow, the data here, the result that we get is a result from the previous step. And if I have to get this points of data, I have to rerun the whole thing over and over again. Well, not really because any just added the feature of uh pinning data. So you can go here and actually pin the data so that we’re able to execute this workflow almost instantly right here without having to wait for this nodes to run because we have test data to work with. This is great when you have a 100 node workflow when you have a lot of steps. So let’s say I copy paste this and I have all these steps. So let’s say now we have a four-step execution. If I want to execute the workflow here, let’s say I wanted to get the data from the HTTP without having to run it. I can use the test data that we have in order to actually get the data. In this case, the HTTP was not run because of the fact that it is pinned. But now when you want to activate the scenario and you want to get different data every single time using the HTTP request, you want to unpin this. And to do this, you can press P again. So you can P and P. That’s another hack. Another hack here is actually something that a lot of people underuse, which is the AI feature on Nitto N. If I go here to ask the assistant and ask it, hey, can you or hey, how can we build a human in the loop agent? This AI assistant is one of the best that I’ve seen on any automation platform out there because what it does is that it thinks it actually thinks through what it needs to do but then it consults through the community through the documents first and then a community that has full of people who actually um engage with the community and as you can see it says answer in the community. So it gives you three different places that it pulls information from. So it gives you a very very contextual answer and does actually help quite a lot when you’re building automations. Another hack here is that when I go inside this for example and I want to remove this and I want to pull in data from the HTTP request. Usually I would have to drag and drop this here. But as you can see this is actually code. So if you can actually map this without having to drag this across. All you have to do is square bracket square bracket. I can go dollar sign. I can then look for the nodes that we have to reference. In this case, hey, I want to get information from the HTTP request node, the edit fields node or the other edit fields node right here. Let’s say I want to do HTTP request. I can then put dot and then I have this option right here to do the item which is exactly the one that we want to do. In this case, I can now still get the output I got before without having to drag and drop this. So, the next hack is actually something that I’ve never seen anyone say out on YouTube before, which is the ability for us to add images on our notes. So, notes are a way to document your your automation, which I think is one of the best uh things that actually put out, which is something that are lacking in the auto automation platforms or the way that we have it set up here. So let’s say I have a note and I do image one. Now here instead of putting text which you normally would right you’re not limited by text but you can also add images. So the way to add an image is to put an exclamation mark. You do a square bracket this again. And now you would have to put the image URL right here. So right here we have an image URL which you have to put to then be able to see our image here. So let me pull in an image that I have uh from the web. And so what I did is I actually took a screenshot of this. I made it into a public URL so anyone can access it. And if I paste it, I can see now that I have the image of this automation here. You can imagine now this gives you a lot of possibilities when you’re documenting things to actually add documents or add document pictures or pictures, whatever it is that you have to put to add to the documentation that you’re putting for other people to look at your automations. All right. So the next hack is an error handling hack. So if I go here, delete this and let’s say I have a set node behind or before this. Let me do copy and paste another hack right there. Paste this. And I say I do I give it jm solutions.com. So now I want to pull this variable and put it in here. Drag this across. So then now this is basically scraping whatever it’s trying to access anything that I put here. Let’s say I run this. Now I get an invited URL right here because this right here does not have an HTTP https which which is which is what we need in order for us to actually run this. Now let’s say I go here and I go to executions. I can see that here we have an execution telling us hey you ran this there was an error. So there’s two things we actually can do. The first one is debugging editor. So we are able to access the way that the workflow was when it errored which is great because now we can see exactly what it is that the input was. what is the output? But also the thing we can do is press this button right here which is retry with currently saved workflow. So what this means is that you run a workflow. So you run an automation. In this case it’s this. Let’s say your error is out. You want to try again with the same data that we had so we don’t lose different things. So let’s say we had a Google sheet that was running every single day and it caught the most recent 100 rows. Let’s say one row failed. You still want to execute that same row even if it failed because it is important to us because it’s still a data point that we want to process. The next hack is actually a switch mode. go here to edit node and I put x= y. This is just something that we put just to test. Now the next step can actually be a switch node right here. So the switch node allows us to do different things. The the first thing that allows us to do is to basically send the automation different ways based on where we want it to go and based on different criteria. So in this case we have routing rules. So this means hey if this equals that then send it this way. If that equals this then send it this way. So we say we had a very easy sort of thing. adding rule V or in this case let’s execute a step says we had this equals to Y and this equals to X right so in this case now if I run this and again this is called 01 I can run this and it will send it this way because this is set to Y right and the second thing was Y so there’s actually one hack that we can do here because we can rename the output so right here instead of having zero and one we can have this is X or this is Y in this case and here I can have this is X. So that here I can see that this is this is Y and this is this is X which is amazing when we’re trying to uh let’s say we get emails we get an email that we get and let’s say that if the email contained something in the subject line it was a support email or a FAQ email or something email then we would rename this with support Q&A or something else right and it’s amazing because it allows us to visually see exactly what’s happening in the workflow. All right. So, next one is actually the edit end attributions. So, if I go to Gmail and I send myself an email. So, let’s do send a message. Let’s put my email do hello. Hey there. And I run this. This will use my email to send my email. So, if I go here, I can see that on the email itself, it says this email was sent automatically with Niten. Now, ideally, we don’t have this or we don’t want to have this when we’re using it for businesses who are sending email to clients because we want it to feel more personal and we don’t want to exactly say this is an automation, right? So, what we do here is actually remove the uh edit end attribution. So, if I go back here and I go to add options, I can see that I have append edit and attributions. If I turn this off now, if I rerun the automation, you can see that I got another email from Mika Gem Solutions, but now there was no edit and attribution. There was no, hey, edit and send this. so that we can actually send emails that feel more personal that doesn’t don’t tell them, hey, edit and send this. We have an automation set up. Um, so you can actually use it for your own clients. So the next hack is actually on edit and forms and it’s the way that we actually design the form. So if I go in here and I want to execute the workflow and I want to let’s see test the form. We can see that we have this color right here. We have this font, this color, this layout which is standard for end. But what if you had a company that wanted something with their own brand colors that we can send to clients that makes the client feel more more aligned with or more envision with with the company itself? We can actually customize it. So to do that, we can add an option. We can go to custom form styling and it gives you this code right here. So if we copy this and go to childbt and we say can you also or can you or this is the nitn um general styling form styling code. I want the general color and theme to be blue to be light blue. Again, this you will substitute this with anything that the client has like brand colors and so on. So now we let charge BT run. And this is all within CSS, which is just a way a programming language. It allows us to change the design of things. All right. So it just finished. And by the way, uh these right here when you see hashtag something something something, it just says blue color, blue, white, blue, uh blue, and very light blue. These right here represent colors. So if I copy this and I go back to edit end, can paste it here. And if I want to execute the step, I now see that the form is in my brand colors. It’s blue. And you can do whatever you want with it. You can obviously customize the background and so on, but this add that little touch to us actually being able to customize the form for whatever you want for brand colors. All right. So the next hack is on a schedule trigger. So we use a schedule trigger. We want to run the automation maybe once a day, once once a year, uh every second, every whatever it is, right? But now we can actually customize it even more as in the time triggers like when it actually runs. If you go here to trigger interval. So this is you want to run every second, minutes, hours, days, weeks and months. We can actually do a custom cron. So chron is a way that we express time. So if I go here to documentation, I can see that now I have a lot more a lot more options. You can do a custom. So we can do it every day at 2 a.m. And I can copy this and then paste it here. And this signifies every day at 2 a.m. And it tells you that second, minute, hour, day of the month, month, day of the week. And this over here is a very custom way that you can uh obviously run your automations. But I think it’s really really cool that we get to that we’re able to run automations whenever we want in a very very custom order. I mean, we have a ton, right? We have every midnight, every Sunday, every Thursday, once a week. This gives us a lot more flexibility when we’re building automations. All right. So the next hack is actually on the workflow and the way that data actually moves and the the sequential order that it moves. So an example here is when we have an execute workflow and let’s say we have a series of steps but we have two ways that the automation can go through and it will go through the two ways because we have no filter involved but which one does it do first? Well in this case if I execute the workflow I can see that it goes up here first it then waits 3 seconds cuz I wanted to show you that it then does everything. So this runs the workflow that is actually on the top. So again if I put this to the top we can see that now it executes this first. And this applies for anything you do in case you have three, in case you have four in case you have five. So if you’re wondering why your workflows are running the way they are in the sequential order, just know that it runs the first workflow that it runs is the first uh is the one on the top and then it goes obviously on a worker level on a ladder level until the end. All right. So the next hack is actually on a web hook. If I go here to web hooks, I can see that we have a test URL and a production URL. This is the exact same that we have on forms within Nitn. And just know that the test URL is only used when you’re testing the automations. And once you set them to active, so once you press this button right here, activate this. Now this will now you have to change the production URL right you have to change the URL they’re using for the external server that we have to use uh when you’re putting it to active. So just know that test URL is when you’re testing production URL is when the automation is active. All right so the next hack is actually calling another workflow within a workflow. So let’s say I have an automation right here and I then have x= y right it’s good and now the next step can actually be calling another workflow to do something and then giving us the data. So let’s say I have execute uh sub workflow which is the action that we want to do. Now it’s asking us to source the database which is fine and then it’s asking us which workflow do you want to call in order to to send the data and actually execute before getting the data back. So if I go here I can actually create an sub workflow. So I can go workflow personal in this case and now I start from scratch. So in this right here the trigger will be when executed by another workflow. Let’s leave this to all accept all data which means that it sends everything. And now let’s say I do edit field do hello. I say my name is Mik. Let’s say I do wait. I wait 5 seconds before we send the data back. So let me save this. As you can see we already can’t activate this because it always runs whenever it’s called. But here I can then let me name this hello world. I can now go here and I can choose hello world to be the workflow that’s executed that’s sent the data to before we get the data back. In this case if I execute it I can see that it’s running because it takes 5 seconds of course I mean we have this step right here and then it waits 5 seconds and then it sends it back. If I go here I can see that we have the data back which is my name is Kelly. So this right here what it did is that it sent the data to the workflow and then got it back and now I can move on to the next steps. If I go here I can see that executions. So this was successful and then it send the data back. So this is great when you’re building automations because of the fact that when you build a linear workflow, which means that it follows a very specific process and it’s just one line. You can’t actually add more automations here unless you actually call them, right? So in this case, this sort of acts as an AI agent um which is similar to make.com’s AI agent in the sense that it actually calls workflows uh predefined workflows and it gets the data back. All right, so the next hack is actually using a loop over items. So in this case, we have an automation that starts with the list of YouTube channels. It then lists all the videos. in scripts, the comments from these videos in order for us to actually be able to know exactly what people want and in order for us to have a database full of content ideas and hooks and outlines that we can use to generate content for us. By the way, if you want to watch a full video, check it out right here. And so right here when we go to APify, Apiy is scraping all the comments. But in this case, it gives us 505 comments which we then have to send to AI. Now, typically with AI, it doesn’t actually take in or in this case, it can’t take so much context. It can’t take everything at once because the way that Nit end works is that we have different items. So in this case 505 items which are different comments in this case, right? Different comments. This will run through all the different comments at once. And so what we do here is actually use a loop of items which I can find right here. Loop of items split in batches. And we tell it, hey, only send 50 through until and run this whole thing until here and then send it back. So, we use this right here to loop it all back until we get the other 50 and we get the other 50 and the other 50 until the 505 is finished. This is great because we’re sort of splitting the automation up into different items so that the automation can run the first step. Go back run set amount of items. In this case, it’s 50. It can be 30, can be 100, 150. Um, but in this case, we want to keep it at 50 so that AI is actually able to uh to cover all of those. All right. So the next hack is actually within testing AI agents because whenever you want to test an AI agent, you assume that you need to have an input. There has to be an input for the agent to think through what you just asked it and then give you an answer back. But what if I wanted to test only this part and I didn’t want to chat with it every single time in order for it to actually run. Well, in this case, let’s say I do hello. You see how now because of the input, it then does its thing. If I go here, I can now pin the data. So I don’t have to keep chatting to it every single time in order for the actual agent to run. But bear in mind the data that goes through the input will be the chat input which is hello. And another hack that you can do is actually press this button right here. So you can manipulate the input. In this case, let’s do how’s the weather in row and save it. So now the input changed and that’s what is going to be fed into the agent every single time. So if I go here, I can now only test this step because this is pinned and I don’t have to chat to it every single time which makes testing so much easier. The next hack is actually something that I was wondering when I was building AI agents myself because I thought, okay, we we chat to it on N right here, but what if I want to activate this to a client, right? Do I have to always use Telegram or WhatsApp or Slack, whatever it is? Can’t I just use something inside of Nitn a link that someone can use for a chatbot? Well, the answer is yes. Because if I go here and I go to make chat publicly available, if I copy this, and by the way, you have to activate the scenario first. You have to activate this. Activate it and I paste this in the web. Now I can actually chat to the AI agents. If I say hello, what it will do is that it will think through the AI agents. So if I go back here, I go to executions, I can now see that we just chatted to it and the input was hello, right? And and so you can actually chat to this. So this would be the link that you share with the client whenever they have to talk to it or whenever you have to talk to it as a way to have a personal assistant without having to rely on Telegram or Slack or WhatsApp, whatever it is. So the next hack is actually being able to connect an AI agent to another AI agent. So let’s say I go to tool and I go to agent AI agent tool. I can now see that I have the possibility to connect the AI agent to another AI agent right here. Now this right here is an example of a workflow an assistant that I build that uses this exact feature of calling sub agents within the main agent. Sort of like this is a CEO of the company and these are the head of departments and the head of departments talk to the employees which actually do the exact task. Now, this is great because previously we actually had to make an AI agent somewhere else and then be able to call it on a different workflow and then send the data back. But in this case, we can all do it in the same place. And again, the way to set it up is to go to tool, put the AI agent tool, and then you can simply do the thing that you do here. You can put a chat model. In this case, let’s do open AI. You can do the memory this is here. And now you connect it to any tool that you want, right? In this case, it can be whatever. It can be Gmail here and so on. And the way to actually know whether it sends it here is to be able to give it a prompt to tell it hey only execute this or this is the data that you’re going to get and do XYZ just like a general agent would right so the next hack is actually prompting the AI agent in a very specific way. So if I go here I know that every AI agent has a system message which is a message or prompt that we tell the AI agent whenever we want to give it instructions. So typically the way they would look is we have overview which is an overview of what it needs to do. Then we have tools. And the way the reason why we actually use these hashtags is to give it a it’s called markdown formatting. So this is heading two. This is heading one. This is heading three. In this case, we can leave it at heading two. And then we also have rules. It’s something that people don’t even put whenever they’re using AI agents. Let’s say the AI agent was connected to a calendar and we say, “Hey, can you make an event for tomorrow?” How does it know today’s date? Well, that’s the thing about AI because it doesn’t actually remember today’s date. Let me show you. So if I go here and I have no problem in this case and I ask it, hey what’s today’s date, you see that it says hey today’s date is April 27, 2024 while today is actually 4th of September 2025. So we know that AI is actually not the best remembering dates which is crucial because usually we have tools like Google calendar or Gmail and when we have to say different dates let’s say we say hey send a meeting for tomorrow or schedule a meeting for next week. We want to be able for the AI agent to know when today’s date is so that it can contextualize it when we say tomorrow or next week, whatever it is. So to actually fix that, we go here to the system message. We say today’s date. This is going to be at the end of each prompt. So we have the overview, we have the rules, tools, and all that stuff. And then we say today’s date. Then you put curly bracket curly bracket. You put an S dollar. And then you put right here. Now this right here is going to be fed into the agent every single time as an extra so that it remembers today’s date. So now if I ask it, hey, what is today’s date? Because it knows the date, it can say September 4th, 2025. So this makes a difference because again when you have calendar tools, you want to know exactly when today’s date is to be able to contextualize it for next week or next month or whatever. All right. So the next hack is actually using a GBT that Chris Roberts, I don’t know who he is, uh, but he made a GPT that actually works pretty well when you want to debug or need help with automations. Now, I mentioned that you can go and talk to the AI right here, the AI assistant, which pulls from the community, which pulls from from different places, which is amazing, but it doesn’t actually solve everything. So, in this case, I use this GPT. I give it a picture, whatever it is, some tone of voice, even if you want to ask it, hey, I want to build this automation. It actually does a pretty good job. Now, I’m going to leave the link down below. Again, this is not mine. I’m not affiliated with anything here. I actually genuinely use this and I think it’s actually pretty good GPT. All right. So, the next hack is actually within the HTTP request and the way that we actually set up APIs. So sometimes when we want to add an app, let’s say I go to on app event and I want to look for an app but it’s not here. I then have to go to Google and search up the app name. So the software name let’s say ClickUp and we search up ClickUp API documentation and we get on this page. Now this page is an API documentation is a very follows a very standard uh way of that it looks we have different request we have the summary of the request and then we have something called a curl. Now this scroll right here is something that previously we’ll have to manually and paste into the HTTP request because we have the URL which in this case is the one here. We have the headers which is the one here send headers. Uh and we have the body in this case which is not here. But now we can actually copy this and we can go back here and we can import curl. We can paste this and we can import it. So then now we don’t have to know exactly where things have to go at each time. we can just worry about sending the data that we actually need to send and not setting things up on an HTTP request. Now, one more thing is that a lot of the times when you have to use a software like ClickUp or other softwares as well, we have to use something called an API key. Now, this is a key that we use to say, hey, this is my access token. This is my password. You can access it, right? And most of the times the way that we actually use API keys is by adding them here. So, we do API key and this is not always standard. And then we have to put some long code that you know signifies a password. But in this case, instead of putting it here every single time here, you can go to generic credential type, we then can go to barrier o right here. And we can create a new credential. In this case, it can be the actual API key that you’re using right here. And now you can name it whatever you want. Click up. Press save. And now you’re able to actually access the API key every single time or the HTTP request is able to access the API key here. Uh and whenever you have to use ClickUp, all you have to go is here. you can use click up and you don’t have to re add the API key here. Now the next hack is actually batching. So a lot of the times when you do a HTTP request to a server uh the server actually has limits. So let’s say air table has a limit of I think it was 100 requests per minute or something like that and the HTTP request sometimes can go over that. So for us to actually limit the amount of requests that we sent to the server per amount of time we can go down here add options we can go to batching and now we can add we only want to send 50 items per this interval. in this case is 1 second. So 50 items per 1 second. And so you have to obviously look at the limit uh the API limit that the platform has. But this allows us to be more flexible and navigate errors because a lot of the times we know there’s errors when we send too many requests to the to the actual platform cuz they have a restriction. In this case we say hey only send 53 at once every second. And we can change this. This can be 10 10 million right? Whatever it is that you want to do and you can change the time frame and you can change the amount of items that go through the API request at each time. All right. So the next hack is actually within error handling itself. Uh now let’s say we had a workflow that looked like this. We have the schedule trigger which runs every 10 seconds and then we have a HTTP request that we’re calling. In this case it’s my website. So if I execute the step this gives me the whole code. But let’s say now I activated this which runs every 10 seconds. So now it’s calling the API every 10 seconds. And I wanted to let’s say I changed something like this or added some more stuff here. I press save. So we can see here that we got an error because of the fact that again we put an invalid URL and this does not work. Now the good thing about error handling is that we have debug and editor and we have go back to the same data before that I showed you. We also have something called an error workflow. And this just means that whenever a workflow stops working because it’s an error, we call we send the data to another workflow to then do whatever it needs to do. So let me show you exactly because it it makes much more sense once I show you. If I go here to another workflow, do personal I can add something called an error trigger. So this error trigger basically works so that it receives all the errors from any workflow that you connect it to and then it does whatever. So let’s say I do Gmail and I want to send myself an email whenever I receive an error from any workflow. Okay, so now I made the email right here. There was an error in the workflow. Let me do uh exclamation mark. Go here. I can press save. Now if I go back to the original automation I have to go to settings here. Then I have to go to error workflow. So to notify the error. So in this case, let me name this error. So I know that it is this workflow right here. And now I can choose the workflow to send the data to when it errors. In this case, it will be error as you can see here. And I press save. Now let’s execute this every 5 seconds. Let me press save. Let me press active. So this right here should now when it executes it’s going to error out again like here. As you can see it errors out every 5 seconds. If I go here, I can see on the executions that this was successful. As in it’s getting the data because it there was an error in the workflow. If I go to my email, I can now see that I have a bunch of emails saying there’s an error, there’s an error, there’s an error. Now, this is great because let me actually turn this off cuz I don’t want a bunch of emails here. This is great when you have different automations. So, we have a bunch of automations. Let’s say we have 10 or 20 within the workspace. We all connected this. We all connect all the different automations to the error trigger so that we know exactly every single time and it does the same thing, right? Which is amazing because then we have everything centralized and we have everything within one workflow to be able to notify us when there’s an error. Right? So the next hack is actually called a human in the loop. So let’s say I had a simple automation like this. I can go here. I can go to human in the loop and this is across multiple different platforms. So let’s say I use Gmail and I send myself an email and I execute previous notes. This is an example or in this case it’s an error so I can’t do that but uh say hello is this hello how’s it going let’s say I pull something from before previous step and then we have the response tag which is essentially saying hey when I send you the email for you to to check or something submit something do you want it to be an approval so you can approve or disapprove you want to be free text so you can actually give me feedback or do you want it to be a custom form so in this case let’s do approval let’s say I already sent the I can get this and I can approve right here. Now, this sends the data back right here and we got the approval, right? Approved equals true. And now, this is great in case you’re building automations like these. Uh, and by the way, this is a human in the loop AI sales agent that basically starts with the form, right? Let me execute it actually to show you uh which has different fields. So, James, email, company name, intent, budget, project description, timeline. Then we talk to we add it to the sheet. We talk to the sales agent to make a sales email which then is being sent to us for us to say, “Hey, approve or deny or actually get feedback. Then when we give it feedback, the text classifier classifies whether this is good feedback or bad feedback.” If it’s negative, then it uses feedback to rewrite the email. And it goes through the whole thing over and over again until we give it a positive feedback saying, “Hey, all good.” And then actually sends the email to the lead. Hey, so in this video I’m going to show you exactly how you can set up your own Google credentials. So you can connect Gmail, Google Drive, and Google Docs to Nitn and get going right away. Let’s dive in. All right, so if I go to NN right here, I can see that if I go to Google Sheets and I want to connect my Google Sheets to NN, I can see that I can simply just sign in with Google. If I press this button, it will take me to this page. I can choose an account. I will then press continue and the connection is successful. Now this is great because NN previously did not have this, but now they implemented this. So you only have to sign in with Google. This is the same exact case when you want to sign in with Gmail. You want to go here, create a new credential and you can sign in with Google. This is the exact same process and it’s amazing because it allows us to not have to do any authorization or anything like that. We just have to press the button, choose the account and that’s it. But now if I go to Google Drive right here, I can see that I want to press create a new credential. I have to add the client ID and client secret. So how is it that we have to do this? And if I go to Google Docs, you can see that it’s pretty much the same. So if I go here, creating a credential, I have to add the client ID and client secret as well. So in order for us to generate the client ID and client secret, let me go here. I have to go to the documentation. I have to scroll down. The first step is create a Google Cloud Console project. So I have to go log into Google Console Cloud or Google Cloud Console. I have to go right here on the top and I have to press new project. You want to name the projects. In this case, we can name it Google off tutorial. There it is. Going to press create. And now the project is actually creating for you. I’m going to press right here. Select project. And you know that you’re in the right project when on the top left you can see that Google all tutorial. Now the first thing you want to do, you want to go to API and services. And you want to search up for the apps for the software that you actually want to connect your automations to. So in this case, if I go back to NN, I can see that I want to connect to my Google Drive, but also my Google Docs. The first step I have to do is search up Google Drive, Google Drive API, and I want to enable this. This is saying, hey, let’s enable the API so we can use it in the automation. All right, cool. So you get to the screen and we want to do the exact same for Google Docs. Press Google Docs. Google Docs API. I press here. And you want to enable this. Amazing. So now that we have both APIs enabled, all we have to do is go to OOTH consent screen. We have to get started. Put the app name. So let’s do test and it’s end user support email. This will be your email. Next, you can put external which is fine. The email address. Put your email address. Put mine. Next. Agree. Continue and create. All right. So once this is done we can go here the create oath client. This will take us to this page and we can choose the application. In this case it can be web application. Then client can be let’s do color test. Now it’s asking us for two different things. It’s asking us do we want to add an authorized JavaScript origins or authorize zirec. So this right here we leave blank but if I go back to I can see that they said in Google drive use the URL above when prompted to enter an ooth call back or redirect URL. So what we want to do here is you want to copy this URL. Go back to the off client ID and you want to add it to the authorized redirect URLs. Press add URLs. Want to paste this and you want to press create. Once this is done, we have the client ID. Make sure to not share the client with anyone because this is confidential. Going to press this copy. Go back. Paste it here. And now we have the client ID. To get the client secret, all we have to do is go back here. Press okay. want to go here to test and the client secret will be this one right here client secret I’m going to copy this you want to now go here client secret you’ll see the option to sign in with Google so let’s say I sign in with Google this will give me this option I can press the account that I have but now it will block me access blocked and then cloud does not have complete Google verification process so once we get this we know that we have to publish the app so to do this I can go to audience I can go to publish app confirm Now the app is published. So we can then go back to an event. Sign in with Google. Choose the account. It will send me to this page. I can go to advanced right here. I can go to nan.cloud. And now I can select all the different things that we want to do. In this case is edit, view and create. I can continue. And the connection is successful. I can see that the connection is created. go here select connection now I can press save if I go here let’s say I want to create a file from text but let’s say I say hello I press execute step I can see that now the connection was successful I go back to Google docs to pretty much do the same thing so in this case I can create a new credential go here we can go to clients you have a test where actually we can copy the client ID from here so copy this paste it here. Go back. Go to the software or the account. In this case, you can copy the client secret again and you can paste this. Now we can sign with Google and go here. Advanced. Go to end.cloud. Select the different things you want to do. Continue. And the connection is successful. We go back. I can name it. Save. Now, if I want to, let’s say, create a document. My drive folder name is invoice in and I press CSU hello. I can go to execute step. Now the step is executed and we can see that everything works fine. So far you’ve built a solid foundation. You know exactly how to connect apps, how automations actually work, how to use web hooks and how to clean up data. But automations can only get you so far. The real magic is when you build automations and pair them up with AI. So in the next module we’ll dive into the hottest topic of niten which is AI agency. You learn exactly what they are, how you can use them, what is the difference between an AI agent and a workflow, and finally, how you can start building it from scratch inside of an end. And this is where your automation doesn’t just turn into a simple workflow, but turns into a virtual employee. With that being said, let’s dive in. If you’re someone who’s been finally want to understand AI agents, but you’re getting lost in all the technical terms and you’re getting way too overwhelmed, well, this video is for you because I’m going to be breaking down the fundamentals of AI agents as if I’m teaching it to a 5-year-old so you finally understand what this whole hype is about. All right, so we’re going to cover the fundamentals of AI agents and the different types of AI agents. And by the way, if you want to see the difference between AI agents and workflows, check out this video up here. Um, but this is the simplistic version of what an AI agent does. We have an input and we have an output. Between the input and the output, there’s an agent. There’s someone who is prompted with instructions. So, he has instructions saying, “Hey, you have to do XYZ if this happens.” And the AI agent, so the actual thing, the the boss uh which has instructions is connected to its brain and its brain is AI. So, Chad GBT or Claude or Gemini and it has a memory because as a normal human, you remember the previous conversations. So, you have this context and then it has tools. So these are the different things that it uses to take action on something. So in this case, let’s do an example. If the input is send an email, what it will do is that it will think through all the system prompt instructions that it was given saying, hey, if the user says send an email, then call then use the tool which is Gmail. And that’s how the logic usually goes. And so if you have multiple tools, then the AI agent is able to take actions on multiple softwares, which means that it has actions. It can send emails. It could also schedule calendar events. You can get calendar events. It all depends on the different tools that you connect it to the AI agent. Then now it’s able to take action. Okay. So input send something or do something whatever it is. Agent will think through what it needs to do with its brain which is try to be or claw or whatever it is. It remembers the conversation and then it takes action on what we told it to do based on the tool that is connected to and then it will give us the output which is yep everything was good. You’re good to go. And a beautiful thing about this is that one AI agent can be connected to five to 10 different tools. So one input can lead in a series of outputs. It can lead to multiple actions in multiple softwares. Now what does an AI agent actually look like? We’re going to use N10 as an example just because it is the the widely known AI agent uh feature. But the way that it looks like is we have a chat which is the input. So this is a thing that goes into the AI agent. In this case you can chat to it using the native N10 chat node which looks like this. You can say hello, right? Um, you can also use telegram. Telegram is sort of like a like a WhatsApp. You can use Gmail. So, it can send conversations to the agent using email. And now the information will pass through all the way to the AI agent. So, this line means that the information goes through to here. Now, this is where the agent is prompted. So, if I go in here, this AI agent is consisted of three different things. The first one is the source for prompt. So prompt is basically saying hey what is the thing that we’re actually giving the AI agent for it to do right what is what is the thing what is the input what is a chat what is the email and so we connect this so we say connected chat trigger node because currently the AI agent is connected to the chat trigger node this is what this called and then prompt user message which is what is the thing that’s going inside in this case it would be the JSON uh chat input because this is the thing that’s going through here let me show you an example let me disconnect connect this. There we go. Let me go here. Let me say hello. And now the information will pass through to here. Now it gave us an error because this AI agent must be connected to an AI in order to think through. But you can now see that the chat input which is this one is hello is the input that we give it. Now the second thing here is the system message. So the system message is the instructions that we give it. So, sort of like you have an employee and you tell the employee, hey, if this happens, call this. If that happens, call this. You’re training them on what they’re meant to do. Now, usually when it comes to the prompts or the the instructions that we give to the AI agent, it consists of an overview. So, saying here are a helpful intelligent XYZ assistant that does XYZ. And then the tools. Now, the tools you basically explain the different softwares that are connected to the AI agent. So it has context as to what it can do, what tool it can do, what software it can uh it can take action on based on the ones that are connected to it. And then we have rules which are different rules. So it can be when a task requires using one or more tools, make sure to identify which tool is the most appropriate, pass along the relevant details and execute the actions needed to complete the task. So these are different rules that we tell the AI agent to make sure that the quality of output is increasing because sometimes with the fact that it’s AI, it can hallucinate. can make up some stuff. It can do its own thing. And we basically want to restrict it to doing only the things that we want it to do. So again, we have overview tools and rules. And then we also give it the date and time because let’s say we tell it, hey, can you tell John that we have a meeting tomorrow? Well, the thing about AI is that it’s not the best at remembering dates. So we always want to give it a date, which in this case you can simply do by putting curly bracket and then put now, right? So now we’ll give it today’s date. And then we format it in a way where it looks like this. Right, which is good. And now the AI agent will always have a dynamic variable. So it will always have this which changes every single day based on what day it is. And it uses that as context when taking the action that it needs to take. Now obviously this is not used always but when it makes a calendar event when it sends an email asking for a specific time uh this is very very useful. So again we have the chat input and then we have the system prompt which is the instructions that we give to the AI agent when it needs to take action on something. Then we have the LLM plus memory. The chat model here is the brain of the agent. Now I can connect this to the model, right? So this is the um the line that allows the AI agent to then pass through the input to its brain using its instructions and actually think. And in order for us to actually connect the AI agent to OpenAI, all we have to do is go here, create a new credential, and you want to go to platform.opai.com, login. You can go to dashboard. You can go to API keys. And we’re basically making a password that N10 AI agents can use when actually thinking through its LLM. LM just means chbt or cloud. Uh in actually thinking through the instructions. So you can press this button. You can say AI agent create a secret key and make sure to copy this which will then paste right here. And you can call this yeah agent test 3rd October. Press save. And bear in mind that this is not free. So you would have to go to your profile and you would have to go to billing uh right here and make sure to add some money because AI requires you to have credits and credits require money. Uh but it is very very cheap when we’re talking about a few few cents per execution. All right. So now that we connected AI, we have Chad GBT as the brain. All we have to do now is connect the model, right? So, we’re choosing the model that the AI agent uses when it’s thinking through what it needs to do. So, now that we have AI connected to it, let’s actually chat to it. Let’s say hello. And now what you can see is that the input went here. What it did is that it automatically talked to its brain, which in this case it’s OpenAI. And then it gave us an answer. So, the answer in this case is hello, how can I assist you? And this is as if we’re talking to the actual chatbt interface on chatbt, but we’re connecting it using the API version. So the automatic version. Now we have memory. Now memory right here is when the AI agent when you want the AI agent to remember previous steps or conversations uh when you’re doing something. So this is useful when you’re basically creating a drafting email to John and then um the AI agent already knows who John is and then you say, can you also schedule a calendar event? So now it has context as to who John is to then be able to take the next action without you having to state who John is in the first place. But on a simple term I can say hello how are you? And now I can also ask it what did I just ask you? If I ask this I can now get the answer which is probably hello how are you? Uh you asked me hello how are you? How can I assist you today? Now as you can see here the logs these are the different steps that the AI agent took in order to get to the output. Right? All right. So in this case what it did is that the AI agent went through the simple memory. So it remembered uh exactly the conversation that it had using the context. Then it uses AI to think through its uh instructions and then what it did is that it used the memory tool again to give us the actual answer. All right. So now that we have the LM connected to this end the memory this tool right here. So this is how the AI agent actually takes action and we can connect this to Gmail and calendar. And inside the Gmail, we set a series of instructions and different details to allow the AI to define what the subject line is, what the message is, and who are we sending the email to. And same thing with the calendar. This is going to be another tool that the AI agent has access to in order to take actions for us. And we give it the before and after of the event that we want to schedule or in this case, we want to get the event. Um, and now if I speak to the AI agent, this is prompted, if I go here, this is prompted with the two different tools. So, Gmail will be used to draft an email. Uh, calendar will be used to get calendar events, right? So, it knows exactly when to use each tool. And when I say, hey, can you send an email? This should now send back or should ask me who are we sending the email to. So, I say, hey, I can help you draft an email. Can you provide me with the details of the email such as the recipient email address, a subject line, and the message you’d like to include. So I said send an email to mik.torgmail.com saying we have dinner tomorrow. What this will now do is that it will take action on the draft. As you can see, it just called the tool. So just send a signal to the tool saying, hey, I just got received instructions to do XYZ. Can you do it? As you can see, we went through step by step right here. And now it says we have drafted the email to Mik. So if I go to my email right here, I can see in the draws that we have dinner tomorrow to this person right here. Obviously, you can improve the prompt to make the email actually more contextual or uh I guess more sauce in the email. But just know that it called the exact tool that we wanted to call to take the action that we wanted to take, right? Without us having to go to the Gmail tool. And it did it within seconds. Now for my calendar, let’s do an event um lunch and let’s do dinner, right? We have one on Friday and one on Sunday. If I go to any 10, let me ask it, can you grab the events from this week, please? What this will now do is it will go here. It will think through what it needs to do. It will then call the appropriate tool to then give us an answer back, which should give us lunch and dinner. Um, as you can see here, we have Q&A with Shaz, which is something that I did before. Lunch and dinner as well because these were the three events. We have Q&A with Shaz, lunch, and dinner. And that’s how fundamentally a simple version of an AI agent looks like. It’s connected to an input. It think through its LLM uh because that’s how it’s its brain works. It it remembers the conversations and it takes action on the the things that we wanted to do using different softwares. Now, this is called a simple AI agent. Now, we can get on to the multi-step AI agent. So, this is an AI agent that is connected to more AI agents and more tools, right? As you can see, it’s more complex than just a simple walkthrough. And by the way, if you want to see the full walkthrough of this AI agent, check out this video up here. But essentially, the way that this works is that we have an input and we have an output. This is always the case with AI agents. It doesn’t change. Now, the only difference here is that we still have the system prompt instruction. This is still the exact same. It still has a brain, which is LM. It still has a memory, but the only um change is that we’re not calling tools as a first step. We’re calling other agents in the first step. So fundamentally this is why because the most important thing here that matters it’s not so much the tools it’s the prompt that we give the AI agents because the prompt is the instructions and so if we instruct an AI agent to take action on 55 different tools like these well the chances that it would actually succeed are pretty low even though we have the best prim in the world because of the fact that um it be non-deterministic right it can fail right because it’s AI and so what we do here is you want minimize the failure rate of an AI agent. So what we do is we add more AI agents. And so the way to think about this use case is as if you have a company. So a company right will be the customer which is the input. It then tells the the CEO hey can you can you maybe check the finances that we have in our company. And now the CEO is presented with head of departments. So in this case we have the head of calendar, head of email, head of blogs and head of contacts. and the head of contacts and blog and email and calendar have access to tools which are employees, right? And so why do we have head of departments and not just have employees connected to the CEO? Because if a CEO had access to a 100 employees and he was given a task from his client, it would be hard for him to know exactly who to assign it to. He would get it wrong most of the time or some of the time. And so when we want to minimize errors, we want to assign a head of department for that specific role and let him figure out who to give it only for the employees in his department, right? So the tools are only connected to the calendar agent for the calendar tools. Same thing with emails, blogs and and contact as well. And so what ends up happening here is that we have a big Agent and all of these are subset of this. So this is one which is the same thing as this. This is one which is same thing as this. This and this as well. The only difference is that the memory is only connected to the main AI agent. And so here we have telegram which is the input. So we can give it a voice message or even a text. All right. So here we have telegram which is the input and we have the whole AI agent. And let’s say now I wanted to uh send an email and schedule a calendar event. As you can see, we also have the contact agent, which in this case, we instruct the main agent to always look at the contact agent before sending the email and before making the calendar event because this contains the detail of the person that we’re doing all of this for. And as you can see here, the contact database consists of Michael James, John Lori, and James Low. So, we can first run this. So, now it’s waiting for the messages to come through. And now with Telegram, we can say, “Send an email to Michael James, uh, telling him that we have dinner tomorrow at 5:00 p.m. And can you also put that on the calendar and invite him as well?” Um, yeah, that’s it. All right. So, now we give it an input. Let’s press enter. What this will now do is it will then go to the AI agent. It will then talk to the contact agent because we instructed to use the contact agent first before doing anything else. And now it will take action on the email. As you can see, it used this tool which send an email. And then it sent it to calendar agent at the same time to create an event. Now, if I go to my email right here, I can see that I have dinner tomorrow. We have dinner tomorrow at 5:00 p.m. And in my calendar, I can see that I should have dinner with Michael James at 4:00 to 5:00 p.m. And it also invited his email as well, which is nuts. So, why is this any different from the previous one? Well, this is a very very simplistic version of an AI agent, whilst this is more advanced. It has more features and it breaks down the different steps step by step. Right? As I mentioned, we have the CEO and we have the head of departments and the head of departments are connected to different tools and these tools are employees, right? Instead of giving all the employees and hooking them all up to this tool because then it will overwhelm the AI agent. It has way too many options. The prompt will be way too big. And so we basically want to construct it or deconstruct it and break it apart for it to actually have room for thinking when it’s taking the action that it needs to take. And so this is really really powerful because just by having this one input, it can lead to what over over 10 12 actions, right? Which is nuts. Which is why AI agents are really really powerful when you want to have something that’s autonomous. That’s why they say it’s your virtual employee because your virtual employee in this case is connected to different tools which are different actions and it can do different things for you. But bear in mind that if you want the AI agent to do more things than you have right now, then you have to connect it to more tools and more softwares, right? And what I always think about when I’m building AI agents is that we never want to overwhelm the the AI agent, right? Because if you give it a prompt that’s super super long, it’s still AI, right? Like there’s no 100% fact or no 100% um guarantee that it will always do the same thing. And which is great, which is fine when you’re testing, but when you’re putting it into an actual business, like the margin for error needs to be very, very, very I’m talking like 0.00001% chance it fails. Uh because it’s in production mode, businesses need to actually operate. And so you don’t want something that sometimes work, that most times works. You want something that pretty much all the time works. By pretty much, I mean like 99.99% of the time works. Um but there’s still obviously that that thing of like AI not being able to do everything, right? But it’s great that we can now chat to it and it can now take action on everything that we want. So this right here is the fundamentals of AI agents. Let me show you another example of AI agents and where these can come from. I can simply go to chat GBT and I can just search up Asian mode. So agents are pretty much everywhere because a lot of these software tools, they’re implementing these sort of autonomous systems where you can just say, can you go to Google and find the top five marketing agencies in Ontario, Canada? And just by this prompt right here, what it does is that it thinks through. So it thinks through the actual task and then it takes action on the thing that we told it to do. So now it’s thinking which is the exact same with any as in it has a brain that it thinks through. So as you can see now it’s cross-checking it’s doing a ton of research uh for us and a good thing is that we can see it live what it’s doing which is amazing. And one step above this is I can actually take actions on our softwares. So this right here is obviously going to Google on its own but we can say hey go to my notion and create a task or go here and do something else. All right. As you can see here we got the different agencies the location the key specialties and the evidence as well with all the different sources. and a summary as well which is crazy as in we gave it a simple prompt. Can you go to Google and find the top product marketing agencies in Ontario Canada this is something that you give to an employee and it just did it for 2 minutes and it did a ton of research as well. So that’s exactly why AI agents are so powerful because whether it’s Chad GBT, whether it’s and AI agents, whether it’s relevance, whether it’s lovable, whether it’s Gemini canvas, right? Like we all have different uh the AI agent fundamentals don’t change. They don’t change because they all have an input. They all have an output. And the middle part is the thing that really drives the value because it takes action on us without us having to be so explicit with the instructions or the input that we give it. If you’re enjoying this course so far, then you’re going to love the community that we have right here, which is the AI Automation Circle. is a space with over 3,000 individuals or legends looking to learn AI automations from zero either to apply it in their own business or start selling it to businesses or start their AI automation agency. People introduce themselves every single day. They ask questions, they share wins. We have unlimited tech support. We have all the YouTube resources and people looking for jobs and partnerships. And if I go to classroom, we also have a AI automations 101 course, which is a mini course on AI automations, very similar to this one, but that dives deeper into more frameworks that we use when we’re applying automations to businesses. We have Templates Vault, which is a library of all the different automations that we’ve built so far on YouTube, as well as the blueprints as well. We have weekly recordings because we have two calls a week, and you have all the recordings here. And you also have over $20,000 in discounts with softwares across no code automations, across project management, across AI tools, across marketing, LLM, and other tools as well. As I said, you have two calls a week. And our members are spread out everywhere in the world, which is literally awesome to see. If you want to join, check the second link down below. So, in this video, I’m going to show you step by step everything that you need to know about building your first AI agent on NN. So today, you’re not just watching me build it, but I’m walking you through my thinking, showing you the shortcuts and the mistakes. So by the end, you’ll be able to build your own AI agent with confidence. Let’s dive in. All right. So before we get to the actual build and showing you an end on a high level, what an AI agent is something that has an input and has an output. In between the input and the output, it does a series of actions. So for example, the input could be can you draft an email, right? You send that input over to the AI agent which has instructions has a system prompt and based on what you tell it. So let’s say draft an email like I mentioned it consults with the brain and LLM based on the instructions it was given like hey he just told me to draft an email um what do we do and then based on the instructions and based on what it has to do. So for example if he says draft an email then talk to Gmail. If he says check all the calendar events talk to Google calendar right based on the obviously the instruction was given it will then talk to the tools. It will send a request to the right tool that it needs. In this case, it will be Gmail if it has to be dropped an email. So, it will send the request to tools to Gmail and then from the Gmail it will get a response which would be like hey 200 which means successful. And it will then give us the output which is hey it was all good it was drafted. Check your inbox or whatever right? So input output uh system prompts instructions that we tell it every single time like hey if this happens do this if that happens do that. Brain LLM is essentially what the AI agent is using to think right the open AAI or claude whatever it is and then the memory itself basically is important because it actually remembers the previous questions that we asked it. So let’s say the first question is how are you and then we ask it hey uh can you draft an email for me on the third try we ask it hey what did I ask you on the first on the first question it will remember because it has a context window that’s what we call it that’s what the memory is so input is hey can you do this AI even thinks through the instruction that we will give it through the system prompt it will then talk to the AI because that’s how it thinks that’s it brain and then it will use any tool that is connected to it that it needs to use for that specific task it also has a context window and it will give us the output okay so that’s on a high level what an AI agent is so The first step to building an AI agent is going to NN and pressing sign in. You’ll have to make an account. There is a free account, but I believe it’s 14 days free trial. So, after 14 days, you’re going to have to pay. That’s the way that I have set up. Not really a big fan. Not sure about Zaper. Mic.com definitely has a free plan to start, but um N right here. It will come to this page when you sign up. All you have to do is press open instance and you’ll come to this page right here. Now, this page is essentially the dashboard of N. This is what N looks like. Uh right here on the left hand side, you get to see home, personal, which is in case you want to divide different things in different folders. Uh you have your different automations here, credentials, executions. Uh these are some different metrics that they track. Um just so you know exactly what you’re doing within your workspace. And then right here, this is where you want to press create workflow because this is the canvas for and this is where everything starts. The automation starts here. On the down hand side, we have this right here where we can basically move the automation around. We have zoom, we have um zoom out, we have go back, we have basically if the automation is here, it brings it all back to the center. So that’s what this button does. tidy tidy up right here which also has keyboard shortcuts. Then we go to editor right here which is where you can edit the automation executions where you can see all the different executions that you’ve done. So execution just means you run the automation from start to the end you can see all the executions here. And then evaluations is just for some testing. I don’t use it that much so don’t really worry about that. Then you have this button right here where if you toggle this on it will activate the automation. And what it means is that when you build an automation from start to the end um you can activate it so you don’t have to run it once every single time. Right? production it happens every single time without you having to go to NN then share you can share save you can save the automation then right here you can actually download the automation and you can import from file so let’s say I download this automation I then give it to you and you import it into your own NN you will have the automation done for you don’t have to worry about it so that’s how automations NN workflows really work then right here you can see that you have plus which is basically where you can add the different steps to the automation then we have this right here which is add sticky notes in case you want to add sticky notes right here and you want to sort of walk you through that’s good for documentation in case you’re building an automation you want to explain to someone who hasn’t really seen the automation how it works you can just put sticky notes here and then here you can have the side panel and then here you also have the AI assistant which is one of the best that I’ve seen so far within N&N um and it actually answers most of the technical questions that you have all right cool so now that we got through all that part let’s start with adding the first step so this right here is a node right this square right here is a node when we press on this node we get this panel right here now in order For us to build an an agent, we ideally want to talk to the agent itself, right? We want to chat with it. So the trigger basically means what’s that first thing that actually starts the workflow like what is that thing that activates that starts everything. So in this case we can trigger manually which means that you can let’s say we go here we can execute workflow which means that it starts the automation and this just executes the automation starts the automation from scratch but this isn’t really best for us when using an AI agent because we have to trigger manually every single time. Then we have on app event on a schedule which means you can run it every day or every hour. This is based on apps. Then we have a web hook here which is where you can use web hooks to get notified. We can use a form we can use when executed by another workflow and then we can have chat message when running evaluation and other ways as well. Now for AI agent specifically we’re going to use on chat message which means I can actually talk to the AI agent itself. So let’s say I open the chat I can then start talking. This is basically what’s going to start the automation. So let’s say I put hello it will start the automation. So the node executed successfully. This means that everything was good. And you can see the green mark which means that everything was good. All right. So in order for us to then connect this chat message because ideally we want to talk to the AI agent. We don’t just want to talk to any end right? We want something out of it. We want to press plus and then we have different options here. Now the options are AI which is what we’re going to use action and app. So you can actually scroll through all the apps here and you can add any apps here. data transformation flow core human in the loop add another trigger which are cool things that you actually can use but for the sake of this video and AI agents we’re not going to go into that but let’s say we press AI we then have different options we want to press AI agent now you can simply talk to anthropic which is claude you can talk to open AI individually or Gemini but for this case the AI agent uh node is exactly what we want so when you press the AI agent node uh which is obviously the node is just a square this thing will come up now the way that end is actually set up which is probably one of the platforms that I’ve seen they have the input here which is the steps from the previous so the variables or the things the output from the previous step then here so this is the input then we have here the configuration of the AI agent this is how we set everything up and then here is the output so what is the output of the AI agent so going here we have again by the diagram that I showed you at the start you have three different things that you have to connect the AI agent to the first one is a chat model so what chat model so in this case what LLM openai claw whatever it is uh do you want to connect the AI agents What memory do you want to connect it to and what tools do you want to connect it to? So in this case for chat model I can just press plus. I can then have a choice of few a few chat models. In this case we just go safe with openi. So I can go here openaii chat model. You’ll have this page. All you have to do to actually connect the openi chat model is go here to credentials create a new credential. Now in order for us to actually connect openai to nn we need an API key. Now API keys API stands for application programming interface. It’s the way that a lot of softwares talk to each other or how softwares talk to each other. Uh and the key itself allows us to authorize that this is our account and we can actually use it. So in order for us to get the API key, all we have to do is open a doc. So you can simply talk to the the AI set in NN. But in this case, we can just press open docs. This will open the uh documentation for NN which is where we can look at this. Now it says refer to the OpenAI API documentation uh API keys create. Okay. So all you have to do is log into openai account which is essentially platform.openai.com. You’ll have to make an account. So sign in with Google. And by the way, just because you pay for Chad GBT does not mean that you can use this different things, right? Different things. One is for the web and one is for APIs. So once you log in, you’ll have you’ll come on this page. All you have to go to is dashboard. On the left hand side, you have to go to API keys. And this is where we can create a secret key. So go here. Let’s do test YouTube. And I can create a key. So leave this all here. Owned by me. All restrictions. Project is fine. Let’s create a secret key. I want to copy it and then paste it in edit end right here. Paste it here. And if I press save, this will save it. Right. Connection tested successfully. So now the open AI is actually connected to this. Now for the model itself, I want to leave this to GPT 4.1. You can use a bunch of models. Now bear in mind that not all models work with AI agents. They might work with a normal AI node that you can use AI in the process for a workflow. But for AI agents, not all of them work. So in this case, leave this as GPT41 mini. Uh and then we go out. Okay. So in this case now, we connected the open AI chat models to the AI agent. And then we go down to memory. Now memory is basically saying what memory do you want to implement in the AI agent so that it remembers the conversation that we’re having. So if I press simple memory right here, you’ll have you’ll come on this page and you have the session ID which just leave this as this because we want it to connect to the chat trigger node. uh the session key from previous node. Leave this as is. We don’t need to modify this. I mean, we can’t in the first place. And then it’s asking us for the context window length. Now, the context window length just means how many past interactions does the model receive as context. Now, what does this actually mean? Let’s say we say hello and then it says hello, how are you? Good. That’s four different uh interactions that we’ve had, right? So, four different things, four different messages as a total. So you want to make sure that the context window is a bit larger in in cases where you want the AI to actually remember the previous conversation in case you want to change some things. Um so that’s what the context window length is for. Now I want to leave this at five just to keep it simple. Again don’t change any of these. Just put five here and that’s all good. And now the AI agent can actually have a memory. And then we have tools itself. Now tools are essentially softwarees that we connect to the AI agent. So when we say draft an email, it will go to the software and actually do it. but it needs to be connected to the software in the first place. So for today, let’s uh let’s make an AI agent that can draft an email and that can get calendar events. I think that’s the pretty the most straightforward one. So all we have to do to connect the tool is first for email, we have to connect Gmail and for calendar we have to connect Google calendar. So we press and now it’s going to ask us to do different things. In this case we just want to connect it to other tools. So in this case we have a lot of integrations, a lot of softwares. We can see we have Asana, Apify, Claude, Air Table. In this case, the search for Gmail and we have Gmail tool. When we get to the Gmail tool, this is how you connect Gmail to NN. I go here and I can press create a new credential. When I press create a new credential, it’s very, very straightforward. It used to be harder before. All you have to do now is actually just sign in with Google. When you sign in with Google, it will take you to this page right here. You can choose which one you want. In this case, let’s just do this one right here, my work email. It will say connection successful. Now we can go back to NN and we can see that the account was connected. Now name it whatever you want and that’s the name there and you can save it. Okay, that’s how you connect your Gmail to NN. So once you have this you can then put tool description as set automatically. That’s fine. Then resource let’s just put draft because you want to draft an email not actually send the email. And then for operation we can put create. That’s fine cuz you’re creating a draft. And then for the subject and the message which just means subject of the email and a message of the email. we can press this little button right here which means that we let the model define different pattern. So we let the model say hey based on what you’ve given me using AI this is exactly what the subject line is going to be. So in this case I just put this button right here which means that it will be defined automatically by the model and also this button right here. So that way when I tell it to drop the email I don’t have to tell it exactly what the subject line needs to be and I don’t have to tell it what the message needs to be. Right? Everything is just straightforward. It does it on its own based on the context that we give. Okay, cool. And then leave this as text. Uh you can use HTML which is just a way to make the emails fancy. Um and that’s fine. And then here I think yeah we have to add two email. So two email essentially who are we sending the email to that we’re drafting. So in this case you also want to put this right here. Let the model define the parameter because the AI agent actually decides or knows the email or it’s going to ask us the email that we need to draft the email for. Uh so it will add it here as well. And then we want to put create a drafting Gmail. That’s fine. All right. Cool. So now we connected Gmail to the AI agent. Now let’s do calendar. So go here, press plus and look for Google calendar, Google calendar tool to connect it. I already connected. You can see everything. Uh but in this case, let’s just put create a new credential, sign in with Google again. Do the same thing we did for Gmail and it’ll bring it all back. You can close it, I think. Yeah, close it. All right. So now that we connected our account, all we have to do is set this automatically, which is fine. The resource will be event. Uh the operation will be get many because we’re getting many events. You can see here you can retrieve many events from a calendar which is exactly what we need. Uh the calendar which is mine which is fine. The limit will be 50. So 50 events can be um retrieved at the same time. And then it’s asking us what is the time frame before and after in this case because it’s not fixed. We just want AI wouldn’t let the model define this. So based on what we tell it so let’s say we tell it tomorrow. It will know that it’s after yesterday. Um so after today, sorry, after today, then before tomorrow or before in 2 days, right? Um that’s like the time frame between each one. So that’s that’s the thing we want to let the model do. All right. So that right there is how you connected the different tools to the agent. So we have the chat model, we have the memory, we have the tools, and now on to probably the most important part is the actual prompt, the system instructions that we tell the AI agent. So if you go here, we have to add an option which is the system message. So the system message is essentially I mean like this example, we’re telling the AI agent what it needs to do. So for the system message I actually have a structure that I use every single time which is this right here. First we say you are a identity. So you are a helpful intelligent assistant AI agent designed to handle various tasks efficiently. Your primary role is to task. So to do the different tasks that we have in this case is draft an email and get calendar events. You have access to how many number of tools? In this case is two to help you fulfill um requests. The first tool is draft an email. So what what does it do? In this case it will drop an email. Second tool is calendar. In this case, we have to get calendar events. And then you say, when a task requires you to use one of more tools, make sure to identify which tool is most appropriate. Pass along the relevant details and execute the actions needed to complete the task. Your goal is to be proactive, precise, and organized in managing these resources to provide a smooth experience for the user. And then we say, here is the current date and time. Now, why do we say this? We say the date and time for today because AI is actually not the best at guessing what date it is today. So, we always want to put this especially when you’re including any uh any times into your emails or any times into the calendar because if we say tomorrow, usually it might mess up in knowing what today is, right? So, definitely we’ll get tomorrow wrong. All right. So, this is the prompt that we have. Let’s copy this. And by the way, I left all the resources down below. So, you can copy this. I’m going to go to NN and then I’m going to delete this. I’m going to paste this. And I’m going to press this button right here, which basically puts everything um on a wider scale so I can actually see it. All right. So we have identity. So you are a helpful intelligent intelligent executive assistant. Now AI agent design tasks. Your primary role is to let’s delete this and put draft emails and get calendar events. You have access to two tools and then first tool is Gmail. Explanation is Gmail will be used to draft an email. First step is identifying what email we are drafting the email to. then understanding the context of the email and then actually dropping it. And then second tool will be the calendar which will be uh this tool will be used to get calendar events for any given time frame. First understand what the time frame is and then understand what kind of uh then return the calendar events. Okay. So why am I saying I’m giving an extra instruction. So I say the first step is this, second step is this, third step is this. is because the only downside to an AI agent is that we’re relying on a prompt to do things for us. So for us to actually implement it and actually working 100% of the time, we want to make sure that we give it as clear instructions as possible. Uh so in this case tools to get calendar events and then we leave this as here. Okay. And we go here. All right. So this prompt is done. All right. So the AI agents is successfully set up, right? We have the prompt, the chat model, the memory so it remembers the conversation, the Google calendar which we can use to actually get events. creating a draft using Gmail and then we can now actually test it. So let’s go here. Let me go here and let me actually talk to it. Let me say hello, how are you? It usually never likes this question. It will talk to the chat model. It will think through the things that I told it and it will say hey he just asked me how I am. I’m not going to use any calendar events or draft because that’s not the instruction that was given. So this is the the thing about AI agents. They’re smart enough to understand. Uh, let me ask it so you can see the memory. What was the first question I asked? The first question you asked was, “Hello, how are you?” So, you see how it remembers previous ones? That’s the memory that it has. It has the context window like I mentioned. All right. So, now let’s actually put this to test. Let’s create a draft on the email. Um, let’s say I want to create a draft uh email draft. So, it will think through does do I have enough context to actually create the email? And then it will ask me, hey, they received an email address. It needs a subject line. It needs the message or content you want to include in the email. So in this case, I’m going to give it a email address. So the email address will be my email. So this is the email address right here. And then in the email, just say that I’m happy you are building automations on NN and that you are going to take over the space. There you go. Right. So we save this. What it does is that now it has enough context to actually draft the email. It’ll send back an email saying, “Hey,” or send back a message saying, “Hey, I’ve created a draft for you with a message expressing the happiness about building automations in NN.” And so, if I go to my email now, right here, I can see that I have drafted an email saying, “Hey, great to see your work on NN Automations. Hik, I’m happy you’re building automations on end. You’re going to take over the space. Best regards.” Right? And this was done using AI. I just told it to the overall context of the email and it show it does it did the subject line and it did the body of the email and it send it to the email that I told it to. So that right there is for the Gmail like thanks thanks a lot. All right so let’s do the calendar. So let’s say I let’s go to my calendar. Let’s see what I have on this week. Okay. So this week I have groceries tomorrow and then I have strategy session with James on the 21st. These are all connected to different accounts. So if I say theoretically can you get all the calendars that I need for or give me all the events that I have on this week it will say I have outskill I have strategy session and I have groceries. So let’s go here. So now I’m going to ask it can I have all of the events I have going on this week. So now what it does is that it talks to the AI goes to Google calendar pulls it back. It takes a while because I have three events or four and it tells me every single thing. So I have outskill on August 14th, groceries on August 19th, strategy session with James on August 21st, uh, and outskill on August 24th. Now outskill is something that I had today like this morning at 1:00 a.m. Um, which is why it tells it as well. Um, so that’s why it says next day and it gives me all the events right here. Right? So I don’t have to go to a calendar. I can have an AI agent actually pull this for me. Now this right here is a very very elementary example. I just wanted to show you exactly how you can build one step by step. And we only have Google calendar and we only have credit drafting email. But we can add hundreds of more softwares to this which makes AI agents incredibly powerful to use for businesses because it saves them the time to have to go to the software to find something. Right? So very very good. Now the most important thing when it comes to the AI agent is not the tools itself. It’s not the memory or the model. It’s the actual prompt that you tell the AI agent to do. because once you have 20 tools hooked up, right, like these, once you have 20 or even 30 tools hooked up to the same AI agent, it makes it incredibly powerful, but it also increases the error or the chance that it actually errors out. Errors out just means that it doesn’t do what you want it to do, right? So, you want to make sure that the prompt itself is so so like 90% of your time or 80% of your time should be spent towards the prompt because you saw that setting things up on Google Calendar and Gmail is actually not the hard part, right? You want to make sure that what you tell the AI to do, it actually does it. So, that’s what the prompt does for you. Congrats on now being able to understand and build your first AI agent inside of init. In the next section, we’re actually going to make it smarter. We’ll dive deep into how you can actually build high-erforming, scalable AI agents using advanced frameworks and prompting techniques. You’ll discover how you can structure AI agents using data tables, integrate them with thousands of AI models, all within one tool, and apply practical frameworks that will make them 10 times smarter. So, by the end, you’ll not only be building agents, but you’ll build actual systems. In this video, I’m going to show you eight Nitn AI agent hacks that I wish I knew when I got started that will help you build AI agents at three times the speed and make them way more powerful. All right, so here we have an agent in Nitnen. And the first hack is that you can actually chat to it, but you can make the chat public available because tons of times you can actually speak to the AI agent like this. But what if you don’t want to go into any what happens then? Do you have to use Telegram? Do you have to use WhatsApp? Well, in this case, you can actually get a link using this button right here. You can copy it. We can then make the actual agent active, which means that we can use it now. And if I paste it here, I can see that now I can actually chat to it as if it’s a chatbot. something that most people don’t know because that hence why they connect this to a telegram or something else. Well, you can actually just use this URL which is public that you can chat to it say hello and this will execute right. If I go to executions I can see that we just executed the workflow right it went here it used the open router which is the LM which is his brain and he gave us hey how can I assist you today and let’s say I wanted to send a message in Gmail I said send an email to mikuela.45gmail.com [email protected]. I’m going to press go. So, we sent it a message and now it’s asking us, sure, what would you like the subject and message email to be? As you can see here again, it ran. So, if I refresh, I can see that it ran again. And the input was send an email to me. 45. And if I say that we have dinner tomorrow, I can go. This would just ask me the subject line because of the fact that we didn’t prompt it, right? But let’s say it’s dinner at 7 p.m. And now you can see that the email about having dinner at 7:00 p.m. has been sent. So if I go to my email, I can see that we have dinner at 7 p.m. right here. All right, the second set of hacks is within the brain of the AI agent, which in this case is Open Router. And in case you want to watch how to connect Open Router to N10, check out the video up here. As you can see here, we have all the models that we can think of. Quen, Grock, Chat, GBT, Deepseek, all that stuff. But the hacks is within the options. So we have all these options that most people don’t use because they have no clue what they are. So the first one is frequency penalty. So the frequency penalty can either go to I believe two and it can either go to -2, right? So from -2 to two. A lower value tells Chbt, hey, can you make the actual thing more repetitive? Which means whatever you’re saying, use the same kind of words. Whilst if I put two a higher value, it’s more creative. So we’re giving Chad GBT or the I’m saying Chad GBT because we’re using OpenAI, but we’re giving the brain or the AI agent the ability to change how repetitive it is with the answers that it gives us. Then the second one is maximum number of tokens. And so a token is actually four characters. So if I put a token limit of let’s say 200, this would be roughly 800 characters, which means that it will cut the actual text, the output that the LLM in this case gives us. This is great if you want to set a limit on the amount of words that you want the AI in this case the brain to give you to actually save money on credits for the chatbt claude gro anything like that. The next one is response format. So we have text and we have JSON. So usually you would have text but JSON is great in case you want to take some sort of input and structure it in a way where we have variables come out right. So let’s say we have a block of text which contains first name, last name and email, right? But it’s not structured. It’s all within one place. We use JSON to actually structure it. So we can divide the first name, divide the last name, and divide the email. But usually we use text just because of the fact that we also have another hack which allows you to do that structuring thing that I just told you about. Then we have presence penalty. So instead of words in this case, it’s the topic itself. So if you put a higher number, then it’s more creative. A lower number is more repetitive. Then we have sampling temperature. So a lower temperature in this case is more predictable. And the higher temperature is more creative. So we give AI the ability to be more creative when giving us the output. Then we have timeout. So sometimes the AI agent actually runs and the open router starts running and it doesn’t work right. It keeps on running and running and running. Maybe there’s some problem with a server. So what we say here is we say hey you have 360,000 milliseconds I assume maximum amount of time request. Yeah milliseconds. And we say hey you can only go until this long and after that just stop. It’s just easier when you want to error handle which means that when something goes wrong just stop the workflow. when it runs past a certain time period. In this case, it’s 360,000 milliseconds. Um, and we just stop. The next one is max retries. So, sometimes you use open router the LLM, but it doesn’t work. So, you say, hey, if something doesn’t work, just try again this many times. So, if you put 10, then it will try again 10 times. Then we have top P. As you can see here, if I go hover, it says controls diversity. So, it’s controlling the diversity of the output that we get from the LLM. All right. The next hack is actually the ability for AI to be able to enable a fallback method. So enable a fallback method means that if this doesn’t work, we can actually add a new LM as a fallback. Right? So if I put OpenAI here, that means that it will first try here and then it will try OpenAI. So let’s say I go here and I add a fake connection. I do. So just do test save. Let’s do this test. Right? So this is a fake credential. It shouldn’t work. If I go here and I chat to it, hello. What this will now do is that it will go here. It has an error, but it will try again because it has a fallback lm. And so that’s amazing because sometimes the first one doesn’t work, but the second one does. All right. The next one is within the actual memory. So if I go inside, I can see that we have a context window length, which most people still have no clue what it means. What this means is that five, this is the amount of past interactions. So let’s say you say, “Hey, how are you?” That’s the first interaction it responds. Then you ask another question which is can you send an email to John and then can you add a Google sheet? Can you add XYZ? Right? Then it will get the past interactions which is your questions as context for the next output. Right? So if you put 10 or if you put 15 then it will take more interactions in the past that it will use as context. Now why do we want to restrict this to about 5 to 10 is because the more interactions the more how would you put it? more context you give it, the more it can pull, the more credits you use. And so five, I think, is a suitable amount of interactions that we can use within the AI agent. But you can increase or you can decrease. The next hack is actually within the tools. If I go here and I put think, I can see that I have a think tool which invites the AI agent to do some thinking. So in theory, the AI agent typically thinks through what it needs to do using its prompt or its LLM. In this case, it would be open router. But we give it an additional tool, the think tool, which allows it to think even more. As you can see here, we have a predefined prompt, which is a prompt that we never put before. It’s already here, which has use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed. And so this right here is the ultimate assistant AI agent that I built, which is connected to a contact agent, email agent, calendar agent, and content creation agent. And so by feeding it the tool which is the think tool, it gives it the ability to have a another step of reasoning. Reasoning just means to think through what it needs to do to then be able to actually take the right action in the right order as opposed to not having this and just using the prompt and using AI, right? Sort of like that extra step. And the next hack is actually the ability for us to be able to connect AI agents within the tools cuz most times what you do is just connect it to the software. So Gmail or you can connect it to an external workflow. So you say sub workflow. So where is it? Sub uh workflow calling anytime workflow right here which basically calls another workflow to take action. But what if the workflow was inside this workflow right? And well in this case we have access to the contact agent which is another AI agent which is connected to more tools. And the same thing with email agent, calendar agent and content creation agent. This gives us the ability to be more flexible in the I guess AI agents that we build and have that extra feature of not having to build another AI agent in another workflow and just have it all within here. All right. So the next one is actually within the tool software. So if I go in here to send a message, we have to make the connection. We have to do set automatically the action the thing that we’re doing. And now we’re introduced to three different variables that we have to do as an input. You can put your email here, you can put the subject line, and you can put the message. But because of the fact that it’s a chatbot, so the input changes over time. What we can do is press this button right here, which lets AI in Nitnen define the input. So it defines what goes in here so that you don’t have to put it manually, right? You give AI the ability to choose what goes in there as an input u for you to do it. And this makes it so much easier for us to be able to make AI agents because all we have to do is literally just press this button for any parameter that comes through. All right, the next hack is actually the ability for multiple AI agents to be connected to the same exact model, right? Which you can see right here. We have one step right here, which is not an AI agent. It’s just an AI step, which is connected to a model. And we can see that all the AI agents are all connected to the same exact thing. All right. So, the next hack is actually the ability for us to use the structured output parser, which allows us to be able to do the thing that I mentioned before, which is using JSON to take an unstructured input. So, it can be a block of text, can be whatever it is, and we structure it in a way where it actually makes sense. So, a variable. In this case, we have a human in the loop sales agent, which drafts sales emails for us. So, I put my name, my email, my company name, intent, budget, project description, and timeline. I can press submit. And what this will now do is it will send it to the Google sheet. it will add it there to our CRM. It will then talk to the sales agent which will speak to first of all claude which is its brain and then it will then speak to the structured up parser because that is a thing that is going to help it to be able to make the subject line and the body of the email which is then going to be sent to our email. And if you go right here I can see that this was the input which is a block of text and the output was the email body and the subject line as well. And if you’re wondering how we wrote this, you can simply go to chat GBT and ask it, hey, can you draft me a input schema using JSON that allows me to have a subject line in an email body of the email? And that’s exactly what you paste here. And that’s what the AI will use to then give you the output that looks like this from an input that looks like this. So that marks the end for the eight and AI agent hacks that I wish I knew when I got started that makes your build of AI agents much faster and way more powerful. Hey, in this video I’m going to show you four agentic frameworks that can make your AI agents inside of Niten faster, smarter, and way more scalable. You see, most people try to build one big agent that does everything. But that’s why it breaks. It slows you down, and honestly, it’s impossible to scale. So, I’m going to walk you through each framework step by step, show you exactly how it works, when to use it, but also when you can apply it within your automations. With that being said, let’s dive in. All right, so the first framework is the prompt chaining. So what this means is that you are using a AI agent and you’re prompting it in a chain. So you’re saying, “Hey, let’s use the AI agent for to do this first. Then you chain it.” Chain it just means you connect it to the next AI agent which does another thing and then chain it to another AI agent which does another thing and then you do whatever you have to do, right? So this right here is what we call sequential reasoning where each AI agent um builds on the previous output to refine accuracy and context. So this right here is based on the output of this. This right here is based on the output of this and so on. And this framework is great for multi-reasoning. Um, but I’m going to show you exactly what that looks like. So, right here we have a form which leads into the first AI agent uh, which writes the outline for the blog. Then it goes to the second AI agent which looks at the outline. It evaluates how it is and it changes it up. And then we give it to the third AI agent which actually writes the blog before putting the blog into a Google document that we have access to. And so if I go here to execute workflow, I can put AI in finance or whatever topic you want to talk about. I can press submit. What this will now do is that it will send the data to the first AI agent. Right? This is chaining prompts because we have one prompt here which does its own output. Then it goes to the second one to do its second output. And then finally it goes to the third AI agent again prompt chaining. We’re chaining different prompts. Um because these are a series of different prompts, right? This prompt is just to make the outline. This prompt is just to evaluate the outline while this prompt is to actually make the full blog based on the outline. Right? Three different prompts but we’re training it together. And then finally we will add it to our Google document. As you can see we’re finished. If I go here, this is the blog that we get uh with all the information from these different agents. Now don’t get too fussed about the actual quality of the blog. I just wanted to show you exactly what the framework is. But going inside here for example, we have the same prompt. So system message. This is one prompt which the user message because the user message is the thing that we actually give it. The system message is basically giving the AI agent context what it needs to do in general which is then changed to the second prompt which is a different prompt right here right right here with a user prompt as well. And then we have the third AI agent with another prompt which is the one right here. And yes these are very very small prompts just to show you an example uh with a user prompt as well which are all changed together. And one main advantage to this framework as well is that when you prompt chain, when you add one step after the step after the step as well, it’s much easier to debug. Debug just means that if something goes wrong, how can you fix it? How can you go there and fix it? Well, it’s much easier here because it’s linear, right? Linear just means that it’s one line, right? This is one line. It doesn’t go up and down. And so when there’s a problem, it’s much easier to go here and fix it because you know exactly what step it came from. The next framework is called parallelization. Is a big fancy word. uh which basically means that we have multiple agents. So you can have three, four, five, 10, 11 uh which are all working simultaneously which means at the same time on different tasks right and so let’s say we have a AI agent which allows us to create the LinkedIn hook then the LinkedIn body then we merge them and then you send it to the final agent to make the final post. So let’s say I say write a post about how AI is going to impact agencies. I can press go and now what this will do is that it will send the information to the first AI agent to write the hook. then the second AI agent to write the body and then we merge them together. We put them all in the same paragraph which then goes and feeds into the final AI agent to write the LinkedIn post and then it gives it to us on here. So our AI agency is ready for the AI revolution. The tools we want to use are evolving fast and it gives us the whole body. Again don’t look at the quality just look at the fundamental theory behind this AI agent and how it works. And as you can see we have the output right here the first output. This is the hook. Then we have the second output right here. And the way that this fundamentally works is that we have the data going here. And then we have also the data going here. But this doesn’t go through until this finishes as well because they’re all connected to the merge node. And the merge node makes it so that we say, “Okay, cool. Go to the length and hook and write the length and hook, then send me the input, the first input, which is input one. Then go to the length and body and send me the second input. And only once when I have both inputs together, then I go to the next steps, right? Which is great because now we get two items which is right here. One item and one item. Then we can then use the aggregate module or node. As you can see here by the diagram is that we take multiple series of items and we put them all in one. And if I go here, I can see that I have the output one and the output two, right? which is the hook and the body before feeding it into the final agent right here to write the LinkedIn post which is the output right here right and so we give it the output which is the called an array an array is just a way for us to store different pieces of information and so that’s really how the parallelization works now the reason why we would use this over the others is because it is faster at processing information um as you can see here it goes here and then it automatically goes here not automatically but in a faster way rather than the other frameworks And then we can merge them all together before sending it to the agent. And it’s very very structured in a way where we go to the first one then the second one and the third one and the fourth one. That way you can keep track of all the single steps. And one more thing it can do is that it reduces the bias or error uh from a single model because we have these different agents giving their own perspective or or the output in this case. And this right here typically we would use it for research uh or multi-dommain inputs where speed and diversity matters. And the use case of using this type of framework is when we are doing research where we’re doing research we typically want to split it up in a way where we do one sort of piece of research first then we go to the second one then we go to the third one and so on. So that way you’re splitting it and then you’re merging it all together and then you’re aggregating it and then you’re doing something else. The third framework is called the routing framework. Now this dynamically directs the data. So this sends the data to the appropriate agent based on a classifier. Let’s say we receive an email. Then we have the step right here which is classifying the email based on whether it’s in high priority customer support promotions or finance and billing. And based on the answer so based on the classification of the email that we receive, we send it to the appropriate agent we go here to the higher priority agent customer support agent promotion and finance as well. And then they can execute their own tasks which means that they can do their own action, create their own emails and so on um by their own right and they’re all rooted by the output that we get from the previous step. And so this is great because it makes our AI agents and workflows much more adaptive, right? And we are only using the right model or logic when we have a certain use case, right? So in this case, when we want to add a new step, all we have to do is go in here, add a category. So we can say love, hello. And now we have a new filter right here, which you can then add another AI agent. So agent and we have this here. And you can easily add more and more options based on the output that we get here. And this is great again because when we have a input and we want to classify the input based on whether it’s X, Y and Z, then we can have a logic that says okay if this is something then we send it here. If that is something else then we send it here and so on. And you go through the logic as well. And so let’s say I send myself an email right here. I can execute the workflow. This will then be able to classify the email based on whether it’s all of these. In this case, it saw that it’s promotions. And what it did is that it spoke to the AI agent to then create the email that we can then have in our draft. And if I go here, I can see that it dropped the email back to the email that we got here. Of course, this is a spam email, not spam, but promotional from Wise. Um, but as you can see, the AI agent drafted a very, very insightful email um using the prompt, right? And so that’s essentially what it does. Very very easy. only use this framework really when you want to be able to route to the appropriate agent based on the input that we get. And the best use case that I can think of when it comes to this framework is just this, right? Getting emails, classifying them, and then sending them to the right agent uh based on the type of email. The last framework is called the optimizer. If you haven’t watched the full video of me building out this human in the loop AI sales agent, watch it up here. But the way it works is that we have a form right here which has different details that the customer or the lead in this case would fill out. So let’s say I put my name, email, company name. I’m looking for a lead generation service. My budget is less than a,000. My project description is that we want a system that can generate more leads and we want it within a week. If I press submit, what this will now do is that it will add it to our CRM. In this case, CRM is just a way that we store information about each client or leads. Then it talks to the first AI agent which writes the sales email that we can send back. What it does then is that it sets a variable. In this case, the variable would be subject and email body which is subject here and email body which will send it to our internal team. You can see here we have the action required new lead with budget of less than 1,000 and a team member from our team before sending it to the actual customer. We can respond. So I said don’t ask them a question. uh just telling me we’re available at Tuesday 3 p.m. tomorrow because as you can see here it asked them a question of whether they are available. I press submit. So I give a feedback. What this does is that it then classifies the feedback whether it’s a positive feedback or negative feedback. If it’s negative, what this does is that it roots it to the next step which actually based on the feedback that we gave it rewrites the actual email using the next agent right here. And it gave us a new email which we then send back here because again the name of the variables is the same whether it comes from here or from here which we are able to then send it back to our team right here for another revision. I can press respond. I can say, as you can see here, we we actually have the the revised version. So, Tuesday at 3 p.m. And I can say yes, all good. When I press yes, all good, and I submit it, what this will now do is that it will send the email because now it’s it’s approved. It’s positive feedback to the customer. So, if I go here, I can see that I’m obviously I’m the customer and I’m the team member here. But this is what the customer will get. They will get a fully sales optimized email obviously with results and everything that responds to their inquiry from the website. And so this framework right here is amazing. It’s actually one of the best frameworks that I’ve used so far within AI agents when it comes to adding a feedback loop, right? Because what we’re doing here is that we’re writing the sales email and you can apply this to content or whatever it is, but we’re writing something then we’re sending it for revision to our team. Then the team gives us feedback. Then based on the feedback, we categorize whether this is positive feedback or negative feedback. If it’s negative, then we send it to another AI agent. So as you can see here, we have two options, approved or denied. and we give it the description of what approved is and what denied is and based on the appropriate output so whether it’s actually approved or denied we send it two different ways again denied will go to the AI agent which revises the email and so this is prompted to to know that this needs to update the sales email based on provided feedback and this is the email that we get which we send back here which then sends it to our team again for human in the loop and this is a whole repetitive process over and over again now this is great because it enables the AI a agent to have continuous learning, right? Because most of the times, not most of the times actually, sometimes the AI agent will not spit out something that we’re actually happy to send to the client. And so instead of sending it to the client directly, what we do is that we have a repetitive process. As you can see, this is a circle sort of whatever you rectangle. All right? But the concept is that we have a loop, right? Human in the loop. The human is always in this loop and we’re able to give it feedback and iterate on the feedback again and again again and again until we give it positive feedback saying yeah all good or yeah no changes and then it sends it to the client itself and then it does its own thing. Now this is great for systems that require quality assurance which means that they require someone to give some sort of input or feedback based on the output that AI gave. Um this can be applied to again sales outreach or customer support because those are the ones that interact with a customer. And so between the AI making something and the customer receiving that something, there has to be an intermediate step of us giving a feedback. And usually that’s having another person, right? And so in this case, this allows us to have a repetitive loop, feedback loop to generate different things. And that’s where we would use the optimizer framework. In this video, I’m going to show you exactly how to prompt your AI agents inside of any so they actually do what you want with less errors and more accurate results. I’ll break down the main types of prompts, show you exactly how to structure them, and explain how to write prompts that actually get results. All right, so to quickly recap what an AI agent is, we have an input, we have an output, and in the middle, the AI agent is instructed, right, which is the prompts that we’re going to go through today. Uh, and based on the instructions, it then uses its brain, which is LLM, which is just an AI, which thinks through the instructions, and then takes action on the tools based on the instructions that it was given. So, it’s exactly the same as an employee. It’s only AI. And the instructions that you give it are going to be in a prompt format in an actual text. So, this right here is what it actually looks like. This is the most basic version of an AI agent inside of any. The first thing we have is a chat. So, I’m going to go here and talk to it. I’m going to say hello. What this will do is that it will send the input over to the AI agent. It will then call its brain because that’s how it thinks. and it will call the memory tool because we also have the ability to remember uh the conversations that we had. Now inside the AI agent we only have two types of prompts only two right the first one is a user message and the next one you can find right here is a system message. So in this case if you have an employee right you tell the employee a task you say hey can you do this for me that is a user message. Then the instructions that you gave the employee before that is a system message. So two different types of prompts for two different types of reasons. And so right here we have two different options for source for prompt. Source for prompt just means hey where are we getting the input like what is that thing that we’re receiving and where is it coming from. We have connected chat to a node and we have the find below. Now if I go out of here I can see that right now the AI agent in this case is connected to this node right here. A node is just is a square. That’s what they call it. And this right here is a chat trigger node. It’s one that is native to nitn which means that nitan owns it. And typically that is what we use to be able to speak to the AI agent, right? And so the input comes from here. So if I go inside, I can see that we chat to the AI agent through the chat mode. So through here I go here open chat and I say, “Hey, so where are you from?” Right? And so right now what this does is that it takes this input, right? Where are you from? It sends it over here and this will now be the user message, right? So this JSON fancy thing that you see which is code because again everything is code behind the no code platforms the irony there. Um but that is a thing that the AI agent uses as sort of an input to then take action right the second part is the find below. So there are times where we’re not connected to the chat node. So every single time that we’re not connected to this node right here we have to use the find below because we have to define the input based on where it comes from. So, for example, if we have an AI agent that looks like this and the input comes from Telegram, which is just a platform where you chat um sort of like WhatsApp. If I go inside here, I can execute the step and now it’s going to wait for someone to send a message to Telegram. And right here, I have a new chat pulled up. And when I press start, it automatically sends a message, which is slash start. And that is a trigger right here, which is text start. And now, this is a thing that then goes into the AI agent. And now we use define below because this right here chat node like I mentioned is only for that specific node and the node changed to telegram. And so we have to change the input that comes in. And how we do this let’s say this is empty. We just take the input which in this case would be text right because that’s the text that we get and we drag it across here. Or alternatively you can curly bracket curly bracket dollar sign JSON dot message dot chat. And so let’s say now I execute the workflow and I just talk to telegram and I say hey how’s it going what this will now do is it will send the input over here it will then talk to its brain and then based on its brain and based on the instructions that we give it which I’ll show you exactly how to write that instruction then it will do its thing it will give us the output and the output will be in telegram which in this case it’s hi I’m ready to assist you how can I help you today and so that’s where we would use the define below rather than the chat trigger node And this is the one that we mostly use because again charter node I feel like we only use it when we test uh rather than anything else. So I’m going to say hello here just to put this as an example. And now we’re going to go on to the most important prompt which is the instructions. So that’s system message. So if I go to system message and I go to expression and I go to full screen. Now this is the playground. This is where we write the actual prompt. And so I’m going to paste a structural prompt that we typically use right here. Now the first thing is the actual formatting. So we use something called markdown formatting. So if you see uh these sort of hashtags or sometimes you even see this right here. What this is is let’s say I go to a Google document. If I write hello right and I go to right here heading one I can also write hello and then this turns to heading one. And so what this means is that this is heading one. This is heading two. This is heading three, right? And so why do we do it? It’s because then the AI knows the hierarchy, right? Sort of like you’re doing an essay. If the essay does not have a title, subtitle, uh the text, description, all that stuff, then it’s very hard to understand. And so you are using these, you’re using hashtags, right? In this case, this is one, in this case, it’s two. In this case, it’s three. And you can go to four as well. Then the AI knows exactly, okay, this is the main thing to look at. Then this is the one below it. And then this is the one below it. And so when we look at this, we’re saying, “Hey, this is the title of the first thing and then the text, title, text, title, text, and so on.” And if you add things like these, then this would bold it. So something like this on a Google document so that within the text, it recognizes that this is an important word or an important phrase. And it does the exact same thing for all of them. Now, let’s say that you wanted the overview to be the title, this as well, this as well. But you realize that examples aren’t that important to be a title. All you have to do is just put another hashtag so that this becomes heading two and so AI understands right based on the logic heading 1 2 3 that this is less important than this and so it will prioritize looking at this before looking at this. Now the first thing of the prompt is an overview, right? So you are a your purpose is to now if you’re watching this video of prompting then you’ll probably be seeing prompts that look like you are a helpful intelligent content writing assistant. You are a helpful intelligent something something assistant. The reason why we do that is because we’re giving AI an identity. Okay? And by giving AI an identity then we’re saying then what it does is it allows AI to psych itself to make it think that it actually is that identity. So the output will be higher. And so here we start by saying you are a helpful intelligent personal assistant. Uh the only tool that we have connected to it is send a message. So that’s fine. And now we say your purpose is to and then describe what the AI agent actually does. And so here it would be your purpose is to send emails based on just send emails actually. Yeah, your purpose is to send emails to customers. And so that is it. That’s the overview. Now, of course, if it’s a bit more complex that you have different tools, then the purpose is going to be longer because the purpose is different things. And so this obviously depends on the complexity. Now, I’m going to go through a complex agent at the end, so don’t worry. You’ll see exactly what it looks like. But that right here is the first part. The second part is the tools. So right now in this AI agent, we are I believe we’re only connected, yeah, to send a message. And so that is the only tool. Now again, a tool is a software is a thing that the AI agent uses to take action. And so the first thing is adding the tool name. So we say, hey, heading one tool and the first thing we write is the tool name. Send message. Bear in mind that the tool name, make sure it’s the exact name of the actual tool, not an extra e, not an extra r, right? Exactly. And now we have to add the function and when to use it. So this tool will be used when sending emails to customers. That’s it. And then and so if you have more tools then you have more names. The n tool name and then tool description description. That’s it. And the more tools you have the more you add right here. Right? And you keep going on and on and on. And then we have rules. So rules are great to then be able to give it guard rails. So guardrails just means that let’s say you’re in the bowling alley. You know when you’re at bowling and they add the the little sides on the the little things that they put in the sides cuz you’re completely horrible. It’s only because by putting those guardrails there’s a good chance that you will hit the target, right? If you’re anything like me at bowling when I throw the ball it goes out, right? And so by putting those those walls, it makes sure that it actually hits the thing. And so that’s exactly what we’re doing here. We’re saying hey these are the rules and saying always do this never do this if unsure do this. Now these three are obviously optional. It depends on what rules you want. But in this case you can say always make sure to have an email address before sending an email. Right? Because we want to make sure that we actually sending the email to the right person or a person at all. Then you can say never send an email if you don’t have an email address. And if unsure, just ask the user to clarify. Simple as that. Obviously, it depends on your use case, right? Again, it depends on your use case. So, the rules might change, but for this specific use case where we’re just sending emails, then this is fine. And then lastly, we have output format and examples. Now, this is optional. I wrote this as optional because it depends on your use case. If I’m doing something like an email send a message assistant, there’s no need to put output format or examples, right? But what these do is you tell it to basically give you the output in a specific format. So JSON or Buddha list or whatever it is and it actually does it. So in this case, what we could do is we can say format all responses as a short concise sentence, right? Or you could say a bullet list full of points, right? It depends on your use case. It kind of depends on what you want it. Uh for this case, we can just keep it very very short and sweet, it’s fine. And then examples here. So examples in this case, we wouldn’t use it, right? But for something a bit more complex where it has different steps or we wanted to give it more guardrails because again, giving it examples, it is literally just giving it rules, right? We’re saying, “Hey, do it this way. Here are some examples to guide you in the right direction. So adding more guardrails only because AI agents are great, right? They’re they’re amazing. They do really good stuff, but the margin of error needs to be very very small when you’re actually giving it to clients. And so if you add more guards, if you add more examples, then the chances that it will error out, which means that something goes wrong, are very low. And the way that examples usually work is we have the user. So we say this is the input. So let’s say I say send an email to or actually let’s say I say make a LinkedIn post about life and then you give it the uh the answer right you say you actually give it the LinkedIn post so it can use the LinkedIn post as a reference when actually giving the output and so why do we do this is because again with guardrails the AI agent knows what good looks like it has expectations am I giving someone expectations they will get closer to the actual goal because it aligns with the expectations that you have. And so that right there is a full structure prompt that we use. Obviously some things you add, some things you remove depending on your use case, but this is what it looks like. And so when you pair up the user message with the system prompt, the user message is the input. So what do we get from the user and the system message is a thing that it uses to actually think through what it needs to do. Now I’m going to go through a single agent step prompt and a multi- aent step prompt. So a single agent step prompt just means that we just have one step before it goes to the tools, right? And so if I go inside here, the chat input will be the one from Telegram, which is a text below, which is what we covered before. And the system message will be an overview, not a personal AI assistant integrated with Telegram. Your purpose is to help the user manage communications efficiently by retrieving the correct contact and sending accurate well formatted emails on command. As you can see, the purpose changed because now we’re also saying you have to retrieve the correct contact and sending accurate well formatted emails on command. And now we’re giving it the tools. So the first tool is get contact, right? And we put this to bold it to say, hey, this is important. This is the name. And the description is retrieves contact details, name and email, right? So this AI agent in this case is connected to two different tools. It’s connected to the get contacts, which is a contact database, which is the one right here, which has name, email, and phone number. and is connected to send email which is another tool right and so that’s why we have get contacts to retrieve contacts and we give it a rule we also say use this first to verify the recipient or retrieve missing contact information because if you think about it what if I say I want to send an email to let’s say Michael James right how does it know the email of Michael James which is why it has to call this tool first and then it can call the next tool and then we have send emails send emails to contacts and the rules is never assume missing details Always ask for clarification. If unsure, respond with, “Can you confirm who I should send this email to?” Keep the message short, clear, and structured when replying on Telegram. And so this right here is a very short prompt that we give it because again, the AI agent is pretty simple. We just have a get contact. And we have sent an email. And now if I go here, I can wait for the input. So on Telegram right here, I can say send an email to Michael James. I can press go. What this should now do is it should call the contact uh tool. Then it gives us the output. And the output in this case is can you please provide the subject and the email body of the email. So you want to send it to Michael James. So even though it told Michael James and it knows the email, I didn’t give it what the email was about. And so now what I can say is send an email to Michael James about uh and say we have dinner tomorrow. Now you probably noticed that I should execute this first. Uh that I copied and reprompted this again. Why did I do that? It’s because in this case the AI agent doesn’t have memory, right? And so I have to reprompt it and say, “Hey, send an email to Michael James and say we have dinner tomorrow.” And now if I go to my email, I can see that I have dinner tomorrow. Hi, Michael James. We have dinner tomorrow. Best regards, right? All within just telling it a single prompt. But none of this would have happened if I didn’t prompt it right because the AI agent, even though it’s hooked up to these tools, it doesn’t know that it should do this first and then this, right? Which is why it’s all based on the instructions. I mean, in, out, right? Let’s be honest. And it’s the exact same as an employee. You give an employee instructions. You say, “Hey, when you have to go to file taxes, do it in this way.” He file taxes, he does it in that way. And then he brings it to you. If you say it’s bad, was not his fault. It’s the instructions, right? And so you want to make sure that the instructions are very clear and precise so that the AI agent can actually do what you wanted to do. And that right there is a single agent step prompt, which means that we only have one step between here and the tools. And here we have a multi- aent step prompt. Now, this agent looks ridiculously big um right here. But it is a video that I made about building a personal assistant which you can watch up here. And the way it works is the exact same as the previous one right here. But in this case, we have Telegram which is the input. We send it here. We also have the option to do a voice message. And then inside here, if I go inside, the input is still JSON.ext because it comes from Telegram and is defined below again because we’re not using chat trigger node. And if I go to the assistant message, I can see that it follows the same exact structure. It has overview, tools, rules, and instructions. And it also has a final reminder, which I’ll explain exactly why that’s there. So the first one is the overview. So you’re the ultimate personal assistant. Your job is to send the user’s query to the correct tool. And so in this case, we call it a multi-step agent prompt because this right here calls a tool, but the tool is actually another AI agent. So it doesn’t actually call the tool that takes the action like the send an email or get contacts. It calls different agents. So, contact agent, email agent, calendar agent, content agent. Why is that? Is because when we are doing something this complex, not complex, but we’re doing a ton of tasks, like we have 1 2 3 4 5 6 7 8 9 10 11 12 13 14, 14 tasks that the AI agent has the ability to do. If we write all those 14 tasks and we just connect it all to the same the main AI agent, there’s a very high probability that it will break. And so we break it down into a multi-step agent prompt where we say, “Hey, these are the agents that are connected to you. If you get some sort of contact thing, just send it to here. If you’re asked to take action on email, then call this agent here. Uh if you have to do anything within the calendar, call the calendar agent.” And the same thing with content. And then we give a rules, right? Some actions require you to look up contact information first, which is the exact same as we did before. We say, “Hey, sometimes you need to go to the contact agent first to get the contact and then send the email.” That’s a step-by-step process that it has to do. And then instructions call the necessary tools based on the user’s request. And we give it some instructions to then give it more guardrails, right? And finally, we give it the current date and time. So the final reminder is just final things you want to add. In this case, we’re adding the current date and time because AI unfortunately isn’t the best with dates and times. And so with AI agents, if we ever connect it to something that has to do with time, like calendar or send an email for dinner tomorrow, it needs to know what today is in order to know what tomorrow is, right? And so that’s where we add this formula right here. And so this right here is the exact same as the other ones. User message is like the one before. And now we can go on to the next tools, right? And so from here it calls the contact agent or the email agent. And the best way that I can think about this is like a CEO. A CEO doesn’t actually talk to each employee directly, right? He talks to the head of sales, head of operations, head of marketing. And then the head of marketing talks to the employees to take action. Why isn’t it the other way? was because if the CEO had to talk to every single employee, he would go crazy and there’s a good chance he will get the employee wrong because there’s so many employees, right? And so right here, if I go to contact agent, which is the head of contacts, head of department, we just have an overview and then we give a tools, right? Get contact, add or update contact, which is the tools that we give it here. Get contact and add or update contacts. Same thing with this email agent. We have this overview tools and some rules as well. final reminder. Same thing with calendar. I can see the overview, tools, final reminder and the blog as well. Just because a contact agent doesn’t have to know today’s, date and time to to get context, but these do uh overview tool and rules, right? And so that’s it. The input here, the prompt user message in this case will be AI defining. And also the only difference from the singlestep AI agent to the multi-step AI agent is also the user message, right? Because if I go here, right, the user message here will be Telegram. But if I go inside one of these, then I can see that this is now defined automatically by the model. We say, “Hey, the AI agent is given a task, right? This is the CEO.” Then the CEO, we’re letting AI define what the CEO tells the head of department, right? Which is the prompt user message and we give it a description as well. And then based on the prompt, based on the instructions and based on the tools that the head of department is connected to, it will prompt each tool correctly. And so best practices for prompts is be direct and explicit. Right? The more direct you are, the better it is. Put critical info at the top or you can put it with um markdown formatting to make sure that it knows, hey, this is title one, heading two, and heading three. Keep it concise, no filler, which means that the more stuff you add, the more chances it will break. And that is just a truth, which is why we’re not giving it a huge prompt, right? For the multi-step AI agent, we’re giving it one prompt and then that goes to the next and then the next, right? Only include what improves performance. So don’t include stuff just to include stuff because again the more context the more it needs to think and the more someone needs to think the more chances we have or the more likely it is for actually stop working. And if you’re someone who wants to start and scale your AI automation agency and work with me personally onetoone then check the first link down below. Hey, in this video I’m going to show you step by step how you can connect over 500 AI models to your NA10 AI agents using open router and also show you how I built a full AI agent that actually decides what model to choose based on the question that it was given. With that being said, let’s dive in. So if we go to end right here, the way that the AI agent works is that we have an input. We then have the actual AI agent which has instructions. This is the prompt saying hey if you you are helpful intelligent XYZ you do this and you do that based on the input that you’re given and then what it has is it’s connected to its brain which is an LLM which is the one that we’re going to be changing today the memory and the tools and then give us the output. The only thing with this is that the brain itself when we go to NN chat model this is the brain and I look for the software itself we can see that these are individual softwares these are individual LLMs. So if I want to connect claude that means now I have to go to claude and make an API key and then choose a model from here. But if I want to choose OpenAI then I have to go to platform. OpenAI add money there and do this exact same thing for every single chat model there is. But the question becomes what if there was just one thing that we had to connect to the AI agent that we can then use to access all the models al together. Well welcome to open router. All you have to do is go to open router.ai. Um I’m going to leave the link down below in case you want to check it out. And then we see here on the top right that we have different uh places that we can go. So if you go to models, this will basically show us all the models that we have that we are able to connect with open router to then be able to access in our automations, right? We have DeepSeek. I don’t know what this is. Um there’s tons of them, more than more than you probably know, right? There’s a whole list 500 models which is crazy. Then we have chat which is where we can actually test or we can actually talk to all the different models. And then we have rankings which is actually an interesting feature because we can see the leaderboard of which models are the best. In this case top this week will be Grock. And then if I go below to market share uh but below here to categories we get to see which model is the best by what category. So marketing for example I can see that Gemini 2.5 flash is the best for marketing. And if I go to sales or whatever it is, science, I can see that we have Gemini 2.5 flash, right? And so you get to see exactly which models. This is a live representation of which model is the best for what specific use case that you can then use, right? But for this video, I’m not going to show you which model is the best. I’m just going to show you how you can connect it to. Uh the first step here is to make an account. Once you made an account, you go to profile and you go to keys. When you go to keys, this is like the exact same thing that we did for Claude, OpenAI, Grock, Gemini. We have to create an API key. The only difference with this API key is that we only have to create one key to access all the models instead of creating one key per model. Right? We press here. Let’s name it all models key. Uh reset limit every choose how often the limit should. No, NA is fine. No limit. Press create. And now you have this key right here which you can copy. You can then go to endn chat model look for open router right here. And then to connect your open router account you can create a new credential. Paste the API key that we just had and name it all models. Let me go and press save. And now you have access to this API key. Now of course this is not free. So the next step we have to do is add credits into our account so we’re able to access all the LLMs and use them. Uh I’m going to go here profile to credits and yeah also credits here and now you get to add credits here. Now the thing is you would add credits anyways because you would have to go to Chachib Claude Gemini Grock you have to make an API key but even those softwares are not free and so this just allows you to make it so much easier for yourself to just add money in one place so that you’re able to actually access all the models and quick note here when you’re working with clients and actually implementing these automations and AI agents into their system sometimes you would use more than two LLMs maybe one for writing content maybe one for structuring data maybe one for reasoning Right? And so this right here gives us the ability to tell the client, hey, just make an account on one place. You don’t have to go to every single LLM to make an API key to add credits, which makes this so much more structured in the long run. Once we have the credits down, we can go to NLN. We can see that now we have access to all these models right here. Perplexity, Quen, OpenAI, Claude, there’s a Grock, right? There’s a ton of different models that we can access through the API version, which is insane. And this would be the exact same as just adding in this case OpenAI 4.1 Mini, right? Because we’re using 4.1 Mini here, but we’re also using it here, right? If I go here and I can chat to it. So, let’s say say hello. You can see that now it’s calling open router and it’s giving us an answer. How can I help you today? All right. So now that we connected the open router to our Naden AI agent, now let’s make an AI agent that basically gets the input which is a question gives it to the first AI agent which will decide what model to use and then it will use the model that it needs to use based on the question that it was given. Okay. Now the fundamental concept here is that when we go to open router and I go to the model if I press expression this means now I can hardcode which means I can actually type the model that we want right which comes from this list. So I go to GPT4 Turbo. I have this. Now this is the name of the actual model. This is the way that the API recognizes that we want to use GPT4 Turbo. And so in theory, when you think about it, if you want an AI agent that decides what model to choose, we need to give it this text right here, right? And then it uses that model that we give it to be able to answer the question. And so I mapped this out here. This is a two-step uh AI agent. We have the first one to choose the LLM which is LLM just means OpenAI cloud Gemini. And then we have the second AI agent to give the answer to the question based on the LLM that the first AI agent chose. So if I go here, I can delete this. Now let’s go to the first one agent. Let’s do LLM router. Keep the input the same. Now the input is chat input which is this. Then we’re going to need this as well. I’m going to show you exactly how to do it. You can go to system message expression and then I’m going to paste the message or the prompt that I already had. Go here, paste it. And so this prompt right here basically is giving the AI agent an overview of what it is. In this case, it’s an AI agent that decides an LLM model. It gives us the name of the LLM model based on the question that it was given. And then we give it context. So we say, hey, you have access to perplexity sooner, which is good for extended reasoning and this and this. You have access to OpenAI 03 mini high which is a costefficient model that does this. You have access to anthropic claw 3.5 sonnet which is good for this right your task is to respond only in the following JSON format clearly stating the user’s original query in the selected model right so this will be the output that we want we want the let me take this out actually cuz it will give it to me like that uh but we want the user query which is the user question and then we want the model so that the next AI agent is given the model that it needs to use and the question that it was it was given by the user. And so we also give it a few examples because it’s always good to give the AI examples. So for example, if you find a real-time stock price and latest news on Tesla, we know that perplexity owner is great for research. And so it will use the output will be perplexity sonar. Same thing with craft a full business strategy for a startup. It will be open 03 mini high and then write Python code to build a snake game and throw a claw 3.5 solid. And at the end of the video, I’ll show you how you can get the whole system for free. So don’t worry. Um, but this is what we use to give the AI agent. Now, we’re going to require a specific output format because of the fact that we are asking, right? We are asking the AI agent to give us the output in JSON, right? And so, I’m going to copy this. I believe this will be the right way to do it. Um, require specific output format. This is good. So, I’m saying, hey, let’s connect this to open. This isn’t the AI agent that will choose its model. Let’s just use 4.1 mini. And that’s fixed. That doesn’t change. and then the output parser because it’s memory which is simple memory which will be the thing that a gen uses to remember its conversation. the tools. We’re not going to need any tools here. And then output parser. We can use structured output parser right here. And we can say define JSON schema. And we can say I believe that it will be what was it properties? Oh, user query. And then model. I think this might be it. Yeah, I think this might be it. So we say, hey, uses JSON. JSON is just uh it stands for JavaScript object notation. It’s just the way that computers speak to each other. It’s like the English for computers. And so we’re saying, hey, I want the user query as one property and I want the model to be another property. So what I’m going to do now is I’m going to run this. I’m going to go here and say, can you research Tesla news? So now it should give me the output. What is it? There we go. model perplexity owner and the user query. Can you research Tesla news? Which is great. Um, so now I can give this to the next AI agent to actually answer the question using this model. But I show you here if I go here and I say, can you generate code for snake game? This should now use claude, right? So it should now give me the output of claude. And so that’s how you dynamically change the model in the next AI agent based on the input that we gave. And so the next step is an AI agent again. And the input will not be connected to the chat trigger node. It will be defined below because the input will be user query. And if I go here to um the chat model and I go to open router, zoom out, I can now go to expression because now I’m going to dynamically I’m not going to choose this because if I choose this model right here, it will always choose this model. It doesn’t change. So I’m going to go to expression which allows us to change the actual model by text. And I’m going to paste, not paste. I’m going to bring this across so that it uses this which changes every single time based on the answer that we get from this AI agent. Okay. So, I’m going to go here and then I believe this is it. Yep. And then AI agent. That’s cool. So, let’s see how it works. I’m going to go here and I’m going to paste this again. Let me actually rerun this. I rerun this. Can you generate code for net game? Now, it’s using the model. It’s going here. It’s choosing the actual model that we get. So in this case it would be anthropic/cloud 3.5 sonnet and now it’s using claude to generate the answer because this was the output here and we get the code right here using cloud and then right here we have the logs which is essentially what is the step-by-step process that we just went through from the start until the end and so what we did there is that we have the model and we have the user query then it goes to the second AI agent and if I go here I can see that it use this model to be able to give us this answer. If I go here, I can see that this will be the answer. Right now, let’s change it up. Can you do research on the top AI news in the US? I’m going to press go. And now I should be using Perplexity, I assume. Yeah, Perplexity Sona. It’s going to send the model to this open router chat cuz it dynamically changes every single time. and we get the output which is the top news which is crazy to be honest because now you have the ability to literally choose which model you want to use right based on the input and the model that we used here is perplexity sonar right it changes every single time and one thing you could do here is you can add more and more models as in you can give it more context to more models this is only three models right anthropic openai and perplexity but you can have over 200 of course not recommended uh honestly because it will kind of trip up and it might get the name wrong and if it gets the name wrong, then this obviously wouldn’t work. Uh, but you can definitely add more than three here. So, it has access to more models in that case. In this video, I’m going to show you the top three ways that you can scrape any website inside of any in just a matter of minutes. I’ll show you exactly the fastest way and the most scalable way in which one you should probably use. All right, so before we get to the actual method, let’s talk about scraping. So when someone says I want to scrape a website, what they mean is that they want to go inside a domain, a public domain, right, which is accessible and they want to extract all this information right here. Now if you don’t know, each website is actually if I go to inspect, it’s consisted of all this code. Now luckily we don’t have to know any of this, right? But just know that this is called HTML. So HTML is a thing that websites are written in which allows it to have an image, have this button that’s red, have this video, have this number, and so on. It makes websites look pretty. And so when we say scrape, we’re scraping all the information here, but realistically, we’re scraping this, right? We are scraping, if I go to inspect, this code, which you can then use to send emails, to maybe reply to messages, maybe to customize a message based on their website and so on. And so that’s what scraping websites mean. Now, the first way is using a HTTP request. Now, I covered this node in much more detail in my API 101 fundamentals video, which you can check out up here. But right here, we introduced to two different fields, the method and the URL. So, the URL in this case would literally just be the website of the actual thing, which is in this case jammolutions22s.com. And the method in this case is either get, delete, head, options, patch, post, put. Now, these are all methods that we use when we make a request. A request just means we’re saying, “Hey server, can you do something for us and give us back the information?” In this case, we have to use get because we want to get information. So now all I have to do is put get, put the URL, and leave authentication as none, and leave all of this blank. And if I press execute step, you can see here that it’s going inside the website, and it’s extracting all the HTML, the whole code, which you can see here, which is very, very, very long. Right? And this right here is what’s behind this. We just extracted this code right here inside this, right? Which you can then use to do something else. Now, the only problem here is that the HTTP gives us the whole HTML, which is way too large for us to feed it into maybe an LLM like OpenAI to maybe generate emails or generate messages. So, what we do here is turn the HTML, which is the whole long code of the website, into text, which is now readable to someone. So I can go here to plus I can look for HTML uh right here. So work with HTML. I can press this and I can do extract HTML content which means that it’s extracting the text from the actual thing. And now we can extract HTML content. The source data will be JSON because this is JSON um like this. This is all JSON. And if you’re wondering what JSON is video up here uh and then JSON property will be data because this is called the data. and the key let’s call this website text and let’s do body and now if I execute the step I can see that we actually get the text of the website so we got from the HTML that we got which is just a ton of stuff which is all of this right all these letters and colors and images and videos which you typically don’t want we just want the text we’re saying okay just extract the text from here and as you can see this is much shorter than this one just way longer longer than this, right? And now this is something that you can add to an AI, right, to drop emails or do something else. And we also use this node right here to be able to set up API requests. Now, API request, I actually mentioned this in my API 101 video, which you can find up here. If you go to any right here on app event, there will be tons of apps, right? But not everything is here, right? And so, how do you automate something within an app that you can’t find the app here, right? And so let’s say I want to use Panda do but Panda do is not here is not listed here but I know for a fact that you can actually automate things within PandaOC which is where we have to make our own app using a HTTP request and then we typically use the HTTP node when the website it’s static no JavaScript which means that it doesn’t actually change over time and you’re testing or building a simple automation. So we typically use this for testing or to build something quick. Now the pros is that this is fast and it’s free completely free. There’s no extra setup or accounts needed. You just literally need to put a URL and run it. And it works great for APIs or plain pages. So APIs, like I mentioned, it’s just the way that softwares talk to each other. So if you can’t find the software in it, you have to set up your own sort of app to make it happen, which is where you use a HTTP node. And plain pages again, it’s this. The website is static. So it’s just that just the text. It doesn’t change over time. It’s same. Now, the cons of this is that it gives messy and unreadable HTML. So, as you saw here, this right here gives me the whole HTML, which isn’t really readable, which is why we have to use something like this. But if it wasn’t for this, then we would just have to deal with a HTML that makes no sense to anybody. Then, in terms of web scraping, it can handle JavaScript heavy sites. So, sites that are changing over time that are a bit more complex, it cannot handle those. And it’s very, very easy to get IP blocked if scraped a lot. So, if you scrape this website continuously over and over again, you will get blocked, right? There’s a good chance you will get blocked. And on top of that, you can actually scrape every website. So if I go to my LinkedIn here and I just copy the URL and I paste it here inside LinkedIn isn’t a platform that you can actually scrape on a public level, right? So in this case, what this did is that it just literally went to LinkedIn. It just scraped this. It tried to scrape it and LinkedIn said, “No, we have a wall between you and me.” And the wall is an encryption. It’s a password that we have to go through, which is why we can’t use HTTP requests for everything. All right. All right. So the next method is using firecrawl. So if you just type firecrawl right here, you can go to firecrawl, the web data API for AI. And this website, the server is great if you just want to scrape websites. That’s what it’s meant to do. And so when you make an account, just go to your dashboard and you are able to then go to API keys, copy this key, and then if you go back to you, you can download this. You can go to fire crawl. You have to install the node. So there will be a button here that says install. And then you have different options right here. But when you press any options that says scrape a URL and get its content, you will get introduced to this page right here. All you have to do is connect your account by adding the API key. Press save. And once this is connected, you now have the operation which you have to pick which is what is the action that we’re actually doing. And there’s different options. So the first one is search and optionally scrape search results. Now what this means is that you’re asking Google to look something up for me. Then we have map a website and get URLs. So this goes inside a website and gets all the URLs like the about section, the services, the homepage, all that stuff, all the URLs that you might need. Then we have scrape a URL and get its content, which is literally just scraping the URL and getting its content. So going inside the URL and getting everything back. So the text and I’ll show you how this is different from the HTTP that we just used. Crawl a website is a bit more advanced than this right here. Um, but it still scripts websites. Then we have get crawl status which is you being able to get the status of whether this is done or not. So you send a request you saying hey can you just go inside this website and get absolutely everything that you that you have and this is saying okay the status is approved everything’s good you can move forward. Then we have extract data. So in case we want to tell it hey go inside the website and extract the email extract whatever it is. Then we have get extract status because the way that these work is that you send the request at first and then you get the status. So send a request and get the status and then custom API calls which is not going to in case you want to do some more complex stuff. So in this case we’re just going to use scrape a URL and get its content. So I’m just going to add my website go here. Let me delete this. Looks crazy. Um and I’m going to press execute step. And what this will now do if you go to schema is it will actually extract the text. So in comparison to the HTTP node that we just used, this doesn’t give us the HTML, but it automatically does the job that these two do, right? It goes inside the website and it gives me the text, not the HTML. So it’s condensed. So you can see here, if I zoom out, this is the text of the website. Plus, we also get the metadata. So we get the description, and we get a bunch more stuff that we can use for whatever it is. And bear in mind that this fire crawl, I believe, is free. uh they give you free credits every month. So you have about 525 credits. I believe that each scrape is about two two credits per scrape. But as I mentioned, if you want to do something more complex, you can also extract the data which allows you to put a prompt saying, “Hey, can you extract this for me from the website and then you can put a URL here and that extracts the exact thing that you asked it to extract. But in theory, what this would look like is you have the URL. So you would script it. It’ll do this whole thing. Then you add the markdown which is just the way that you write English for computers per se and then you add this to an AI step to extract the data that you want to extract maybe what the offer is of the company uh who are they targeting for whatever use case you have. Now firecrawl is great if you want a clean readable website content. As you mentioned we are doing the job of these two just by using one node. You’re also able to script modern uh/dnamic websites which are websites that change over time which is great. And if you want data safe from bans and errors. So there isn’t really any IP banning like HTTP because behind this node right here there’s a ton of code that happens in the back end which allows you to be more safe when you scrape. And the pros here is handles JavaScript sites easily like I mentioned. So modern and dynamic websites. It returns clean markdown or JSON which is not the full HTML but the thing that we actually want from the website which is the text. It uses random proxies avoid bands. Uh so when you hear proxies it just means that it’s like sort of some things in the back end in the code behind this website uh when it actually scrapes that make it safe for you to actually do it right so you don’t actually get banned and can map search or extract data at scale. So, this is scalable, much more scalable than this because this only works for a few sites and then you get banned or something bad happens. But in this case, because it’s safer, is also more scalable over time. The only cons with this is that it needs an API key plus a small cost per crawl. So, as we saw, this is not free. I mean, it is free, but if you want to go above this, then you’re going to have to pay. And I believe that if I go to the website, if I go to pricing, then we have per credits, right? So, we have 500 credits for free. And if you want 3,000 credits, you have to pay $16 a month, $16 a month, which is not bad. Um, but it only depends of how many credits you need, right? And each scrape takes about two credits. You can scrape about 1,500 websites um using 3,000 credits depending on the website and depending how complex it is. And then it’s slightly slower than a raw HTTP request. So, this takes a bit more time uh just because there’s more stuff in the back end. As you can see here, if I go to execute step one, two, well, actually pretty fast. Uh, and here, if I just go to J solutions, it’s much faster, right? Like maybe half the time. And the third method is API. Now, I’ve made a full master class on API, exactly how it works and different use cases that you can use with API. You can check it out up here. But if I go to API platform, api.com, the way that I would describe this is the Amazon for scrapers. So just like on Amazon, people sell something and others buy something. There’s consumers and there’s sellers. In this case, the consumers is us who go inside the platform to say, “Hey, I want to script some Instagram profiles.” And on the seller side, it’s like, “Hey, I just built a scraper that you can use to scrape Instagram profiles, but you have to pay me or you have to do some sort of exchange of of credits or something like that.” And so when you make an account on Apiy, you can go to console. And important thing here is that on the bottom you see that we have 8 GB of RAM which is memory and we have $5 for free every single month. Now if you do the math here depending on which scraper you use it’s free right depending on how much you use it. And so this is great because it allows us to scrape tons more stuff than something like firecrawl or definitely HTTP because now we have the ability to scrape Google maps, Facebook, Tik Tok, tons of stuff that you just simply can’t do with firecrawl or http. But in this case, let’s just do the website content crawler, right? So the first step is actually connecting and it’s end to a. So I’m going to go to the run and actor, which you can find a here. You can do run and actor actions run on actor. And by the way, actor is just the the scraper. So we call them scraper. Like the Amazon product it’s called in this case an actor. The way to connect it is go here, press plus, then go back here, go to settings, I believe. Yes. And then go to API and integrations. And you can copy this. Bring it back. And go to API key and save and name it whatever you want. Press save. And now you have your account connected. And now the resource is actor. The action that we’re taking is run an actor. The actor source is recently run actors. And the actor in this case you can choose um well in this case we want to use the website content crawler which you can find right here. You can go to API store go to website. Well in this case you can see it here. And let’s say you didn’t see there you can go website content cra. And now you can start using this scraper right away. And like I mentioned this scraper what it is it’s something that well in this case was built by API itself the platform but usually we have random people like let me show you we have compass we have API dojo we have clockworks we have curious coder and some other people who actually build these scrapers and make money out of them. So as you can see here the pricing is pay per usage so you pay per run but since we have $5 of free credits each run I believe is a few cents. We’ll see when we actually run it. um but is very very cheap. So in this case, you just want to test it. Just press start. This will be an automatic thing that will be there at default. When you press start, what this will look like is that it will start running. It’ll show you that it’s running. And here it will show you the results, the request, the amount of usage that it takes to scrape the website and the duration and also the date. And down here you can see the actor getting the data. Now, an important thing here is that we currently just used API’s platform to scrape, but ideally we want to use it within our automations. And so, right here, we can see that we have the full text of the website, which is great. And now, in order for us to set this scraper up, all we have to do is go back to any I can choose the website content crawler. And now, we need an input JSON. So, an input JSON is something that you can find right here. And right here, there’s two different ways that you can run it. The first way is manual where you can start adding the URL of the website, the different types of crawlers which is optional but you have different types. So adapt is switching between browser and raw HTTP which by the way makes no sense to anybody. And then we can use the crawler type which is the type of thing or the type of way that we actually crawl the website. Crawl just means extract all the data that you can then apply to the actual scrape. And then there’s also stuff like crawler settings, HTML processing, output settings, and run options, which are all things that we can change. But to keep it simple, we will not change anything. All we have to do is go to JSON, which is the way that we actually use this in the automation. All I have to do is copy this. I have to go back to N. I can delete this and I can paste the URL or not the URL, the JSON. And now all I have to do is change the website, right? With the URL. In this case, let’s leave this right here. I can now press execute step. If I go back, I can see in the runs, this is now running. So, we have a new thing running automatically, right? Without going into the actual platform, which is how you use it within your automations. All right. So, I realized there was an issue here. And the issue was that I actually exceeded my memory, even though it doesn’t say here, but I’ve been using this a lot more than you think. Um, but if you’re new to this, you will not have that problem. So, I’m going to sign out and log in with a different account. So what I did here is I just changed the count cuz the other one was maxed out and now the actor is running. So we can wait for the information here. All right. So it just finished running and we get this data right here. As you can see I told you that we don’t actually get the text of the website. What we get is something called a default data set ID which I can copy and then well not copy but go to the next step. So let me just pin this. Press P so I don’t have to rerun this again. And right here I can go to schema. I can look for default data set ID which is right here and I can give it as well and make sure that your connection is correct. And now if I press execute step I can see that I have the whole JSON here and down here I have the text of the website which I can then use for the next steps. Now, you should only be using Apify really when you’re doing large scale scraping or complex projects like LinkedIn, Amazon. Because Apify is known not for scraping just websites, but for scraping Instagram profiles or Tik Tok profiles or Facebook or LinkedIn. If I go to here, LinkedIn, a platform that natively does not want to get scraped. Um, you can see that we can scrape it using this using these different scrapers. And we have tons of options as well. and also when you need to use pre-built scrapers or browser automation because these right here are all pre-built scrapers that we can use to do whatever it is that we want to do. And we have a big variety of different scrapers that we can use for different use cases. Like I mentioned, social media is a big one. Uh which is where we use API for a lot of these things. Uh but there’s tons more as well. Now the pros is that we have a huge library of pre-made scrapers actors. It’s cloud-based so there’s no setup. It handles login based or complex sites which is very good like LinkedIn something that with a HTTP node you just can’t do because there’s an encryption there’s a password and so what they have is they have proxies that go around the password they make it seem like they’re an actual user to then script the data and the cons is that it can get quite expensive at scale depending on the scraper that you use depending on the actor more setup steps for custom logic and overkill for small simple scrapes right so if you’re using something really really simple you’re better off going with something like Firepro, which is simple, it’s very easy to set up, and it’s just made for websites. So, now that you have the skills to build workflows with AI agents, let’s focus on building just AI workflows. Now, don’t get me wrong, AI agents are extremely powerful when you have to build them for businesses. But the reality is that most of the times we simply don’t want an AI agent inside the workflow because it’s much easier just to have a simple workflow. And tons of businesses just need something simple rather than anything complex that will just make it harder, that is not scalable, and that we simply just can’t put to production. And so in the next module, we’ll look at real world AI workflows, projects that we build step by step for businesses. We’ll look at everything again from finance, operations, sales, and marketing. So you’ll be able to build AI agents and workflows at the same time. I built a noode rag agent inside of nitn which allows me to search through hundreds of documents all within seconds. All right. So this agent is split up into two different steps. The first step is new document into superbase. So if I go here to the SOPs which tag team made a quick one. I can see that I have a SOP for a creative agency. All I have to do right here is go to file. I can download it as a PDF. And this is a thing that I have to upload into Google Drive. As soon as I upload it into Google Drive, it will download here and I just have to press execute workflow. Of course, this workflow will automatically be will be executed every on a pulling trigger. So every day or every hour, whatever it is. And now this file is stored in our superbase, which is the vector database that we have here. And now all I have to do is go to our next agent, which is the agent that you’ll be using, and go to open chat and ask it any questions we have. So if I go to SOPs, I can see that one of the questions, one of the things that it mentions is that ClickUp or Asana or notion are used as a project management tool. So if I go here and say what tools do we use for our project management and what it’s doing now is it’s querying the agent. So it’s quering the actual database that we store the information in. And it’s going to give us an answer. In this case, it’s ClickUp, right? And if I go here, the answer was ClickUp, right? So that’s exactly how the agent works. And if you have hundreds of documents, it will scan through hundreds of documents and it will give you a concise answer based on what it found. All right, so let’s go to Miro and let me show you exactly how it works and what the whole thing’s about. So the source data is essentially what is that thing that we give the agent? What is that thing that we give the database for it to pull information from when we ask any questions. Uh in this case it can be in the form of video, audio, image or text. We use PDF but you can use any of these. Now for the source data for the data for the file whatever you’re using uh to be added to the database again for the agent to pull information from it needs to be transformed into an embedding. Now what the embedding means is that it takes the file and turns it into these numbers into vectors right which gives me a bad bad um memory of high school. Uh but the embeddings right here are 0 1 0 0 1 0 0. It’s just a bunch of numbers that represent the file that we gave it. And then these vectors, so this is a vector for a specific file will be stored into a vector database which is a database which has different vectors. So different files and that’s the thing that the agent is going to query is going to ask when it needs to find anything that we asked it. And fundamentally that’s how a file gets turned into a vector which gets stored into a vector database. It might sound complex but it’s actually very very easy because a file is a vector and database is just full of vectors full of files. Now how does it work when you actually ask it a question? How does it pull information from the vector database to give us an answer? Well, the question that you ask it is in text. You say, “Hey, what is that XYZ?” Now, those different letters that you ask, those sentences that you give or that question gets turned into an embedding which gets matched to the embedding sear and that’s how it gives you an answer because it matches the different numbers. All right. So, let’s go to edit. Let me go here and we can actually build one from scratch. So the first one as I mentioned is pulling data from a Google drive and that will be the thing that will be stored into the superbase. So ideally your team will just drop files in Google drive and the automation just runs every every so often every 1 hour every day or whatever it is. So first step is actually making the drive. So we made a drive we called it rag example and that’s the thing that you want to do on a Google drive because that’s the place that we just drop the documents for it to go to the superbase. And then we go here and know the first step here is watching every new file that is created because that’s the thing that starts the automation, right? We don’t want to automatically or we don’t want to manually run the automation every single time. We want the automation to be smart enough to know when a file is created in that drive so that it pulls it to the database. So the first step here is Google Drive and the action is on changes involving a specific folder. So what this is is you’re watching a specific change within a folder and the to change itself is a new file being created. So all you have to do to connect Google Drive to your Nit end is go here and you need a client ID and client secret. I would recommend watching or asking the assistant exactly step by step what you can do. It’s more of a longer process um but it’s very very easy. Let me know down below if you want a full tutorial where I can show you exactly how you can do it. Uh but once you connected your Google Drive, let me go here. You’ll have this. Then it’s asking you pull times. This means how long or how often do you want to run the automation. So in this case we can do every minute which is fine and trigger on changes involved in folder. Okay that’s fine because we want to change we want to watch changes inside a folder. The folder itself will be rag example. So rag example it’s right here. And then what are we watching for in this case? We’re watching for a file being created. Right. So let me actually test this. Let me fetch test event. In this case, I think the file was the one I pulled it before, but let me do another one. So, let me delete this with the trash and let me put it back here. So, I deleted one here. Every minute, it runs and it checks that a new document has been added. So, I can go here, fetch test event, and this right here has been added. And this will be the file. So, let’s see if that’s the file that we have, agency SOPs to PDF, which is this one, right? And that’s the one that we’re going to be adding to the actual database. All right. So now we have an automation set up where it triggers whenever a file is created inside of Google Drive. But how do we actually send a document from Google Drive to the vector database, right? Well, in this case to send any documents there, we have to download the file first because the vector database only gets or only intakes binary which I will explain just a second. But the way that we have to send the document in the vector database is in a very very specific format which is in the binary format. So all we have to do here is actually download the file before we send it to the vector database. And to download the file you have to press plus go to drive and then you can download a file right here connected which is the same file download. And then the file we don’t want to select the file because we want it to be dynamic. We want to change every single time. And we can do ID and the ID of the file will be the one here. So let me go down to the ID. There we go. And this is the ID of the file that changes every single time because it’s a new file that we’re doing. And that’s the thing that’s going to be added to the vector database. And if I go here, let me just pin this, which means that I will already have this input. I can I don’t have to rerun this. I can just use this as test data. I can execute the step. And I can see that we have binary right here. This is exactly the type of input or the type of thing that goes into the vector database, which you don’t get in the previous one. So we have to download it first. All right. Now once we downloaded it we can go to superbase because that’s the software that we’re using to actually add a document to superbase vector store add documents to vector store because we’re adding a document and you’ll come on this page now once you come to this page in order for us to connect your superbase vector store I’m going to go through everything step by step so we go here create your credential and then the service role secret which will be the thing in superbase so let me go here let me actually log out and make a new account so you guys can see exactly what it looks like sign up now Actually, let me do my email and then my password. God, which is the same password I use for every single email, which is not good. Uh, sign up. Check your email notification. So, this is the email that I got. Confirm email address. And this will be the account that is just made for Superbase. All you have to do is organization, personal. There you go. Create organization. And that’s I just want to walk you through step by step because that’s exactly what you have to do when you do this. And you create create a new project. Uh let me just let me just cancel. That’s fine. So that’s it. So now actually we can create a new project because we actually need this. Uh let me do n YouTube rag agent. The password is not strong enough. create a new project. And now we have the project that is being added to Superbase. All right, cool. So once you get to this page, there’s a few things we have to do. Now the first thing we have to do is we have to connect our Superbase to NN. And then the second thing we have to do is actually make the database that we add the document to. So in order for us to connect the NN, we have to have a service ro secret. In order to have the service ro secret, we have to go, I believe, to project settings API keys. There we go. Service ro secret. So we can reveal. Let me just copy this. And this is a thing that you want to paste into any none here. And you can save it. Couldn’t connect with these settings. Let’s see why. Okay. And so the reason why it says couldn’t connect settings cuz I’m missing my host, which I didn’t even see. Uh now, so to connect this host, you have to go to superbase, you have to go to, I believe, project overview. Yep. And then down here, there should be a project URL, which is this one right here. You just copy. Go back to NN, paste it. And now you can save it. And now the connection is tested successfully. And let me do N8N YouTube uh 21st August. Name your connections, right? Cuz don’t be like me. Save it. Okay. So now that we connected our NN to Superbase, we have to put operations mode, which is insert document because that’s the thing that we’re doing. We’re inserting a document into a database. But the problem is there’s no database to add the documents to. So the next step is this. All you have to do to connect or to add a database is to go to docs, scroll down to uh where is it? Yeah, this one here. So a quick start for setting up your back to store. Press this. You’ll come on this page. All you have to do here, you just have to copy this, right? And don’t get overwhelmed. Just follow me step by step. You go to superbase and then you have to go to this right here, SQL editor. Just paste this here. Paste it. So you go like this and zoom out. And now you will have this code here. Now all you have to do is run it. Once you run it on the bottom right, it should say success. No rows returned. Okay. So once that’s done, once you actually made this on the table editor, you can see that we just made a table called documents. And this right here is the database that we’re going to be adding the document to. So if I go back to Nan, I can now choose refresh. Let’s refresh. actually cuz sometimes it trips out and it takes a while to actually update. I can go here and I have documents now from the list and so that’s document that’s the the place where we actually get to store the document in. If I go to options can match the options Mac documents and leave this as is and the embedding match size is 200 which is fine. And now in order for us to actually make it work we have to connect two different things. The first one is the embedding which is what is that AI or I mentioned before that we have to take the file and turn it into different numbers. So we have to use AI for this which in this case we could use openAI right here and we can leave this as text embedding 3 small again to connect your OpenAI to NN all you have to do is get the API key which you can find on platform.opai.com open.com. Let me go here. Let me actually show you. Apart from the open.com, you log in dashboard. On the left hand side, you have API keys. Create a secret key. Name it whatever you want. So, let’s do nitn test YouTube secret key. Copy this. And now we can go to nitn. We can paste this. Name this test August 19th. Oh god. test August 19th. We can save this and now the connection is done. Okay, that’s how you connect your OpenAI to an event. Um, and now for the model itself, you want to connect this to text embedding three small. It doesn’t really matter. Um, just do this one. This is the fastest and probably the most efficient for now. And this is the thing again that’s going to take the file, turn it into numbers to then add it to the database. And now for us to actually add a document, we have to do the default data loader. So it loads data from previous steps into the workflow. So let me go here. I can press this and in this case we don’t want to do JSON but I mentioned before that we want to do it as a binary which means that it’s asking us what is that type of file what is the type of input that we give you in this case it’s binary so load all data input yes that’s fine automatically detected yes that’s fine and simple is fine that’s all good is there anything we want no that’s it okay so in this case data format automatically detected by time text splitting is simple and that’s all you have to do now this right here just means it splits every thousand characters within a 200 100 character overlap. So before if you saw the PDF was actually stored into 10 different rows, 11 different rows. It’s because it actually split it up. So this right here is used then it goes here to the embeddings turns the file into the embedding and then in order for us to actually store the document we have to use this one right here. So let’s test this. Let’s test this right here. Let me go to unpin this. Let me go to Google Drive. Let me just reput another one. So piece replace the file. I can go back to NN. And now if I execute the workflow, it should work. Let me go here. Download the file. It goes here. Okay. Everything was successful. And if I go to NN YouTube agent, I can see that the data was stored here. And the data has the ID which is just the rows, right? Every every new every new entry is one. And then content, which is this, just a bunch of text. Metadata, which is JSON. which is a bunch of stuff as well. Embedding which is again the thing that I mentioned which is the different numbers. These are the vectors which might look a bit intimidating at the start. Uh but these are the series of numbers that we have that are stored in the vector database which is the thing that’s going to allow us to actually ask it questions. All right. So once this is done we have to go here and we can get on to the second agent because the second agent is what the real source is about because we can actually ask it any questions about the document. So we can keep this on the same workflow. So let me save this. Right here we have upload a document, download it and then add it to the database. Now we can start by actually querying the superbase. So for us to actually create the superbase, if you really think about it, we have to text the agent. In order for us to make a text agent, we just have to add an AI agent which will go here. And then we just have to connect it to a chat trigger, which means that we have a chat connected to the agent. So we can talk to the agent. All right. So there’s a few things. Uh the chat agent. So this right here, I can just talk to it, right? And it will send the information and it will send it here. It will do whatever. And then we have the AI agent. In the AI agent, the source for prompt, meaning what is the input? In this case, it’s just connected to the chat trigger node because this is the chat trigger node. We can leave this as is. The prompt is fine. Uh require specific output format. No, we don’t. And now it’s asking us to do a system message. So that’s the thing that you want to add to the AI agent. Let me go here expressions so I can do it full screen and now I can start adding the prompt. Now for the prompt itself we usually use a structure which is overview tools and then rules right for overview we can say you are a helpful intelligent uh information extracting I don’t know if that makes sense but extracting assistant that helps me to answer or the answers any queries that come to you. Okay, that’s fine. For the tools itself, um we have to add and then for the rules we can add as well later. So overview you’re a helpful intelligent information system answers my any queries that come to you and then tools we can add the tool in this case we only have one which is getting the uh superbase for the effective database and then we have the rules if I go here we can now connect this to a chat model which in this case we can do openi you can’t see it right now cuz my face is there but openi chat model is here can press this and now again we already connected openai to nnn so we just have the connection here in the model leave this as 4.1 bin we don’t have to connect memory or actually no we have to or we can right we can uh for simple memory just so that it actually remembers the previous questions that we asked it we can leave this as this this is fine and now this is asking how many past interactions does the model receive as context five is fine you can add more if you want in case you’re having longer conversations where it needs to remember what you said before and now for the real source of the AI agent it’s the superbase so if I go here superbase vector store you can see that now the tool is this one here so let’s first let’s rename this do vector store rename. If I go in here, I can then have different settings. The first setting is obviously the connection which we already made before. Then the operation which is what is that thing that we’re doing in this case is retrieving documents as tool for AI agent which is fine. Again we previously we had insert documents. The description is you can just leave this as work with data from the superbase vector database rhymes. And now the title the table is a database right that is a thing that we just made this one here. So if I go here and I go to it only gives me one option because we only have one table documents. The limit is fine include metadata. Actually I don’t this says number of top results to fetch the I don’t think we need a limit. I think we can just not have not have one because it can pull any any any number of results. Include metadata. What is this? Whether or not to include document metadata, it’s fine. All right. So now we can connect this to an embedding because just like we did this above, we need to embed which means that we need to turn our question into numbers so that it can ask it any questions on a vector database. So we can go here embedding. And by the way, you can connect this to the same one, right? But to make it less complicated, we just have our own. Uh so let’s go here. Embeddings open AAAI. Leave this as before, which is fine. And now this is embedded. So in theory now when we ask any questions, it will go to the AI agent. It will think through it it’s uh its brain, which is the LM. It will remember any conversation that we had. But most importantly, it will send the information here first. It will embed it. So it will turn it our questions into numbers. It will then match it up against any numbers that we have, any vectors that we have in the vector database. It will then send us back an answer in natural language, right? Like before like I showed you. Now one thing I need to finish is the prompt. So let me go here and let me go up here. And now for the tools we have vector store. Very important that you name the tool the same as the tool that you actually have. What I mean by this is like vector store needs to be the same name as this. If I rename this to something else like vector store, make sure to update that into the prompt, especially when you have more tools. So, vector store, this will always be used when answering any questions that the user might have. Now, rules. The only rule I have is actually I have two rules. The first one is you must always pull information from this from the vector store. Um that’s it. And then your answers need to be concise and to the point. Uh okay. So why do I say this will always be used? Because previously when I actually made the this agent uh I was asking it a question. it was using like the natural LLM to actually answer it like what what is a project management tool that we’re using. It will use the LLM to search in the internet or search through like its own its own storage. But in this case, we only wanted to pull information from the vector store. Okay, that’s why we’re saying this. And then we always we always want the answer to be concise because I don’t want it to give me a full paragraph um or a long long paragraph that we can’t read. All right, so I think that’s it. Now we can test this and if it goes wrong, we can uh we can obviously change it. So let me go here. Let me say let me go here. Let me get something specific. What are the things that are included in the content production? That’s it. And it should say video, social media, copyrightiting. So we go what is included in our content production. So what it’s doing now is it’s going to embed our answer. It’s then going to query with the vector database, give us back an answer. And now it says that we have video production, social media and copyrightiting. And if I go here again I can see video, social media and copyrightiting. So let me ask another question. So let’s say I want to ask it what is inside content I mean the social media. So say what is inside social media. What it should say now is that we have content calendar managed in notion post schedule one a week. Content calendar is managed in notion post schedule once a week. Right? as this is insane especially if you have hundreds and hundreds of documents inside the vector database which allow you to pull information from these uh documents in in a matter of seconds cuz typically when I worked with agencies especially creative agencies or any type of agencies we worked with a lot of them they store their SOPs into a Google document into multiple Google documents with tabs and in order for them to actually ask any questions about the actual document they have to go inside the document itself to get any answer but in this case we just have a chat AI agent queries itself and then gives us back an answer in very very simple way in just seconds. So that right there is a full build for the rank agent inside of N&N that allows us to search through hundreds of documents that we have. In this case I only used one but imagine you can add multiple hundreds of documents inside of Google Drive which will pull it into the vector database and then we can just ask it any questions that we want. Hey, in this video I’m going to show you how I built an AI support agent for an e-commerce store that automatically pulls in queries, classifies a query, then searches through a directed database for answers, drafts an email reply before alerting our team to review the email and send it. Now, for businesses who receive a large amount of emails from customers asking questions, at least 90% of them are the same. These systems are amazing just because they save that time that you can now devote to actually growing the business. All right, so I’m actually going to test it before I even explain exactly what everything does, just so you get to see the final outcome. So, I’m going to send myself an email saying question about the return policy. All right. So, I asked the return policy plus the shipping location. Uh, I’m going to say thanks in advance. And you press send. Now, this right here will send it to the base email. So, this will be in theory the email that receives all the incoming queries from all the customers. As you can see, we just got the email. I go here. I’m going to execute the workflow. So, this is going to run. Is that going to classify the email? It’s going to then pull the answer from the reged database. It’s going to drop an email and then it’s going to send us a message on Telegram informing us that a new inquiry came through. We have to review it and actually send the email. As you can see in Telegram, we said new inquiry received from the name about is the question of the actual the subject line and then the action is email drafted to your email. So they know exactly that they have to go to their email and actually look at the email before sending it. And if I go to my email here, I can see that on drops I have one new dropped. You can see that we have the return policy. We have the shipping locations and James Noble Mart customer service team. All right, perfect. All right, cool. So, let’s go through the whole process step by step. Now you have an idea of what it actually does. Takes emails or takes emails from with questions. It then looks through our vector database which is a database that has different um the different documents and then sends back an email reply and then informs the team to then go in drafts and actually send it to the customer. All right. So, the first step here is actually incoming emails. So, this will be the trigger on any incoming emails that come through. In this case, we have an inbox and for any businesses really, they have inboxes like um a company name support.com and that’s the inbox that they use to answer any incoming FAQs. So, they have this and this would be the domain or the actual inbox that we use to collect and then run the automation for the first step. So, in order to connect our Gmail, we have to go here obviously choose the Gmail trigger cing credential and then you can sign in with Google and take you through the whole process. Uh it’s very very easy just as a regular sign in with Google sort of thing. And then it’s asking us for the poll times. The poll times says, “Hey, we’re looking at your email, but how often do you want us to go through your email to make sure that we have all the questions?” In this case, you can put minute, hour, day, week, month, every x custom. But I think every minute is fine. It depends on the amount of queries that they get. So I would ask the business, hey, how many queries do you get a month? How many queries do you get a day? If they say, hey, we get about a thousand a day or 100 a day, whatever it is, maybe we can run it every hour or every every 5 minutes, right? But speed speed to lead and speed to questions is important because that builds up the brand and it just makes a part of better impact on the customer as well. So we can obviously do every minute every hour and with so again it depends on on the amount of inquiries that they get. Then we have the event. So the event is hey what has happened like what is the thing that we’re watching for in this case is a message received which is the only option here right and then simplify which is fine uh because you just want to keep it simple with uh with the way that the the actual note is set up. Once this is done, right, which is the again the email trigger. So I can actually fetch test event. I believe that we have Yeah, we don’t have any emails anymore. Um, let me actually send myself an email so we can we can test this 100. Hello. Hey, I need to know the shipping policy you have. I send it now. I don’t have to wait. Of course, when you have to run this for a customer, you have to automatically run this every 1 minute. But for this case, we just have to test. Um, so I’m just going to send it to myself and wait for the email to come back. As you can see, we got the email here. If I go here, I can fetch test event and we get the snippet, which is the email body, which is in this case is, hey, I need to know the shipping policy you have. And that’s the thing that’s going to be sent to the next uh step to actually classify whether this is a promotional thing or an actual FAQ. So the next step here actually before we get to this point is we have to set the variable. Now, why do we do this is because when we look at all these, we can get a bit overwhelmed and we don’t really know where the where the actual text is. So, we just want to basically make it as simple as possible for the next steps to pull in information from Gmail. So, we add in a set node which you can find here. So, set node edit field set. This allows us to just pull in variables from a list of variables. In this case, it’s just snippet. And we call this email body and call it whatever we want. Basically, this makes it so much easier for the next steps to actually pull in information from Gmail without having to go through all these different pieces of information. Once this is done, we go to classify emails. Now, we have to have this step because not all emails are FAQs. Some are promotional, some are just general emails. In this case, we just wanted to check whether they are promotional or silver service. So, if I go in here, and this, by the way, is text classifier right here. Text classifier. This allows us to classify text based on specific um you know rules. So go in here text to classify will be the JSON email bodies. So let me actually run the previous steps. Let me go here and pin so I don’t have to rerun the whole email. Let me actually execute step. As we can see we have hey I need to know the shape and policy you have. And this will be the thing that we then pull here saying hey classify this text. Now here’s where we start adding the categories. So the categories like what are we classifying it for? like what are what are the what are the rules and what is what’s the logic here in this case we have promotional we have support service now to add a category you have to press this button right here you can put the name so in this case let’s do support service and then description is hey this is the name of the of the actual rule or the category this is the description of what it is so in this case for promotion we said marketing offers discount sales pages newsletters which are typical sort of promotional emails and then we have support service which is customer increase troubleshooting complaints or help requests that’s the only two categories that the classified email node or the text specifier will take into account when it needs to look at the the inquiry that came through from the customer and classify as to whether they are one or the other. Then we have options. So system prompt which is basically saying hey please classify the emails provided by the user into one of the following categories categories right here just so it knows that these are the categories and user provided formatting instructions uh below don’t explain and only output the JSON. I believe that this is a standard prompt. Yeah, it is a standard prompt. So you can just add this um but this allows the the actual node to be more strict and understand exactly what it is. Now in order for this to actually work this doesn’t just work on its own. It works with AI. Let’s say we have to go here the model. to choose a model here and we have all these models. I typically go for the OpenAI chat model because it is the I go for quality plus uh plus price. I think this is fine. Connect it. To connect to your OpenAI, you just have to go to platform.openai.com. Go to the dashboard. Go to the API keys. Create a new secret key and then you can put your name and then create a secret key and then bring it back here to paste it. Don’t worry about the organization ID. You don’t need it. And as well this don’t worry about this. Uh, one important thing here is that for a company to run this, they do have to pay for the credits which you find in your profile and you find it here. But obviously would look into how many increase they get and then make the price based on that. But the price is like 1/10enth of a cent per per run. All right. And now that we connected AI, what this happens, so how this works is we have the email body which is incoming emails. It will then go here saying, “Hey, can you classify this using AI?” Right? It will have categories. It will have strict rules. it will talk to the AI to make sure that that’s how it thinks. That’s that’s that’s the actual like program. Uh and then based on the the two different sides, we have promotional, support service. In this case, we actually didn’t put anything for promotional. So if something is promotional, it just stops there. We don’t want to really do anything with it. Uh we only want to send it through if it’s a support service. So that’s why we drag this across and we put it to the next node. Uh which in this case is an AI agent, which is really the the main source of the whole system. And so once we classify the emails we say, “Hey, okay, this is an FAQ. This is like actually something that we can answer, let’s go out and actually review and draft an email for the customer using the data that we have. Now, if you haven’t checked out my AI rag agent system, then make sure to check it out right here on the top or below. It’ll show you exactly how we set this up step by step. So you get to see the whole process. But essentially what it is, it’s an AI agent that gets incoming emails. In this case, it gets the the inquiry from here, which is the same input as this. But now we know that it’s support service because we went through the step. And what it will do is I will go through a back to database. Now, a back to database is something that looks like this, which is composed of different rows. These rows come from this document. Okay. So, we have a document, which is essentially where all the information is stored. So, account login, all the different FAQ questions that people usually ask, which is typically what a company would have in the first place. And then now we basically transform this into vector database or embeddings in this case we call them that will allow the the program to actually take the question that’s coming through match it up against any of this embeddings and then give us back an answer in the simplest way. So the way to do this is we have an AI agent right here the prompt which is the user message. This right here will say hey what is the thing that we’re fitting into uh the AI agent in this case is email received which you can find from the email body right here. So this right here will be the the from because when we actually have to drop the email we have to know who the email is coming from and the name as well just so we can personalize the email plus send it to the right person and that’s about it for the user message. In this case we don’t require any specific output format. We don’t enable any fallback method. This just means do you want it in a very in a in a specific format like JSON or anything like that. We don’t want to do any of that. And also do we want to enable a fallback method. This means that if OpenAI does not work you want to use another AI to to test. In this case, you could or could not put this on. I mean, typically I wouldn’t have it on because the chat model right here works fine. Um, but you can have it on even to be more safe. Now, the system message here is a system uh or is the message that we tell the system like, hey, you are a helpful intelligent XYZ that does a few things. So, the prompt for the AI agent follows through a very very specific structure that we use for most of the AI agents that we build. In this case, it has an overview. So, you are helpful assistant that answers any inquiries from our e-commerce store called Novart. You’ll be dropping email replies for the incoming queries that come through. And then tools, this will be the tools that the AI agent is connected to. In this case, it’s two. The first one is pulling in information from the document that we have, which is the one right here, which not right now is stored in the vector database in superbase. And the second one is the email draft, right? Because this tool will be used to draft any emails back to the user to make sure that they have the corresponding answers based on the information that comes from the vector store. Some rules here is we have to always use the vector store before answering any questions and droting any emails. This is very very important because sometimes what the AI could do is that it can drop the email but it will not have any context or any information that’s actually valuable for the end user uh to give them an answer. So it’s sort of saying hey what is the return policy? I reply to you first and then I go out and look for the information. We have to make the order actually make sense which is why we tell you hey look for the information first and then you can go and drop an email and then some extra information. My name is James. Make sure to include that when dropping an email because at the end um what it did basically in the email it said hey thank you uh this comes from add your name like bracket add your name and then uh it will put the put the actual company name in this case we want to put James because again that’s that’s reality of what emails look like they put names instead of just adding variables uh so we give it that context as well all right once this is done then we have the chat model in this case we can add here same way as we did before we can go to open AI and we have to connect to our account and use 4.1 mini. Again, this is perfect uh perfectly fine for for this use case. Now, what we have to do is connect to tools. Now, the way that an AI agent works is that it gets it gets the inquiry. So, it gets an input like, hey, dropped an email or hey, look for this information or do something and it will then think through what it needs to do using its model and then to take action what it actually needs to do, it uses tools. So, in this case, because we have two tools again, one for the draft and one ones for the vector database that actually looks for the information. We connect these tools to the corresponding softwares. In this case, to connect it to the vector store, we have to go here. In this case, well, I mean, it’s vector store, so you have to press plus. Let me see if I can move this. There you go. Uh, superbase superbase vector store and you’ll come to this page. Once you get to that page, so let me delete this. You’ll be here. The first thing you have to do is create a new credential. And again, you should have a service ro secret and a host, which you can find here. And then we have this page right here. The first thing you have to do is obviously make the account. Then you have to make the database. And again, I put a whole video on how to do this down below. So, make sure to check it out. And now we have to go back here, go to the API keys, and you can then reveal, copy the secret, and paste it here. And then you can press save. And then you’re done. All right, cool. So once we are done with this, we can then use the operation mode. Again, operation in any to end just means what is the thing that we want to do. In this case, is retrieve documents as tool for AI agent. There’s a different options here. And now the description is work with data inside the vector database to answer any questions, which is fine. Let me delete the extra e right here. Um, and then the table name which will be the table here, right here. Table editor. Yeah, this will be the one that’s containing different information. As you can see, we have no mart e-commerce general information. We have go to your cart xyz. All the different information that it needs to use in order to then answer any incoming queries. And once that’s done, we have the limit. Again, actually, I don’t know why I put this to four. Uh, this basically says the number of results fetched from the vector store. I typically will leave it blank. Uh in this case of course if you have a really really large vector database and you don’t put a limit it will basically use more credits than if you put a limit on x amount. Uh so that’s why we add a limit here and then we include metadata and then we have to put the query name which is match documents which is the database that we’re using. All right then we have the embeddings which are a way for openi to take the incoming query like hey what’s the return policy turn that into numbers so that it can match them to the embedding. Again, this will make much more sense once you see the video uh of me creating the AI rag agent and the fundamentals behind what it is. But in a very simple way is that text is turned to numbers. Numbers will match numbers to give you an answer. Um to do this we have to uh put the embedding which in this case is another LLM and we can use OpenAI connect to OpenAI. You can leave the model to text embedding 3 small. All right. All right, once the vector store tool is finished and we now can look for the information in the vector database, we can now connect the second tool which is the email drop because again the sequential order goes in the vector database to find the email or to find the information in this case sorry and then go to the email to then drop the email to give an answer to the customer. So in this case we have to use an email draft. You can go here Gmail tool and you come on this page you have to connect your email. So is the same exact process as the one before create your credential and then you can set it with Google and then you have to use a tool description. So the tool description you can set automatically the resource which would be uh what is the thing we’re doing in this case it’s not label it’s not message and it’s not thread it’s draft and then the action that we’re taking is we’re creating a draft and the subject line something good and it has is that we can actually let the AI define this define this parameter which is the subject line of the email and then the email type which would be text then we have the message which is the email body and we can also press the button right here which will let the model define this parameter which is amazing because we don’t have to do anything and also on top of that we also have to send the email to someone. So we have to press to add option to email. So who are we sending the email to? And then the [email protected] will be replaced by the email that we mentioned that we’re giving the AI agent to take action. So we can just press this and now the AI will already have be smart enough to be able to think about who are we sending the email to based on the input that it was given. All right. So let’s put this to test. Let’s see how it actually works. Um I think we can just Yeah, I think we can just test this. Yeah. Let me go here. Here I’m going to press this button right here which just test this right here. It will classify it. We’ll say it’s a port service. Now what it will do is it will look through the back to store. But again first of all the first step is it will think through its memory or its LLM um its brain to then think about what it needs to do. So the first step is finished and then the second step is drafting an email and then it goes back and it thinks through before it gets to the next steps which is Telegram in this case. But before we get to that, let’s look at the draft of the email. Let me go here. Go to draft refresh. Then the shipping policy tells me all of this. Now one thing we want to change ideally is maybe the size of the length of the email. I think this is pretty long. Uh so to do that to make any changes you can go here and then the rules make the email draft a medium length keeping it concise with a good structure. So, let me test this again. Let’s see if anything changed. And this is how you usually go about iterating and and making sure that the AI agent does what you want it to do in the in the best way possible. Now, if we go back here, you can see that we made another email, which is more structured. Maybe the size isn’t yes, it’s not shorter, but the structure is better, I’ll say. So, now we can say and we can leave this as this. To be honest, if I was a if I was a customer, I would want some sort of answer like this that would give me the best information with all the prices and stuff. Cool. All right. Um, and again all the information comes from here. So the shipping policy and options comes from here which it pulls information from. All right. Now once this is done, we can then go to the last step which is basically informing the team. Now why do we do this is because the email again you saw it wasn’t it wasn’t sent to the customer. It was dropped. We have to notify someone that they have to go to the inbox and actually send the email to the customer if they like it. So that’s why the last step is Telegram which is send a text message which you can find right here. Telegram. send a text message right here and then to connect it you have to create a new credential you have to get the access token if I go to ask AI start a new session now this will tell me the step by step and I recommend you guys always use this sort of feature when you’re not really sure as to how to do it h because it is better than chat GBT because what this does is that it actually looks at the end to end community it looks at the different questions and it’ll give you a step by step as to how to do it so the first step is start a chat with the botfather and then you do different steps until you get the actual access token right so once Once you connect to your telegram, you can go here. The resource again is message because we’re not drafting or chat or fallback or file. We’re just sending a simple message. The operation is what is the action that you’re taking. In this case, we’re sending a message. The chat ID is something that you can actually take. Um, so let me let me show you. Let me execute the step right here. So, I executed the step. Now, if I go to Telegram, I should see the message. Let me show you right here. I just got another message at 350. And now in theory this will give me a chat ID. So if I go here chat ID, this is the chat ID that will be used to then send the the text to. This is great because the chat ID allows it to give us the the answers in the same thread of information or or conversation in this case. All right. Now once this is done, we have the chat ID. Now we have to put the text. So what is the thing that we’re putting in the message? Well, in this case, I thought that it’d be good to add new inquiry received from the name of the person and also the about which is a subject line. Uh you could in theory change this and add more stuff but I thought that this would be the most relevant to have for this agent uh as a text message. Um so we have new inquiry received from name about subject line here and then the action it says email drafted to your email. So again if you saw on telegram that the message itself was email drafted go to the email informing someone they know the name they know the the about like the actual question and they can then go out and send the email. Hey, I’m about to build a live invoicing parsing system right in front of you that grabs invoices from a Google Drive, uses AI to extract all the key data, stores it in a Google sheet before sending an email to our billing team once it’s done. Now, this kind of system can actually save companies hundreds of hours of processing documents. In this case, it’s invoices, which they can now devote to actually growing the business. So, today I’m going to build a whole system from scratch using a platform called N8N. I’m going to show you all the mistakes, all the detours I make that you get to see what an actual development process for a real client project actually looks like. All right. So, this right here is the edit end workflow that we’re going to work with. Uh, we start with Google Drive. So, in this case, I go to my Google Drive. I drop in an invoice that I have, one of the hundreds that I have right now. I go to the invoice. I can see that I have different fields in the invoice. Company name, uh, address, email, line item, price, currency, payment method, invoice number, date, and status. Right? So, these are different fields that I have within the invoice. If I go here to the first Google Drive, I’m here and execute the workflow. What this will do is it will take the invoice that we just gave it. It will then extract the text from the invoice. It will give it to an AI which will check the different variables that we need from the invoice like client name, address, all that sort of stuff. It adds it to a Google sheet database. It then drops an AI to address an email using AI and then sends it to us as well. If I go to my Google sheet database, I can see that now the invoice was parsed. So the different variables have been extracted. If I go to my email right here, I can see that I got an email saying dear building team, you have received a new invoice and it gives me the different details. And it says the system has added the fields in the Google sheet database which you can also view here. If I go here, takes me to the Google sheet database with all the line items there. All right. So, that right there is for the system we’re going to build from scratch. Again, I’m going to start from zero, completely zero. So, I’m going to show you the whole development process. Let me go to a new a new workflow right here. We can start from scratch. The first thing we have to do is actually map out the process of the automation on a platform called Miro. You can use any other platform for this. Uh, but I like using Miro uh because it is very very easy. All right. So the first part or the first the thought process here is we have a bunch of invoices. Then we have to so let’s do invoices. Then we have to basically extract the text or extract different variables. Extract variables from invoice. And by variables we mean client name, client address, all that sort of stuff. And then we want to add it to a database. When someone says database they just mean a Google sheet or table, notion, clickup, whatever it is. And then after we add to the database, we want to send an email. So send email to billing team confirming invoice. All right. I mean it is a four-step process. As you saw, it was more than four steps just because of the way we had it set up. Uh but this is fundamentally what it is that we’re doing, right? We’re watching new invoices from somewhere. We’re extracting the variables. We’re saying, “Hey, okay, what is the client name? What is the account address? What is the price? What is the currency?” All that sort of stuff. And then we’re adding it to a database. And then we’re sending the building team. We’re sending an email to the building team confirming the invoice. Now, typically when I do something like this, I’ll think through how to structure it. So, the first step is invoices. As you saw, we used the Google Drive because that is the easiest to get started with. So, we can say watch invoices from Google Drive. And what this could look like is we run the automation maybe once a day or once an once a minute uh every minute, I mean, every hour or every week. And we watch new invoices that have been added so that we it’s a continuous thing. Uh, and that’s always good because we don’t want to have a system where there has to be a manual step of running the automation every single time. We want it to be automatic so that they can just drop invoices and every so often it takes invoices and then does the whole process. Uh, then extract the variables from the invoice, adds it to a database, uh, in this case Google sheet. Add variables to Google sheet and then send the email to the billing team confirming the invoice. All right. So the first step is Google Drive. So what is the first step is always the trigger. So what is the thing that actually starts the automation? In this case, every new client that has or every new file that has been added, every new invoice that has been added every so often will be the thing that starts the automation. Um so if I go to Google Drive and I go to on changes to a specific folder because we’re adding invoices to a folder, I can see that the change that we want to make is actually when a file has been created, when a file has been added. Um, so first the first thing you have to do is go here, create your credential, and you have to um connect your Google Drive to Nitn. Now, I’m not going to dive into this whole process right now, but I actually made a full step-by-step video on how you can do it within less than 5 minutes. Uh, you can check it out on the screen right now. Uh, but once you connect to your Google Drive, you’ll have a connection right here, which is good. The pull times just means how many times or how often do you want to run the Google Drive. In this case, it can be every minute. Then the trigger on just means what do you want the trigger to be? Do you want it to be just changes involving a specific folder, every file? In this case, it will be a folder because we need a folder to include the invoices in. And then we have to make a folder. So, let’s go to Google Drive. I can go here. I can make a new folder. I can call it invoices test YouTube create. And now this created a folder which I can find here. Now, this is a place where we’re going to store all the invoices to be processed every every so often. Um, okay cool. So now, uh, obviously make sure that your connection is correct. In this case, it actually should be James Solutions, not Nika connection. That’s a different, uh, account. And the folder in this case is invoices, test YouTube. So invoices test YouTube. Okay. And then it says, what are we watching for in this case, are we watching for a file to be created, updated, created, uh, folder created, folder updated, watch folder updated. Well, in this case, we want to do when a folder is created within a folder. So when a file is created within a folder. So in this case it would be when a file is created in the watched folder which is this folder right here. So let me go here do file created. So now this watches every new file that has been added. So let’s try it out. Let’s test because part of automation is testing. I want to have an invoice that I have right now. So you can drop your invoices here and I’m going to test if uh now that added here if I execute workflow. So in this case if I fetch test event I created will this catch the invoice that has been added? Well in this case yes. So this is the output. If I scroll all the way down, I can actually find the link which is a web view link of the invoice that has been added which is correct which is the same one that has been added here because it basically caught all the files from there that has been added. It’s only one. All right, perfect. So we know it works. Um so the first step is done right right here is finished. So we watched invoices from Google Drive. That’s good. Now the next step is to extract text from a file. So let me go here. Extract from file, extract from PDF because the invoices itself are on PDF version. So it depends what kind of PDF or what kind of file you have. Now here it says extract from PDF which is a thing that we have to do uh because that’s the action that we’re doing. But then it says the input. So the thing that’s going in to this node right here which extract text from PDFs has to be in the form of binary. Now, in order for us to get the file to be added here, we have to do an additional step, which is actually downloading the file to then being adding it to the to this node right here because it only likes binary format. And the only way to get binary format is to download the file. So, if I go here to Google Drive, I can now download a file. Press this button right here. Make sure you have the right connection. File, download. That’s fine. Uh, and now we want to actually do it by the ID because if you do it by the list, then you only have access to one file. We don’t want to keep downloading the same file. We want to change the file that we’re downloading. So the files itself all have an ID that’s unique. So if we map the ID, if we put the ID that’s different every single time, it will download every single file differently, which is exactly what we need. If I go here, I can put ID. So we can find the ID. And now the ID will actually be here. It always, it usually starts with one uh Y. You can see here ID um one Y whatever. So this will be the one that we map that we add here to be able to download it. Now if I just execute the step I can now see that I got binary format data which is a thing that we need in order to add it to the next step. And this is the data we got. Okay. So you always need that additional step when you’re actually doing something with Google Drive folder. It’s usually downloading it and then turning it into a binary format when you have to do something with it. Now in this case um the input binary format field is fine data because this is equal to data. So that’s fine. We can execute the step. We’re actually testing. As you can see here there’s a lot of fields. The one we really care about is text right here which gives me the company name, invoice number, customer name, date, company name, all that sort of stuff that we need in order to actually split it up and add it to the Google sheet. So the next step is actually extracting the variables within the text. Because it’s a block of text. How do we split it up? So we get the customer ID, the customer name, the email, the address, all that sort of stuff that we actually need in order to add it to the Google sheet. Well, in this case, you can press plus. We have to go to information extractor. Now, what this does is that it receives text to the actual thing. It then think through what the text is about and then based on the descriptions of the line items or variables that we tell it to to give us, it will then split up the text. So it gives us the the customer name, the address, the the invoice ID, all that sort of stuff that we need. Um, okay. So the text here will be the text from the previous step. So I can across right here and again you can also see the result which is something that any actually does really well. Uh you can see the output before you even test the schema type will be from attribute descriptions. Don’t worry about this. You can leave it as it is. And now we have to add attributes. So attributes just means what is that thing that we want to extract from the text. In this case there’s a few things. So if I go here and I look at the invoice again this would be different for sort of every company. It’s sort of similar. You still have the price the invoice number all that sort of stuff. uh but sometimes we do have something called statuses or payment methods um that we want to account for. So in this case it will be customer name. So we can do customer name. This is the name of the customer. So right here it’s asking us what type of output is it? Is it a string? Is it a boolean which is true or false? Is it date? Is it a number? In this case a string is just text like the normal version. So leave it as it is. And then description is us giving it a description. So it actually helps it in thinking what is the customer name um and so on and then we can put a required so it needs to give us the output. Then we have uh from here company name address and email. So company name this is the name of the company required email this is the email of the customer address as well. So address this is the address of the customer. All right. Then we have invoice number, date and status. Invoice number, date, status. Invoice number is this is the number of the invoice required. Now this right here for date we can actually turn it into a date format and we say this is the date of the invoice required and then status will be this is the status of the payment required and then we have line items. So line items this is like this the description of the payment the price and payment method. Price and payment method. Uh line item. This is the line item of the invoice. Price the total amount. This is total amount of the invoice and then payment method. This is the payment method. of the invoice. All right. So, I just finished filling out all the forms, all the details in the in the actual invoice. We have customer name, we have a company name, we have email, we have address, we have invoice number, we have date, and again we turn this to date because it is a date format, um status, line item, total amount, payment method, and so on. Okay. All right. Now, what we have to do here is we have to do two things. The first thing is to give it a system prompt template. In this case, it’s you are an expert extraction algorithm. They only extract relevant information from the text. If you do not know the value of an attribution as to extract um you may omit the attributes value. I think this is pretty good. I think we don’t need to give it any more context. Now, one more thing we have to do because this does not run on its own. This runs through AI. So, we have to connect a model to it. So, if I press here, I have a list of models that I can choose. In this case, I’m choosing OpenAI chat model. And I will come to this page. The way to connect your OpenAI to Nitn, you can go here, create a new credential. You can go to platform to OpenAI because you have to get an API key dashboard API key. Create a new secret key. Name it. So you can do invoice system. Create a secret key. You can copy this. Go back. Paste it here. And then name this whatever it is. So 5th September connection save it and now you will have your OpenAI connected to Nitan. Bear in mind that this is not free as in you still have to pay for this in a sense. So you go to your profile and you go to billing you have to add $5 because we’re using API credits and API credits costs money. Uh but is very very minimal as in I think I used $5 in 6 months. Um and I was using it quite a bit. So obviously it depends what you use it for as well but it’s relatively cheap. So you can add $5 and you’ll have that last you for a while. All right. So now that we have that the model can be 4.1 mini. It’s good, good quality and good speed. We can actually extract this. So let me run this. This uses the previous steps to test only this step. If I go here, I can see that I extracted uh the comp name, the company name, the email, the address, the invoice number, date, status, line item, total amount, and payment method, which is amazing, which is exactly what we need. Perfect. All right, the next step. So we did this done. The next step is actually to add it to the sheet. So if I go here, I actually made the sheet. So the variables that I have, uh, let me just fill this out so you can see. Go right here. I have invoice number, client name, client email, address, description, total amount, invoice date, status, and payment method. Now, this is right here is just a way for us to actually store the invoice. Uh, cuz there has to be some place for us to store all the information. Um, typically a company, they probably wouldn’t have Google Sheets. They would have maybe a a notion uh maybe some sort of custom software they have or but they always have a database right they always have a place where they actually have to store information. So this is what we’re going to use. Let’s name this invoice uh system and it and YouTube. And now if I go back here to uh here I have to add a next step which is add the invoice to the Google sheet. So if I go here, I can go to action and app sheet Google sheets and then I can a append a row in a sheet which means add a row connect your account. All you have to do is create a new credential. You don’t have to do the same thing you did for Google Drive. You can just sign in with Google which will take you to a page like this. Choose your account continue and then it’s successful and you go back and name it whatever you want. Press save. All right. All right. Now that you connected your Google Sheets, uh it is going to be a sheet within a document. You want to append a row because operation again is the thing that you’re actually doing. And then we want to look for invoice system and it and YouTube, which is the first one that comes up. The sheet will be sheet one because again this right here is sheet one. And now we want to be able to map the fields. So mapping just means that you have different columns. You want to add the variables for each column to make sure that when we run the automation they actually show up. Um so it will be invoice number which is invoice number client name so customer name client email so email address description and in this case it’s line item total amount is this invoice date it’s here status is here payment method is right here I believe that’s it we have to do anything else no that’s all good Um, okay. So, let’s test this. Let me execute step. Now, it’s running. If I go here, I can see that the first run did well. Uh, we have the line items. We have invoice 109, Lucas Martin, the email, address, description, total amount, invoice date, status, and payment method. Let me just freeze this row right here. So, when I go here, it doesn’t it doesn’t actually take it with it. And the next step is finished. So, this can go green. And you see how I’m just checking things off as I actually do this because it is a whole process. I’m planning it out. And now the last one is to send an email to the billing team confirming the invoice. So the next step is using AI because to send an email to the billing team, you typically want to use AI uh depending on the the email of course. Um but in this case we want to let AI actually do the email and we just um set up the email the Gmail after. So let’s add plus let’s do AI. Let’s look for an open AI node which just means hey we’re talking to a GBT like can we do this and it gives us the output. We are messaging model. Uh the again the way to connect to your openi I showed it before. Uh go to get the API key and it’s the same exact connection. If you connected it before you’ll have it here. The resource is text operation is me model because that’s the action that we’re doing. The model will be let’s do 4.1 mini. I think that’s more than good. That’s fine. And the prompt is going to be first a system, right? And then we’re going to have a user prompt. So the system prompt I’m going to copy from the other automation and go here will be you are an email expert for JM media named Jenny. You receive invoice information. Your job is to notify the internal billing team that an invoice was received or sent. In the evil make sure that to include the system that has been added to the fields. So we say okay. So in the actual email itself we want to give them a this right here. So anyone with the link copy the link. want to give them access to the Google sheet because I want them to actually have access to it if they want to look at it. Uh they get a notification saying, “Hey, everything’s good. By the way, if you want to look into this further, you can obviously look at it in the Google sheet.” Your output should be in the following JSON format. Uh so we tell it this because when we want to make an email, the email is composed of two different things. It’s composed of a subject line and it’s composed of a email body. In this case, because they’re both custom, we want them split into two different variables. So that’s why we use JSON to then split the email body and the subject line. And the rules is don’t use any markdown formatting because Gmail does not lack any markdown. It doesn’t actually recognize it. And then it actually recognizes HTML which I’ll speak about in just a second what it is. Uh so we use we tell it that we say hey talk to talk talk in the way that Gmail actually likes that you talk to. Um that’s fine. Now the user prompt is going to be this. User prompt is going to be the variables. So in this case, we need to add all the different variables. So it can be invoice number. I’m going to cut to me actually finishing this cuz it’s going to take a while. All right. So we have invoice number, client name, email, total amount, and invoice date. Now we can map this. So invoice number right here, client name right here. Uh email, total amount, and invoice date. Yeah, let me do status as well. And we can also add payment method at this point. Cool. All right. So that is the input that we give it. So we say hey you would do XYZ and here’s the input that you have to do this thing for and just give me the both the emails. Okay. Now one more thing we have to do here is actually turning this on. The output content is JSON because we actually tell the AI give me JSON. So we wanted to actually officially say hey the output should be JSON yes or yes. Um and we don’t want it to error out. So that’s good. Now let’s execute the step which is basically testing. It will use the previous variables and now it will give us the email. So the email is all in a weird format. This is the format that Gmail likes when you give emails. So don’t worry about this too much but worry about the fact that you got the subject line right here and you got the email body as two different variables right here that we can then use to actually send the email. So if I go here, I’m done with the AI part which is well I mean I guess it’s part of this. I can go to Gmail send a message to connect your Gmail to NN you can go here send sign in with Google and then you can take go through the same process that you went through Google sheets close and there’s three things that we have to fill out the first one is message uh or resource is a message operation which is what are we doing we’re sending the message uh who are we sending the email to in this case let’s do my email the subject line will be the one here so we just drag it across and we can see even the output before we even test which is again amazing and then and the message itself or the email type in this case which is where we add HTML. We have two two options. So we say okay we’re sending the email to someone. How do we want to send it to them? Do you want it just text or do you want to put HTML? HTML is just a way that you make your emails look pretty. You know when you guys get emails that look nice have formatting that have headers that have all that stuff. That is because you’re using HTML. So we kind of want to do that which is why we use HTML and that’s what we tell the AI to output it as HTML. Uh which is good. So the message in this case will be the email body which is one here. We just drag it across. And one thing more that we have to do is we want to take this off. So append edit end attribution which is basically a way for end to end to market themselves in a way. Um so when you send an email to someone if you don’t turn this off it will say this was sent by edit end. So we turn this off just because it’s more I guess professional more clean. It looks like it actually came from a real person even though we all know it’s not. Uh especially when you’re doing 100 invoices a day but that’s fine. Now we get it to execute the step. So, we’re testing this. And if I go to my email, I can see now if I refresh that I got an email um with all the details, right? And this is how we managed to make these look nice and bold and actually even have a sort of an embedded link that we can just press here and it’ll take us to the sheet that we have. All right. So, now let’s test it from scratch with another invoice from zero. Let me go to my Google Drive. Let me delete this. Not delete this. Actually, I can just send a new one. In the new one, let’s do a random one here. Let me see what the name of the person is. Isabella Moore. And now, if I go here to edit end, I can run this. Now, what this will do is it will take the file that has been created. It will extract the text. It will then go here to the information extractor. It will add it to the Google sheet. It will then think through AI to make the email that will be sent to us on Gmail. and we’ll have everything there. If I go here, I can see that I have Isabella Moore with the email, with the address, with the description, with the total amount, with the invoice date, status, and payment method. If I go to my email as well, you can see that now I also have a notification. Dear billing team, we have received the invoice uh from Isabella Moore. And we have all the different things that we have here, Jenny with no edits and attribution, with no hey, this was sent by NLM. And now I also have a link right here, which takes me again to the Google sheet with all the information here. Hey, so in this video I’m going to build a human in the loop AI sales agent live in front of you that takes lead form submissions. It adds it to your CRM. It drops a sales email. It roots it to your team for feedback and automatically revises it until it’s ready to send. So today I’m going to build the entire system from scratch in and it end. I’m going to walk you through my whole thought process, the whole detours, the the mistakes I make and everything that I go through. So you get to see what an actual development process looks like when you’re building automations. So this is the automation we’re going to build. It’s built on NNN and it all starts with the lead form uh submission and this is typically what the the client or the lead whatever it is they actually fill out to start the automation. That’s the trigger. Then we add it to our CRM which is in Google Sheets. Then we talk to our sales agent which will draft an email, a sales email that will be sent to us first. So this is the human in the doop element. It will send it to us. We’ll revise it, give feedback. If the feedback is negative, it will send it to another AI agent to revise to make the feedback, make the changes based on what we told it. send it back and do the whole repetitive loop until it’s positive and once we approve the email, it will then send it to the customer. Okay, so let me show you exactly how it works from the start until the end. I’m going to execute the workflow which will run the automation once go here and now I’m going to start filling it up. So name company name will be JM solutions budget can be 1.5 project description we are looking to generate leads for our real estate business and in time it can be 1 to 3 weeks. When we press submit here, this will trigger the automation. So the form is itself, that’s what the customer will do. It will send it to the first agent to check against projects that we’ve done before to actually incorporate results and testimonials into the email. It will then send it to us. So the next step we have to do is go to our email, go to this email over here, action required, new lead budget of 1.15. Um, and this is what their internal team in the company is going to look at. They’re going to look at the email. They’re going to respond. So this is a place where you get to give feedback for the email. So hey, thanks for reaching out. your time in one to three weeks. You recently helped another client. So, see how it incorporates testimonials here. Then it says, “Are you available for a 15-minute call this week?” Okay, let me ask let me tell it. Don’t ask a question at the end. Just say or just ask a few times. No, just ask to provide a few times that work for them. next week, right? And this is the feedback that I’m going to give to the agent. I’m going to press submit. Go back here. You see how now it roots it to the denied path because we denied the actual email. We said, “Hey, make changes is not good.” It will now send it back to us. If we go here to my email, I will have another email here, which I can go through. I can respond. And as we can see, it changed the email based on the feedback that we gave it. So, please share a few times that work for you. So, I’m going to say, “Okay, looks good. and submit it. And now because it’s positive, it will send it to the actual customer uh or the lead. So I’m going to go here and now since I’m the lead itself, I’m going to get an email saying lead generation results for your real estate business and I get a whole customized email for me. Now that’s right there is the automation that we’re going to build step by step. And the application on this on a business side is that a lot of customers or a lot of companies they have a lot of forms on the websites but the whole process from when the lead fills out the form to when they are replied to and so on. It’s a very manual process for companies. What we’re doing here is not only saving that time for the company to be able to reply to those emails automatically, but actually making it custom and also incorporating our feedback into the whole process as well, right? And that’s exactly what we’re doing. All right, cool. So, I’m going to start from scratch and I’m going to go to another workflow personal and test builds. Create a workflow. Okay. And we’re going to start here. And before we get to the actual build and actually putting any steps into it, I usually like to map out the automation, what it looks like. It’s sort of like a plan that I have uh before I get to the actual build. So, it all starts with the form. So, the first um the first place is form. And I add a sticky note saying what kind of things we want on the form. In this case, it’s name, uh, email, was it, uh, income, no, budget, intent, timeline, and project description because that’s what we want in the email. Then on the form or after the form, we ideally want to make sure that we add it to the CRM. So, add responses to CRM. And the CRM can be Sheets, it can be ClickUp, it can be ASA, whatever you have, uh, or Hopspot. And then you can then after we add to the ser talk to the first agent. So first agent to write sales email. Then ideally we want to send it back. Send it to us for feedback and approval. And now it can go either two ways. If we approve it, it goes to send the email to the lead. If we don’t approve it using the feedback that we gave it, it will then send it back. So I could have two paths here. I could have what really red and green right that’s approve or deny. So if we approve it deny so once it’s approved again we will send it to the a to the customer. So the lead so in this case will be send email to lead and if it’s denied then we want to uh have second agent. So second revision agent right here which will then send it back to us for feedback, right? And that’s exactly what we want to build. So we start with form. So there’s a form that lead fills out with different variables right here or questions. Then we add the responses to our CRM. In this case, it’s Google Sheets. Then we add the first or we talk to the first agent to write the sales email. Then we send it to us for feedback and approval. And I forgot to add one more step here which is uh in this case it’s a intent agent. Okay, I’ll explain exactly what that is because we get feedback but how does the system know whether it’s positive feedback, whether it’s negative feedback, how does it know whether it’s accepted or denied? Right? Uh so this is intent. So feedback intent agent feedback intent agent. Okay. And now if it’s approved, it goes there. send the email to the lead and if it’s not approved, then we talk to our second agent which will write the email. Make this smaller. So, quick note here. Um, you don’t actually build automations and go straight to the platform and start building them. You always want to have a process to actually map things out. Map out what you want to build first and then go on and build it. It’s sort of like you’re building a castle on a foundation of sand. So, you always want to make sure you have that road map and that guide that you can then take when you’re building automations. All right, so let’s go to an end and actually build it. Um the first step of course because we have the form we have to create a form. Now thankfully we have NN which has an internal way of creating the forms. What I mean by this is that they have just an internal NN end form right here. Um so we can use this we go here and form and we can use the trigger. So the trigger just means what’s the first thing that starts the automation and in this case will be on a new and end form event. So if I press this button it’ll take me to this page uh where I have a few things to look at. The first thing is test URL versus production URL. And test URL just means that this URL will be used when we are filling out the form on test mode. So when we activate the automation right here, then only do we use the production URL. Okay. So test URL is what we’re using right now to test it. But production is when you’re activated. Authentication is when you want to add a password. So you want to add a password to this form. So let’s say I add a basic O uh name credential. I can create a credential. I can name it YouTube human in the loop agent. I’m definitely not going to remember what this is. Uh user will be user and then it’ll be 1 2 3 4 5. So let me show you exactly what this is. Um close. It’s fine. Uh no thanks. And now I can do new lead submission. I want to show you exactly what the basic off is. I can execute the step and see before we actually get to the form it asks us for a password. Well, why do we do this? It’s sort of like you’re putting a password on your phone. You don’t want everyone to have access to it. Uh you want only the people who have the password to have access to it. So in this case, if I put the password that I put before, 1 2 3 4 5 and sign in. Then I can obviously do the form and whatever I have right on there and I can submit. In this case, there’s no questions. Uh but that’s what I do and I get the output. Uh so that’s what basic off is. um form title. So let’s let me actually turn this off because I don’t want the the password. So this will just be free. Uh the title will be this. So this will be we can add this as we’ll get back to you as soon as possible. Now that we have the description and the title, we want to add the elements. So in this case, we spoke about having name, email, budget, intent, timeline, and per project description. So to add questions, we have to add a form element. So in this case, it can be full name. It will be text placeholder will be James Low. So this is the thing that you see before you actually fill it out to give you an idea of what you have to fill out there. Required yes will be required. Then we have let’s say email. So this will be email and email could be james.logmail.com. That’s what we have here. And we can also make this required. So the the user has to fill it out. Then we have another uh question here which can be company name. In this case, we didn’t add it here, but it can be a question. So, let me do it here. Company JM solutions, which is the company name that I have. And then we have budget. So, budget can be a not a text uh but it can be a drop down. So, dropown just means you have different options. So option one will be less I can just do this less than 1,000 add a field option. Option two will be 1,00 to 3,000 like this and then 3,000 to 5,000 and another fill option 5,000 plus. So in this case more than 5,000 that’s for budget and then we have um project description. So in this case wouldn’t be this be acquired project description which should be a text field. So you can just add we want a system that boom you can go up to the user required field and then we have timeline. So timeline again can be a drop down uh because you want to give them a few options. It can be within one week, one to three weeks and then we can do three weeks above. So one week to 3 weeks and then we can do 3 weeks plus. All right, cool. So uh the last thing we have to fill out is respond when. So this is saying when do we want to send the data? In this case, we want to send the data when the form is submitted. But there are cases where you want to send the data when the workflow finishes. So you start the form and does it only submit does it only send a confirmation of submission when the the actual workflow finishes when the automation finishes? In this case we don’t need this. Uh we just have form submitted. So whenever the user submits the form it starts the automation and we can now test it. So in this case as I mentioned we’re testing it. So we’re using the URL here. I can execute the step. I can now just fill out the form. So for company name budget it can be 3,000 project description we want more leads more leads and 1 to three weeks right if I go back here I can see that this is the output that I get so we trigger the form using the NNN and now we get this output so full name email company name and so on now we can use this variables so these are called dynamic variables because They are dynamic. They change every single time. Um, and then we can use them for for next steps. So, hormone is good. Took us a minute to put this together, but now we can add this to the CRM. So, the CRM will be a Google sheet. So, let me add the Google sheet here. We can do CRM intake YouTube in the loop agent. I have so many Google Sheets of these. So, I make I have to make sure that I know exactly which Google sheet is what. Um, so this can be full name. Uh I think we had company or email. Let me just quickly check. Have company name, full name, email, company name, budget, project description, and timeline. Uh God, how did I forget to read? Budget, project description, and timer. project description. Now we have timeline and make this bold. Let me make this here white. Like to make this pretty. Okay, cool. Uh, now that we made the CRM and typically we use Google Sheets because that’s the easiest, but um, a company probably wouldn’t have Google Sheets. They would have a HubSpot. they would have a notion or they would have a clickup where they store all the leads that come through. Um, but this is just for testing purposes. All right. So once we made the CRM, we can now connect it. So to connect the form to the uh Google Sheets, we just have to press plus. Look for Google Sheets right here. And now we want to append a row. Append just means add, right? So we want to append a row in a sheet. Uh connect your account. So you can connect your account by creating a new credential. In this case, you can sign in with Google. I’ll do it step by step. my email. Continue connection successful. So if I go back, I can see that the account was connected. I usually would recommend naming it um the email. So five and then the date which is 28th of August. Okay, cool. And you press save. So now the connection is done. Uh the resources sheet within document append row because that’s the action that we’re doing. There’s a bunch of stuff that we can do and we’re going to use I believe it’s get rose. Yeah, we’re going to use get rose later on. Now, it’s asking for the document. The document in this case is the CRM intake YouTube human in the loop. That’s a long name. Okay, they’re there. I know it’s that one cuz we named it. So, that’s good. And sheet one will be the sheet that we have to map. Again, sheet one is here. And now it’s asking us to put the values to send. So, in this case, we’re mapping each column manually because we are manually adding variables for each column. And we’re saying, hey, full name needs to go in column one, which is full name. Second column is email, company name, budget, restriction, and timeline. We do everything for for the different columns. So, full name, let me drag it across right here. Email, drag it across here. Company name here. Budget here. Project description here. Timeline. I forgot to add one more, which is date submitted. All right, cool. Um, I want the date submitted because I know I want to know exactly when they submitted the date or when they submitted the form. Uh, because that’s always good to know. I can just refresh here. And now it gives me the the column that I put. And now this is the variable. So submitted at which tells me the date. This gives me also the time and all that sort of stuff. So we’re going to drag this across. Submitted at. And now I wouldn’t want this like this. So I’m going to format this in a way where it’s actually readable for the company and they can actually understand. I mean cuz who’s going to understand this? You’re going to have to spend time even thinking about what this means. So, uh, to do it, I believe it’s format date. Uh, no, it’s not that. Okay. So, let’s see why it doesn’t work. Uh, let me see what I have. Suggested to date time. Okay. Okay. Okay. And then we have to format it right right here. Yeah. Format. And now it’s asking me to format it in the right way. In this case, you see the result. The way that this is set up, we just added the formula. www mm dd will result in this uh in this case I probably wouldn’t want it like that um let me just go to the formatting guide which will show me exactly the kind of formula that I need to add this looks crazy with the with the color that I have um in this case we want we can do this uh August 6 so let me do FF so if I do FF here it should yeah 28th of August 2025 at 620 20. That’s perfect. Uh now if I execute the step which will use the previous variables to actually add it to the sheet. If I go here I can see that the responses were added here. Okay. So gem solution this this and then we also have the date. Space this out and then that’s good. All right cool. So now that we have this we can go to our next step which is actually making the sales email. So in order for us to make the sales email we have to use a agent. Okay. There’s a few reasons why. Um, we typically would have like this is a agent workflow because we’re we’re also formatting the email and I’ll explain exactly what it means. But if you go to AI, you can either use an agent or you can just simply use an LLM. I typically use an agent because we’re doing different actions with the with the thing. Like we’re not just telling the agent write the email, but we’re also telling it, hey, formatted. And AI agents are usually very good at taking something and then doing something with it. Um, as in doing different actions. So, I’m going to press AI agent to connect this step to here. And now I’m going to rename this sales. So first sales agent, sales email agent rename. And now I have to connect this to three different things. Uh and I have to put a prompt inside which is the main thing. Um so here chat model will be openi to connect your openai here create a new credential. You have to go to platform theopenai.com sign up. to log in. I want to show you everything cuz I feel like this is one of the things that uh it’s like the small things that actually matter when you build automations. Dashboard, go to API keys, create an API key, name it whatever you want, right? Then you’ll have So, let’s actually do it. Human in the loop agent YouTube. Create a secret key. Don’t don’t worry about any of this. This is the API key. So, save this because you’re not going to be able to reaccess it unless you make a new one. Um, so we go back to NN API key. You paste it here. Then you save it and then it will automatically be connected. Okay. Close. All right. Cool. Then you want to connect it to 4.1 mini. That’s fine. And actually we have to go inside the agent first before we do the other ones. So let me go inside. And now we have to do a few things. Uh the first thing is source for prompt. So this is asking us what is that thing that’s going into the AI agent every single time. Uh in this case it would be the the details of the lead, right? Which will be the details of the form. Um which is why we have to change this. So this right here it says connect to chat trigger node. This means that usually when you have an AI agent you chat to it and then it does something. Uh which is why we’re using chat trigger node. But in this case we’re using a form. So we have to change this to define below. And now here we have to add the things that are going into the agent every single time. Uh so I can go here to expression go full screen and now I can add the lead details to the form. So in this case it can be here’s lead here’s the yeah here’s the new lead intake information then we can start adding it. A full name right here. Yeah. Drag it across. Email, company name, budget, project, description, timeline, and then I also want to add something else later on. Uh but email goes here, company name goes here, budget goes here, product description goes here, goes here. All right. So, uh the reason why and now this is basically changing every single time. So these variables will change as the form submissions change. Uh which is what we want because we want the sales email to be different every single time for every lead. Um but the reason we’re putting it in the user message is because in the user message we add the things that change. the system message which is what we find here system message. This is what we tell the AI agent what it needs to do right in general and the identity that it has. So if I go here I can now start adding the system message. I’m going to go here. There’s a prompt that we’re going to give the agent for it to think through what it needs to do and what it is. I’m going to copy the prompt from the other agent that I built before and paste it here. Uh and by the way you can either take a screenshot and put it through chat GBT and tell hey can you transcribe this or I’m going to show you after at the end how you can get the whole resource for free the whole blueprint. So don’t worry. Um but this basically is saying you are an expert salesperson for an agency that delivers a solutions. Your job is to respond to incoming leads by addressing their needs in a professional manner. You’ll receive an information that looks like a lead project encryption and timeline and your goal is to convince them and let them uh let them know that we are the best AI agency on the market. The project uh so the tools right so this is the typical structure that we have. We have overview we have the tools that are connected to the agent and we have the rules. Now, I’m going to explain to this I’m going to explain to you what it is. Something we forgot to add to the mirror right here when the first agent actually um is doing because we want the agent to be connected to the Google sheet with project results because we want to incorporate results to our email. So, we don’t want to say, “Hey, thanks for filling out the form. We can definitely help.” We want to say, “Hey, I saw that you did a lead generation. I saw that you’re looking for a lead generation project. We actually did a lead generation project for John a few months ago and we got this results. We can help you, right? So, it’s always good to incorporate proof into what you’re doing. Um, so we want to connect this to Google Sheets. We want to connect this as well to let’s leave it to Google sheet, right? So, in this case, uh, that’s why we see the projects. So this is the tool that’s Google Sheets in this case where it gets the different rows from our Google Sheets to then give to the AI agent uh for it to to actually use to make the email. We say use this tool to search to the previous project we’ve done that can be included in okay cool. So before so to actually make the tool we have to make the sheet because right here is the intake but then right here is the projects. So what we want here is a way for the agent to pull projects in or pull results that we’ve done before. So what I’m going to do is I’m going to copy the um the results that I had before. And bear in mind this is something that the company can start adding every single time after after a minute. It the agent will always be automatically uh updating as in it will take all the roles that are here. So if you keep adding that’s fine. It will keep on on taking whatever’s here. Um and again these are the projects that are going to be included when the agent needs to refer to let’s say someone said lead genen it will use this example for result in legen project. Same thing with general tech on boarding content and whatever it is. So actually now that I start to think about it, we forgot to add the intent. Um okay, which is drop down lead generation. Then we have content creation. And this is something that happens, right? You just think through, you just forget. Um that’s why I want to show you the raw version of me building automations because that’s what actually drives value to people. Uh on boarding automation uh let’s do general uh general automation support. All right. So um yeah this is need definitely needed when we have to give to the agent for it to pull information from the Google sheet. Um so let’s rerun this. Let me actually update this. Let me go here. Let me do tent actually. Let me So we have to shift this and then put here. Let me run this first. Let me just fast forward to me filling it up. All right. So I submitted the form. Now we have this data to to work with. We can pin it, right? Pinning it just means that we don’t have to rerun the form every single time to execute the next um nodes. The automation we can use this as test data for previous for the next steps. And now we want to add this to I refresh this. Okay. This is good. Uh intent will be going here. Okay, cool. So now we also want to give it the intent. So let me go here. Let me say intent submission. We can put the intent here. All right, cool. Now we want to go here. And now because we are able to give the intent to the the agent. Now I can use the projects, right? Because the intent is what’s linked to here to the projects. Perfect. Um okay. So let’s go here. We also give it some rules. So keep the email concise and professional under 100 words. This comes from reactive prompting rather than active prompting which just means that we prompt as we get errors. We prompt as we iterate as feedback as we get feedback and feedback only comes from actually using the automation actually running it. Um we give it a few objectives. Retrieve information about the project with the lead to prove that the team is capable. Okay. So this is this is the part where we tell it to use previous projects results to give in the email. Always write the email in HTML. Um because Gmail to make it look pretty. So to make it look like this with new lines, this is called new line. One and two spaces between lines, we use something called HTML tags. So break. So this right here, BR really stands for break, right? And that’s why we add one, that will just do a new line. If we add two, that will be two new lines. One, two. Okay, so this is very important. Um, and then don’t add any emojis in email. Yeah, don’t lie. Definitely don’t add emojis because in the sales emails, emojis are the worst thing you can add. Um, perfect. Uh we’re going to use this later on but don’t worry about it now. Uh now we can connect this to the Google Sheets. So go Google sheets sheets tool connection. We did all this we already did. The resource will be um yeah the resource will be sheet within document and we can get rows. So we want to get the rows when I get these and we’re going to let the AI actually think through which result which project it needs to use to then make the sales email. So the document will be CRM YouTube human in the loop agent. The sheet will be projects and I’m going to leave this empty. So execute step. And now see how it got the three different uh four different rows. Den responses onboarding or content onboarding and general tech. Right? And now that’s what’s going to use to actually make the email to incorporate the results into the email. All right. Cool. So now that we did this, we can now um I want to show you exactly why we have to add something else to the agent because it’s a bit more technical. Um but it’s actually very very easy to understand once you see why we need it in the first place. So I’m going to run this. I’m going to show you exactly what we need this for this agent right here. What it did is that it just wrote the email. Okay. So dear Mikuel, we specialize in custom driven lead generation systems and understanding. Okay. The only problem with this is that we don’t get the subject line and we don’t get the body of the email in two different yeah in two different uh variables. So if I paste this all into Gmail, there will be no subject line. So for us to be able to make an email that has a subject line and an email body, we need it to be in a very specific format, right? That’s why we press we toggle this on which is require specific output format because you want the subject line and the email to be in two different variables. So once this is turned on, we have a new option here which is output parser. We can just press this structured output parser and don’t worry um I’m going to copy what I had before but when you get the blueprint you can u you can directly have it but what I’m basically saying is let me just copy this that I want the first property. So the first variable here is subject line which is the subject line of the email and then the email body which is the body of the email and then the required is subject line and the email body. So we want the actual output format to be in a subject line and the body of the email. So let me show you the difference now when I run this. Okay, let’s see why there’s an error. All right, so after some error handling uh I realized that the code here was wrong. I actually just pasted the right one. Um so in this case again it was just a few tweaks. subject is subject line and then we have email body required. Again, if you have the the whole setup, you can just have it here. I don’t worry, but you want to make sure that this is right. And by the way, if you ask me, how did I get this code? You can simply go to chat GBT and you can say, hey, I’m feeding the AI or feeding the code parser and email with a subject line and the body together. I want to output it as two different variables. One is subject, one is email body. And it will give you this code right here. So, you can see here we have a subject line and we have an email body. Okay. So now we can go to the next step. The next step is actually setting this. So setting the edit fields set. Why do we do this is because ideally when we go to the next step which is human in the loop agent which is what you’re here for is we get the feedback and then we get the intent of the feedback. If it’s positive we send it to the customer. If it’s negative then we reroot it back. But the only problem is is that we want to routt the same variable back to the agent or back to the human in the loop agent. So it’s better if I show you rather than tell you uh because it makes much more sense. But in this case let’s just set two variables which is subject I’m going to press here which in this case is JSON output subject and email body right which is email body. Okay so these are the two different variables. Uh and now when we route it back to the agent that actually has to do the revision we loop it back here. Okay, we’re looping back here for it to use this variables to um to reroot it back. Okay, so now that we have the variables set, we can then go to the human in the loop element. So human in the loop will be um human in the loop right here. And you can see we don’t have only email, we have Google chat, we have outlook, we have different software. In this case, we are using Gmail. So we can go here to connect your Gmail to NN. We have to go here, sign in with Google. It’ll take you through the same thing that we went through before. Message, send, and waiting for response. That’s that’s the thing that is human in the loop. The email is who are we sending the email to for it to give us feedback. In this case, we can put my email. If I go here uh on the email, I think we added action required new lead with budget. Okay, so we put the budget here and then here we put hey we have a new lead created. Okay, project description and then email drafted. Okay, cool. So here subject line will be this new lead with budget of and this variable will be changed because that’s the thing that changes every single time. Add fields. No, it’s actually form submissions. I can go to budget right here. So, it will change and then the message like I mentioned before is, “Hey, Mikuel, we have a nude lead form submission. Please revise the email and give feedback on the copy.” So, in this case, we can just add two. So, this just it’s just two headings. heading to we can do project description so the internal team knows has a context to what we’re giving feedback on project will be here and now we can add the email so subject I would add a subject line subject actually I do email uh I think this would work with markdown this is markdown format um subject line will be used which is this. Then we have email body is this. Let’s test this. Uh let’s see if it works, how it works, uh when it works, why it works. So waiting for input. Um okay, cool. So now we go here. Can see. Okay, so this didn’t work. We we have to take this off. Um but I can go here. I can see that we got the email. So that’s all good. Okay, perfect. Um, okay. I also realized just now that so let me just give you feedback like I can approve. Perfect. Um I realized that this so email doesn’t as I mentioned before email needs HTML not um it needs HTML not markdown format. This is markdown in order to put HTML. So in order to put heading two on HTML we have to use this uh here and then to close it we have to use this slash forward slash and then same thing with this and we can just remove this I don’t think we need it no body yeah that’s fine okay um okay put and then we can add please provide feedback on the email if you have actually no preview if you have perfect now as you can see when I went to the email it actually just asked me to approve but in this case we want to leave space for feedback so in this case we want to add free text so what this means is that when he sends us the email to revise we don’t just press approve we can also press approve and deny right but we want to add uh text we want to add feedback so we can say hey change this change that and then it will then send it to the agent to revise it and then change it, right? Um because free text is what we need. I want to take off appendn attribution which is just this automated ven saying hey n I did this. Um so we can do this. We can execute the step again. And now if I get the email I can see that it says respond and the response now I can give feedback. Okay. I can say, “Hey, uh, this needs to be more concise and professional.” Submit. And now that’s the feedback that’s going to come through. Say, “Hey, this needs to be concise and professional.” So, ideally, we want to then talk to the other agent, give it the email that we dropped right now, give it the feedback, and then let it revise and then do the whole thing again and make it a repetitive loop. Okay. So, now that we have the feedback, as I mentioned on the Miro before, we want to send it to the feedback intent agent. So, so first let’s rename this to human in the loop rename. Uh, and then now I can send it to the text classifier cuz the text classifier on NN basically takes text and classifies basically says hey based on the text this is what it is based on the options that we give it the categories right. Um, okay. So text classify would be the this right here will be the text to classify which would be the the feedback that we give it and then it’ll be two categories. One is approved and one is denied. Right? So approve and then let me just copy the description from the agent that I built before. We go here. I say the sales agent approved the email accepted the way it was written. The text that we’re classifying intense that it was accepted and that everything was uh good. example output. Yes, that’s fine. Looks good. Send it through. Now, this came from actually testing because how does it the text specifier isn’t always 100% correct, right? Sometimes we give it something we say, “Hey, can you change this part?” But it assumes that we accepted it. So, it sends it to the lead. Uh we want to make sure that we give it examples of what someone might say as a way for them to reference whether it’s accepted or denied. Um so, that’s why we add the examples. And then category will be denied which will be the uh right here expression. Let me go here. Here the sales agent denied the email and denied the way it was written. Uh the text that we’re classifying intends that it needs updating or changing. Usually usually um we predate feedback on how to do so. And then we give it a few examples. So make it shorter. I don’t like it. It’s too long. Include other projects and no. So these are various things that you would um ask the agent or you would tell the agent and then we’ve tell it hey based on these sort of examples this is the denied path. Now okay this is good. Um so now as you can see we now have two different paths. So now we can go to the side where we send the email to the lead and then the denied path where we have to make the agent to revise. Uh but before we do that we have to add a model because this thing’s through an AI. So the model here will be uh open AI chat model. Again we already connected it. So 4.1 is fine. And now that we categorized the different types of responses based on what’s approved and what’s denied, we can now send it two different ways. So let’s do the easy one first which is approved. In this case, we just um use a Gmail node to send it to the customer. So create send a message. Yeah, send a message. Um you already connected a message send to in this case we have to execute previous nodes. Uh okay, let me just add test email. subject line will be hello. Let me just change this real quick later. Uh let me just run this. Okay, pin this. And then now I believe that we have okay, we don’t have data here. So let me just run this again and go here to my email. Make this shorter. Now this right here I can pin. And now I can use this. Okay. So I can use this to say for it to classify whether it’s denied or approved. So as you can see it went down the denied path because we said make it short. We give it feedback. Um okay. So now right here I can then pull information from the form which will be email which will be subject line will be in this one right here. Subject line. actually need to remove hello first and then the body of the email which in this case again it’s HTML. We can also put text but we’re using HTML um for this for the actual message. Okay. So now if I test this. Okay. I actually didn’t get it for some reason. I didn’t get any email. Let me try again to see if it works this time. Okay. I think it’s because it didn’t go down this path but or it’s because these are pinned. Let me just unpin this. do each one individually. By the way, I’m just pressing P when I hover over this. I can try rerun this. Okay, let’s just go through the whole phase. Um, right here and go here. I can get an email and say yes. Looks good. Submit. Go back. And now because it’s approved, it will go down this path. Okay, cool. That’s why uh because the text that we give it before was the denied path. So, we go here. Um and then say boost your lead generation one week. We’re specialized in developing lead generation tailored systems for business. For instance, we recently helped a real estate firm generate 20 leads. Do you see how it pulls in these sort of projects? We recently helped a firm generate 20 leads in 5 days after working with us which generated 100k pipeline. That’s what it uses to uh in the email, right? To generate sort of authority and trust. Uh given your timeline and budget, we’re confident we can deliver. Okay, best regards. And now this right here I don’t want. Okay, so this is where we go here to the email node and add options. We can then uh append we can turn this off. Okay, append and end attribution. Turn this off so that we don’t need um we don’t have the sponsorship which is right here. Okay, so name this to send so lead email and that’s the first path for approved. So the next step is the denied path. So in this case we get the feedback and we give it to another agent to revise it. Okay, so I’m going to press add AI agent. In this case, we can name it revision agent. We don’t need to connect it to a chat node. I mean, we don’t have it connected. So, we just have to define it below. And the thing that we give it is, let me go expression is the feedback and the email, right? So, it knows that both of them. So, in this case, it will be feedback received, which will be this one here. and the email body which will be this one here right and sub. So we give it okay uh and now we want to give it a system message because we want to give it an identity in the whole thing that we give it before the only thing that changes now is the fact that now it needs to revise but it still sends it still does the actual email. I’m just going to copy and paste the prompt that I wrote before uh so we don’t have to waste time actually writing it. And I have you are helpful intelligent email assistant who needs to update a sales email based on the provided feedback. I’m going to add overview which I forgot to add. The tools is the same. The rules are the same and final notes are the same. Um okay, cool. And uh we still have to turn this on because we still need it to be in a very specific format. In this case, it’s subject line and email. Again, the only thing that changes is that this makes a revision, but the output is still the same, which is an email. So I’m going to put this require specific format. And now I have to connect these to a chat model to a tool and help you parse it. The good thing about N&N is that you don’t have to connect it again uh to this to to a different thing. We can use the previous chat model the previous tool and the previous operate parser. Okay, so they’re connected to the same thing. So this goes here, it uses these, then goes here if it needs to go here and it uses it again. So you don’t have to redo it. And I can press save. And now let’s test it. So let me go here. Let me use the feedback that we got from here. Let me go here. Hey, Mikuel, we specialize in customized lead generation systems. We recently helped. I told it to be more concise. I think that’s what Yeah, more concise and professional. Do a quality so we can see. Yeah, I think this more concise. Definitely more concise. I don’t know about professional. Um, but that’s fine. And now to make sure that we can send it back to the human in the loop to make sure that it’s a whole repetitive process, we have to pin this across and put it in the edit fields. Okay, so this is where it all links together because we want it to be a repetitive loop. So we want to make the email for the first agent which only writes the first email, then send it to the human in the loop to make sure that we revise. If it’s bad, it will revise it. Send it back again. If it’s bad again, it will revise it until we accept it. Okay? So it’s a whole repetitive process. So there’s no human, the only human in the loop is us actually approving it or denying it. Uh but the automation is smart enough so that we can loop it back. And the reason why we’re using this node right here which I explained before is because the output here subject and email body is the same type of variables that we get here subject email body. Okay. So this basically gets the input from here and from here and they’re all the same. The only thing that changes is the actual content right but the variable name the key this is called the key is the same. So that’s how we use that. Um okay so let me unpin this and we can run this from the start until the end. Save. Unpin this as well. Save. And now I can execute workflow. It’s going to be here. And I can start filling out the form. James Michael. Now obviously this should be above um we can change it later in in the form. But that’s the whole formula there. Submit. And now this starts the automation. Okay. So it sends it to our CRM. So if you go here to uh that was the old one to here she won James Michael Corp budget authority uh budget description timeline intent and date submitted it will now send it to us for revision action required let’s say we look at this and we say respond we say you need to ask them at the to give you a few times that work for them next week for a call. Okay, so in this case, it should send it to the denied because we gave a feedback. So see how it goes here. It will use the AI and we use this tools as well. Send it back another email. So could you please provide a few times that work for you next week? Let me say make this a bit longer. So now when I submit it, it then goes back to the same thing. You see how it’s a whole repetitive loop? It goes through every single time. Um, and that’s why it’s it’s a great system to have because it doesn’t really end until you accept it. I go here again. I can respond and say yes. All good. Press submit. And now because it’s approved, it then goes here. Okay. And we get the email which is this. So let’s discuss your AI driven automation. It made it a bit longer like we asked it to. It also made the question here. Um, and it added the case study right here. Okay. So, that right there is I mean one step ahead that we can do is actually make only the first name, not the full name. So, let’s just do that right now. Let me go here. Um, yeah, let me actually just put first name. I think that would work in some Yeah, I could do first name. And I think this needs to be split. I think it needs to be a space. Yeah. And then I can first get the first. Yeah. So this gets James. So a full name is like this, right? And this is always good to know because when you’re building automations, you want to have these sort of formulas uh at hand. So full name is first name space last name. So we’re saying is split this by the space. So it will be one and two and I want the first that comes here. So split by the space space here and then I want the first. If I said last it will get the last name. So let me say last it will get Michael right? James Michael. I mean in this case it would because the full name is James Michael it will get Michael. And if you’re enjoying this Enit course, then you might want to check out our AI automation circle, which is a school community for people who looking to learn AI automations from zero, either to apply in their own business or to start the AI agency to provide services to clients. We have people introducing themselves every single day, asking questions, sharing wins, getting technical support, and also looking for jobs and partnerships. We also have a classroom full of courses, which is the AI automations 101 course, an extension to this course. the templates vault, which is all the resources from our YouTube channel in case you want to work with us oneonone to start and scale your agency. We have all the weekly recordings from every single call that we do, plus over $20,000 in discount codes. We also have two calls a week for weekly huddles to answer any questions and also VIP coding sessions. We actually build systems from scratch. The only catch is not everyone gets in, so feel free to apply and make sure you put some thoughts into your answers. With that being said, let’s get back to the course. I built an AI agent on Nitn that reads my contacts, manages my emails and my calendar, and even writes my blog post. And honestly, it still blows my mind. So, in today’s video, I’m going to show you exactly how I did it. All right, so let me show you exactly how it works. We have the agent pulled up here. And then we also have Telegram, which is exactly how I get to talk to the agent. Let me just say, can you send an email to James Low, uh, telling him that we have dinner tomorrow at 7 p.m. in Rome, and also, can you put that on the calendar to make sure that we have it there for 7:00 p.m. and send an invite to him and, uh, yeah, let me know when it’s done. So, right now, the agent had a task assigned to him. It’s going out and finding the different agents that I need to talk to in order to fulfill the task. It’s using both the email agent and the calendar agent. As you can see, the email is done. The calendar is done. And I get a text saying that the email to James Low about dinner tomorrow at 7 p.m. in Rome has been sent. And the calendar event for dinner has also been created. So if I go to my email right here, I should expect an email saying we have dinner tomorrow at 7:00 p.m. in Rome, which is fine. Calendar, I can see that we have dinner in Rome, which is scheduled for 7:00 to 8:00 p.m. And I never told it to do 1 hour, but it was smart enough to understand that for dinner, uh, 1 hour was fine, which is great. And then it sent an invitation to $100 million peanuts, which is the email that I have unlisted under James Low right here. The real ones know what this is and it was scheduled automatically for me and the email was sent. All right, cool. So now you got to see what the AI agent does. Let’s go to mirror right here. So I drew up this diagram which shows exactly the fundamentals or the way that this multi-step AI agent works. Now we still have an input and we have an output. Sorry for that. Uh the input is essentially what I told it. So hey, can you do XYZ for me? Can you schedule an email? Hey, you schedule um can you put something on the calendar? Right, this is an instruction that we tell the AI agent to start with. That’s the input. Uh and the output is hey yeah everything was good. So after we give it the input that goes onto the multi-step AI agent. Now think of this as a CEO of the company. CEO of the AI agents. It has system prompts and instructions. So what these are are instructions that say hey you are a helpful intelligent assistant, right? The typical prompt that you put on for an AI agent. And we also say here are the tools that you have access to. Here are the agents that you have access to. If this happens, if you asked to send an email, then choose this agent. If you’re asked to do the calendar, then choose that agent. Right? So, fundamentally, this multi-step AI agent thinks with its brain, which is the LLM, and also has a memory, which means it remembers the previous conversations that you had or the previous questions that you asked. And on a high level, the multi-step AI agent gets an input, which means it gets a a request, right? And then chooses which agent to talk to. So, think of these as head of departments. So the CEO has different head of departments in their company. So it gets a request and it chooses hey based on what I was told let’s say we do a schedule calendar event for tomorrow for dinner which is exactly what I did. Then it would go out and talk to the head of calendar so calendar agent. It sends a request saying, “Hey, I got a request saying that we want to schedule a dinner for tomorrow 7 p.m.” And then that calendar agent talks tools which are the employees which actually do the thing which actually schedule the event create the event through a request and then they get a response which is yeah it was successful and the response back to here saying hey everything was good and obviously these head of departments think with the brain which is the LLM in this case but let’s say we asked it to send a calendar event or even send an email in this case because we have a contact department we because we have a contact agent the first it has to that we instructed to is hey if we’re told or if you’re told to schedule a calendar event or schedule an email the first step you have to do is actually find the contact of the person that we’re talking about because I’m just saying the name and then you can do the other things so for the example that I gave you for the calendar you have the input which is calendar multi-step AI agent first step is contact agent so to get the contacts that it needs through a request in a response right talking the tools as well which is the employees which gives the contacts and find the contacts then it goes here then it says Okay, what do I have to do first? In this case, calendar agent. So, we schedule the calendar. So, head of department goes to the employee saying, “Hey guys, can you do it?” Yes, it’s done. Sends a response. Everything was good. And then talks to the email agent, which is head of email in this case for the company. Then from the email agent, it assigns it to his employees, which are tools, through a request. So, it sends a request like, “Hey guys, can you do this?” Then sends a response, which is, “Yeah, everything was good.” And then once everything is executed based on what we told it to do, it then gives me the output saying, “Hey, everything was good.” And so on. And we also have a blog agent which in this case wasn’t used but this agent is just used when we tell it to write a blog right and then it goes out to the head of content per se and then head of content assigns it to his employees which are tools through a request and then we get a response right and that’s a whole repetitive loop that happens every single time but this is non-deterministic so what does nondeterministic mean it means that the input can result in different outputs so I can say hey send an email and it will send an email but I can also say send a blog and it will send a blog so it the one input could result in mult multiple different outputs. That’s what nondeterministic means. It’s not determined, right? Uh so that’s what it is. So the first step to this AI agent is the trigger. So the trigger is the first thing that actually starts the automation, starts the the AI agent because there’s a way that there’s a systematic way that we actually talk to the AI agent. It’s like you’re talking to an employee. There has to be an input, right? And this is the input right here. Uh, so if I go on here, which you can find by the way when you go to Telegram, go here, and then you go down to triggers, which is essentially, I don’t know if you guys can see it, but all message right here. So, this is the one we’re going to use to then trigger. So, it says, hey, whenever a message comes, so trigger on message. Whenever a message comes, can you please just um allow it to or can you please just trigger the automation? Can you start the automation? And to connect to your telegram, all you have to do is press here on credential to connect with. This is my account. You can create new credentials. And then to actually connect this, so let me press this here, which talks to the agent from N&N, which gives you like a step-by-step instructions. Uh there’s a process to it. You have to talk to an agent called the botfather, which is Yeah. So create a Telegram account, start a chat with the botfather. So you have to use this link right here. And then you can uh you have to give it a slash something. You have to start a conversation with Yeah. /neubot. And then you can get your API key or your access token which it gives you which then allows you to connect it to your account. So once you connect it to your account, you want to just put trigger on message which allows you to be able to trigger the the actual workflow on the message that you sent it. So let’s say I trigger this. So I go here and I just I can write a text like hey how are you? I can then go inside and see that we got a text saying hey how are you right and this is a text. Now we use a switch node after this because a switch node allows us to differentiate whether the text or whether the message was in audio whether it’s a text because if it’s an audio we have to get the file which because the audio itself turns into a file and then give it to AI to say hey we have an audio can you just turn that into text so we can use it okay because the input here has to be text either way whether it’s an audio whether it’s just text so we want to make sure that we get text in the AI agent in the CEO uh all the time so switch here go inside and then We want to make sure we’re choosing basically a field that only happens whenever we send the audio. So what I mean by that is let’s say we send a text. In this case, this is all the fields that we get, right? Which is this message text. So we know it’s a text because this says text because chat says text. But let’s say I did a voice message. So let me go here and let me rerun it and let me say hello, this is me. Hello. Hello. I can then go here. I can see that it triggered. We can see here that it’s voice. So when we go back here, we’re basically saying, hey, set of rules. There’s two different rules. If it’s an audio, so we know it’s an audio because we know that this variable exists, mime type, and we know it’s a text when text exist, which we had before. So we’re spinning in two different ways. And we’re using again two different variables. The ones here, right? This looks like code, but it actually is just me drag and dropping this one here. Boom. Like this, right? And you will get it there. Uh and then we are spinning into different ways. So if it’s an audio, it goes here. If it’s a text, it will go here and then we’ll send this. So, this right here is just the text of the message and it will send it both ways to the AI agent. So, it’ll route it back and then bring it back to the same place. So, the AI agent always gets text. There’s a few things we have to set up for the main AI agent. The first one is source for prompt which is a user message. Now, the simplest way possible, this is asking us basically what is a thing that you want to feed in to the AI agent. So, there’s two options. The first one is connect uh connected chat notes. Let me zoom in. connected track nodes which is basically saying do you want to connect it to the chat node of nitn which is because nitn has a native chat node so we say no we’re using telegram so we just want to define it below so we’re defining it ourselves and below which in this case is just json text which is the text that we get from telegram whether it’s a voice whether it’s a text we always give it the same thing and then we require specific output format no it doesn’t require any specific output format because it changes and then enable fallback method this says hey since it’s using an AI to actually think. Uh it says if the AI doesn’t work, do you want to set another fallback method? So it uses another AI. Well, in this case, we don’t need to. So we can just leave it there. And now for the most important part of the agent is the system message. So this is the instruction. So let me press this button right here, which basically puts it full screen. And this is the general structure that you would give an AI agent for it to actually work because a prompt is the most important thing. Without a prompting, without you giving instructions to someone, how are they meant to know what to do, right? So we say we give it an overview. So you are the ultimate personal assistant. Your job is to send the users query to the correct tool and these are the different tools. So I state first tool and then second tool and then third tool and then content agent. So this is another tool and then we give it some rules instructions and then final reminder here’s the current date and time. So we always give it the date and time because AI isn’t the best at um at guessing what date of time it is. U I tried running it before I said run a make an event for tomorrow and it made an event for I think 6 months ago. So not the best. Uh and the structure is overall mainly the same. We have the overview which is some context. They have tools. So for the tools itself we have contact agents. So we say use this tool to take uh contact actions. You must use this before sending emails or creating calendar events within attendees. So this is where we go into prompting right which I don’t want to get too deep in but we’re basically saying hey before you use something else use this. So let’s say we say hey can you send an email to James? How does it know James email? Right? So we’re basically saying we’re prompting it saying hey before you send an email before you create a calendar event just go out to the contact database and find the contacts which in this case is in a Google sheet. So that’s what we tell it to do. And then we have the email agent which is use this tool to take action in email. That’s simple. Then we have calendar agent which is basically saying use this tool to take action in the calendar. I also reiterated. So I said hey you must use a contact um agent before using the calendar agent and make sure you pass through the email of the contact to the calendar agent. Now, this only comes from actually testing the agent and making sure that it works. Because sometimes what it was giving me, it was, you know, when I say send the invite to the actual person, it was sending me just the name. So, I said, “Hey, no, that can’t happen. Just send me the email cuz that’s the email is the only thing that we can actually use to send the invite.” Then we have content agents. So, use this tool to generate a blog and return the full text. And then we have rules here. And the rules are basically going towards telling the AI agent some rules that it needs to do. And this is a difference between proactive and reactive prompting. Because reactive prompting is essentially the uh the act of iterating. So it means changing the prompt over time as you’re testing the agent. So you’re testing the agent. You see that the email agent doesn’t work for this reason. You add a rule saying, “Hey, if this works, uh do this.” But you wouldn’t know it didn’t work if you didn’t actually test it. So you always want to do reactive prompting. Test the agent and then add the rules. Uh that’s what you want to do. And then some instructions and then final reminder again. All right, cool. So this is the prompt that we want to use and this is the one that is going to use to then decide which AI agent it’s then going to offload the task to. Now the main AI agent is connected to a chat model. So this is the brain the LLM that I was talking about which in this case we use chat GBT41 mini to connect your OpenAI. You just have to go here create a new credential and then you have to go to the actual platform to openai. So you go here platform.opai.com you log in. So you have to log in and then you have to go to dashboard I believe API keys on the left hand side go here to create a new API key name it so hello test YouTube 19th of August leave this as you project is default and then permissions is all it’s fine create a secret key and then copy this bring it back to N&N and this is the one you’re going to put here so API key let’s do YouTube August 19th You don’t need this uh base URL is fine. All you have to do is just press save and you will see this green check mark here which means that connection was tested successfully. And bear in mind that you need to add credits to OpenAI for it to actually work. Um and I think $5 should do. It’s enough. Uh it’s exactly what I put I think 4 months ago and now it’s still going. Uh so it’s very very cheap. Now the model itself 4.1 mini is actually very very good. Uh some models don’t work for this AI agent like two to actually run the AI agent. For example 40 would not work. Uh so leave this as 4.1 mini which is very fast. Then we have think which is a new node that was added recently which is just used to add that extra person to think. So it does everything and then it consults. It’s like a consultant. It consults with the AI agent saying hey I did all of this. Am I doing it right or is this something that I’m getting wrong? It will think through it and then it will tell if something needs to change. And then simple memories. If I go in here I can see that we have a session ID which will just be the chat ID that we have with the agent. Then we have context window length. This just means how many text messages do you want the AI to actually remember when it gives you the output. Uh because let’s say I say, “Hey, can you send an email to James?” Then it goes out and send the email to James and says, “Hey, we’re done.” And then you say, “Can you actually schedule the calendar event with him as well?” Now, it needs to remember who James was, right? That we actually said James for it to actually do the thing. So, this is basically saying if you put five, it will just say, “Hey, remember the five past conversations that we had with you.” So, that’s what it means. And then here is where the real sauce begins because we have the contact agent, the email agent, calendar agent, the content creation agent. All right. So the first tool here, the first agent that is hooked up with is the contact agent. Uh now this right here again is the head of contacts. What it will do is it will call this tool to take action within the contact database. So we add a description which is what it is and then we say the prompt. So the prompt is what do we tell the agent to do in this case we can define it automatically by the model and then we give it a system message which is exactly what we give it in the main model overview which is you are a contact manager you have tools to take action within the contact database uh the different tools you have is get contacts you use this tool to get contact information like address or phone number and then add or update a contact use this to add a new contact to database or update an existing contact so that’s exactly what it does those instructions allow it to think about what it has to do and choose which tool it needs to send the information to and we also also have a model which is the brain. So in this case the LLM which is also hooked up to the main agent the same. So in case we’re using 41 mini like I mentioned before then we have the tools we have get contact and then we have add or update contacts uh like you saw here in the system message. So if I go here to the first tool we can see that get contacts is hooked up to Google sheets. So the first step you have to do is go here create a new credential and all you have to do is sign in with Google. You can press this button right here which will take you through the main page uh right here with Google which will basically allow you to connect to any account that you want and then you can bring it back. It’s as easy as that. You can bring it back and we’re already connected. So that’s fine. Yes, delete. And then you want to set this automatically because we’re allowing AI to actually set the tool description. Uh so what it actually needs to do and then the resource will be the sheet within the document because there’s a sheet that we’re using which is a context which is this one right here which all the context in this case will be more but these are the ones that we have now. And then we have get rows because that’s the action that we have to do in this case we’re getting contacts from the list. So which sheet are you using? Which uh sorry which document are you using? So which yeah which main sheet are using. So in this case will be contact database USB. And what sheet within the sheet are we using so in this case will be sheet one. And then you want to leave this blank because we want to let the AI figure it out. Now let’s test this. Let me show you exactly what this uh just what this step does. Let me go to Telegram. Let me execute the workflow and say so this case we have James Low. say, “Hey, can you quickly get me James Lowe’s email?” So through text, it will then talk to the main agent. It will think, hey, what agent do I need to use in order for me to do that task. It will think and then it will send it here and then this will then send it here, bring it back, and then give me the output. And it will say, hey, James Lo’s email address is $100 million peanuts. Uh, is there anything else you want me to do? So this right here, just use the agent. So you use this tool right here to do this specific task. So it will think through which agent it will send it to. It will then send it here and then based on what it’s told it will then think through exactly which tool. So which employee is it going to offload the task to in this case the employee will be the get contacts. And the same thing is update a contact. So right here we can update the contact here. Uh we’re going to do the same connection set automatically. Uh this is all the same. The only thing you want to change is you want to map the column mode uh manually because you’re manually mapping each column. And then it says based on because when we tell it can you update or can you change something it needs to know what it needs to change. Sorry we want to match the name to the name in the sheet to make sure that it knows exactly which one is updating and then it’s updating the name which is defined automatically by the model the email or the phone number right based on what it needs to update and I give it a description as well. So this is the name of the person the email and the phone number and leave everything else the same. So these two are called upon when it needs to do the specific task. Now let’s get on to the email agent which is again the same thing same same sort of setup. We have the description so call this tool to take action in email. Uh prompt which would be defined by the model. Then we have system message. So you’re an email assistant. You have tools to take action in email. And then we have different tools. So send get draft uh create a reply create a draft and then get labels uh actually label them. And then we have rules and then final reminder. Uh in this case for the different tools we tell it we give it a small instruction. So in this case, you have to use this to send an email. You use this to get emails. And we give it different rules and different logic. And this all comes from actually testing and making sure that we know exactly what hasn’t worked based on our test. And then what can we add to the prompt to make sure that it works every single time. Uh so that’s what we want there. And this is basically it. So all the same for the different agents. And then it’s hooked up to the opening brain, which again is the same for every single agent. And then it’s hooked up to six different tools. Send email, get emails, email reply, create a draft, get labels, and label emails. So in this case, it’s go to send emails. This will be the one tool that will be used that will be called upon when it needs to send an email. So if I go to credentials right here, all you have to do to connect your Gmail to NN is go to create a new credential. And just as we did for the Google sheet, we just have to sign in with Google. It will take you through this page right here. You can just choose which account you want to use. And that’s the one that will be brought back here and it will be connected automatically. Press delete. Let me go here. So leave this set automatically. The resource will be message because that’s the thing that we’re actually doing. The operation is basically what action are we taking. So we want to send in this case. And it’s asking us who do we send the email to? What’s the subject line? So email type, which is essentially either HTML or text. In this case, we just want to leave it to HTML because if we want to send a blog over email, then we wanted to have headers and all that sort of stuff. And the only way to have headers is to use HTML instead of text. And then it’s asking us what message. So what’s the body of the email? So in this case, we’re allowing the model to actually think through exactly and define who are we sending the email to. So based on so let’s say I say, hey, send the email to James. It will first of all get the contact, find the email and then it’s smart enough to actually think about um what email do we put here? In this case will be the email of the contact that we just mentioned. Subject line is the same. So we’ll think through the context that we give it. In this case, let’s say we we set it to write an email about going out for dinner. The subject line will be created based on that context. And the same thing with message. So let me test this one right here so you get a feel of sort of what it does just on this uh this right here. Let me execute workflow. Let me pull up Telegram. and we can say hey can you send an email to him. So in this case we’re actually testing the memory itself um saying uh you are fired. There you go. So let me execute the workflow. So it will think through what it needs to do. It will then know that it needs to use his email agent to send the email bring it back to telegram. So if I go to my email here, I can see that I sent an email to $100 million peanuts saying you are fired and the subject line was already chosen by the model. So that’s exactly what it does. So based on what it was instructed to do, it will choose which tool it will use. This setup is very much the same as the other tools. So if we go to get many, the connection is the same, set automatically, message the same. In this case, you want to change this from send to get many because you want to get the different emails that we needs to get. Uh return all, just let the AI handle this. it will define whether it needs to return all or just one um or what it needs to return in this case and then the sender. So defined automatically by the model and we also give it a description. So it sort of has the guardrails when he needs to think about uh who is the sender. So in this case it can be a sender’s name or email address when he needs to pull information. And then same thing with email reply. So in this case we have message then we have reply. The message ID will be obviously the message that we previously got that we’re replying to. And then we leave this as HTML just to make the email look pretty if it needs to in case you’re sending a blog. And then the message here will be the body. Turn this off because then we don’t have to see end on the email. Same thing with create a draft. So in this case, instead of message, you can put draft. Create for operations. That’s the actual thing that we’re doing. This is a subject line. So we let it define by the model. So we just press this button right here. Or you can simply add bracket bracket dollar sign from AI and then you put subject. this is the variable that we’re pulling in or you can just do this and then you can leave this as HTML and then message is defined by the model and then whoever sending the email to as a drop is defined by the model as well. Same thing with get labels. We’re just getting labels. So label and get many and return all will be defined by the model and then label emails as well. Um because this right here is a two-step operation because we’re first getting emails to then label the email. In this case, it will be the message add label. Message ID will be the ID of that specific thread of email. And then label names or ids will be the ones that will be pulled in from this right here because before this acts, this one happens before uh cuz it needs to again get labels before using the labels that it was given to then do the thing. Uh then we go to calendar agent. Very similar setup. We have the description, the prompt which is defined by the model. And we go here and we can see that this is a system message. So this is the instructions that we give the AI agent uh in thinking through what he needs to do. Again very very similar setup as the one we have before overview tools and final reminder. Uh and most importantly here we have date and time because again AI is just the worst at thinking through the times and the dates. And now I will think through what he needs to do and then it’s hooked up to five different tools. So we have create an event with attendee. So this is basically creating an event with someone right um which is exactly what I showed you at the start of the video. In order to connect your Google calendar to an endn you have to do is create in your credential. You go here, sign in with Google. It will take you through this page. Choose the account that you want. And this is will be the one that will be connected here. And then you want to put the resources event because it’s an event, right? Uh create because that’s a task that we’re doing. That’s the action that we’re doing. We’re creating something. The calendar will be your calendar. And then it’s going to ask you for the start and end date. So let’s say I tell it to schedule an event for tomorrow at 7:00 p.m. It will choose the start date and it will also choose the end date. So you see how before it chose the 8:00 p.m. 1 hour time frame. I didn’t tell it to. The AI automatically did it. Right? This is what it is. Default reminders if this is on because then Google calendar can choose its own reminders. And then it’s going to ask us who the attendees are. The attendees are basically the people that are going to be invited to that specific event that we’re doing. We’re also giving it a description and the summary as well. All defined by the model itself because it will be smart enough to know that it will give the email, right? And we tell it description as well. And the summary will be defined automatically by the model as well. And then let me actually do this. Let me actually show you just this mode right here. So you can see exactly the flow that it goes through. to just get contact and then do this. Let me go here and let me say, can you create an event for tomorrow? God, my spelling is horrible. Event tomorrow at 6 p.m. and invite him. Yeah, that’s it. Boom. Then I’m waiting for it to do. It will think through what it needs to It will create the event. It will then give me a response. If I go to my Google calendar, I can see that event with James Low was done at 6 p.m. to 7:00 p.m. Again, it was smart enough to think that it’s just a 1 hour slot. But of course, it was given it was given the context. It it wasn’t given a 1 hour thing. So, it will think through exactly what it needs to do. It will just choose the 1 hour and add it there. It will send me the invite as well. That’s cool. And that’s uh what this tool does. And the same setup is for create an event without the attendee. So everything’s the same apart from the fact that we just don’t add any attendees here. Get events is the same. So in this case, uh we’re just changing this to get many. So let’s say we go here to Telegram and we ask it uh let me just execute the workflow. We ask it what events do I have this week. So now we’ll think through what it has to do. It will then think through what it needs to use. It first it will get the events and bring it all back to Telegram. So right here it would tell me that I have the altco workshop this weekend James Low dinner in Rome and workshop again. So this right here is something that I had was it yesterday at 1:00 a.m. Yeah, yesterday 1:00 a.m. So that’s why it’s telling me that it’s from this week as well. And that’s how this tool works. So get an event and then we have deleted events which is again the same. The only thing we have to change is the event and delete calendar will be ours. Then it’s asking us for the event ID. It’s sort of the same as replying to an email because you need to know the email ID first of the one that you’re replying to to then reply. in this case is asking us what is the event ID? What is the event that we’re deleting? And what’s the ID because that’s unique identifier for that specific event. That’s what we need. So we want to define it automatically by the model which again all of these this right here wasn’t before. It wasn’t here before. But now because the models got smarter, we’re able to let AI actually do it and let it handle it. And that’s fine. And then we have update an event which will be same connection set automatically event which will be update in this case. Uh same calendar event ID which is the same as before. you use default reminders and now we give it a start and end date which is the same as before. Uh we’re basically saying hey this is a start and this is the end right of the of the time frame that you want to update. So that right there is for the calendar agent and then we go on to the content creation agent. So in this case we have description. So call this tool to create a blog post. The prompt is automatically decided by the model. It doesn’t require any outputs format the fallback model. We don’t need this and then we just have to use the system message which in this case is you are an expert blog writer. Use the appropriate tool to write a blog post. In this case, the only tool we have is Propexity, which should be used to actually do the research before we actually write the blog post. Um, again, this is exactly what I told it to do. And then some rules are that your blog post should be less than 500 words because we don’t want it to be too big. And also, it can’t send more than 500 words or I mean, I don’t know how much it can send. I don’t know what the limit is, but on Telegram, it can’t send a blog post to back to Telegram with more than X words. So, we’re just cutting it out. And uh, we’re also saying output the whole blog text. And then final reminder, we just give it the date and time in case it needs to know. So that’s right there is the system prompt that we tell the content creation agent to do. Then we actually hook it up to claude. So you see here we use open AAI, open AI, open AAI. Well, the reason why we’re using Claude in this case is because Claude is extensively better at understanding and making content. It’s much better at using words and creating words and creating feelings out of words. That’s like the best way that I like to think about it. So that’s the way you use Claude. If I go here, the way to connect your Claude is create a new credential. And all you have to do is you have to go through anthropic console. So let me go here. anthropic console. You want to log in and then you want to get your API key right here. Create a key. Name it whatever you want. So let’s do test n agent. Add copy the key. This will be the one that you use to actually set back here. Right? And then you’ll save it. So now you connected your cloud. And then you can leave this as claude for set. And now you want to hook up perplexity to do the research for this agent to make the blog post. So the way that we do that is press plus app perplexity tool and then we go here connected. So in this case the way that we connected is go here and then in perplexity we go here we can see that down below to the account we go to API API keys we can create a new key right or you can just copy here the ones you already made and this will be the one that you then copy paste in here API key to connect it set automatically message a model because that’s the thing that we’re doing. Uh, sonar pro is the model that we’re using. Um, you can use any other model. I think this is fine, relatively fast. And then the messages is what is the prompt that we tell the AI to do. So what is the thing that we tell it to research and we’re letting this define it by the model based on the context that we give. And then we’ll leave it as user prompt because the user prompt is essentially your task is to do XYZ and it’s fine. And then we have maximum number of tokens which will be automatically defined by the model which just means that when a blog is very very long and a lot of words come out of it. It’s usually token intensive which means that it takes up a lot of API credits. It’s more expensive right? Uh so we just wanted to uh let the AI handle the maximum number of tokens but we already told it to only do 500 words. So the tokens are already restricted as to how many we’re using them. So that’s fine and that’s the thing that we’re going to use for perplexity. So let’s actually test this because I haven’t tested the content agents. Let me go here. execute workflow. Let me go to Telegram. Can you send me a blog about why the Roman times were the best compared to now some random Okay, so we have here it will then think through what it needs to use. It will then know that it needs to use the content creation agent. It will talk to anthropic then perplexity to do the research. Again, it has different rounds. So it does different types of research and it does take a bit longer than the others just because it is content creation is more uh time intensive. Now it’s going back here. It’s thinking through what it needs to use. It’ll now it will now format it in the right way. So we can send it to Telegram. And if I go here I can see that we have a blog about why Roman times were better than convert. I’m actually interested to see what it says. Why the glory our age phones. Okay. It will probably say some some stuff that um like smartphones are bad for you and whatnot. Uh but yeah, this is the whole blog that we have all automatically within what just a few seconds. Well, I mean like 20 seconds, right? Uh so that’s what we get there. And this is the way that we set up the content creation agent. But essentially what this is again is a multi-step agent. It’s one agent that we talk to through Telegram through an input and an output that has a memory uh right here that has a brain which is the LLM. And then it has different tools. The tools are the things that it calls when it needs to do something. Right? In this case, if it needs to get a contact, it will talk to this tool again, head of department of contacts, head of emails, head of calendar, head of content, and then from there, it actually execute the task, sends a response, and sends it back here and then gives it to us in a in a very clean natural language English way. Right? That’s what it does. So, that right there is a full walkthrough of the AI agent that I built inside of NN that manages my contacts, calendar, emails, and even drops my content. In today’s video, I’m going to show you step by step how I built a self-learning AI agent inside of Nitn that stores long-term memory. It remembers past conversations from tools like Telegram and even improves itself over time by writing new memories to our database. All right, so the first thing I want to do is actually show you the live action of how it works. On the left hand side, we have Telegram because Telegram is sort of like WhatsApp iMessage that you text the AI agent for it to actually do something. On the right hand side here we have uh in the middle we have the AI agent in and right here we have the memory database. So database just stands for a place where you put stuff right in this case is going to be a Google sheet and this is where we’re going to store information for the AI agent to extract over time as it’s giving us answers. So I’m going to say well I mean I like football. My brother’s name is James. I’m from Italy. So, let’s do what sport do I like. In this case, it’s talking to the memory. It extracted all the information and now it tells us that I like to play football. Need some tips to want to talk to about strategies. What the hell, man? Okay, there you go. All right, cool. And we can ask any other questions. So, let’s say I wanted to ask um I also like dogs. So, let me run this first and then let me put the message here and let me press go. This will now this should add it to our database. You should see it right here. User also likes dogs. As you can see, it’s adding information over time about the user so that it comes to a place where you can ask any questions about yourself or whatever it is or even your business or your life in general. And it has context, right? It has a database full of contextualized information of who you are, what you are, and sort of what what it is that you’re about. Um, and different pieces of information like this that it kind of used to give you answers, right? Right? So, it’s much better than just a normal AI agent that has no context to you. All right. So, before I get to explaining the whole AI agent in Niten step by step, I want to go through and show you how this looks like in chat GBT. And you’re probably asking yourself, why is this even relevant? Well, the AI agent that we’re building today is an AI agent that has memory on you and that updates itself over time so that when it gives you answers, it has context. You don’t have to repeat yourself. Now, with Trabt, we can go to our profile. We can go to I believe it’s settings personalization. If you scroll all the way down, you can see here that it has memory. Right now it’s 89% full, which means that the memory of me that it has is 89% full and it goes to 100 and it can’t add more information. And if I go to manage, I can see now that it has different pieces of information right here about me that it extracted or that it got from the conversations that I’ve had with it. Now, this is really, really powerful because it allows it to reference save memories when responding and reference chat history as well, so that every single time you go to try, you don’t have to reexlain who you are, what you’ve done, what your business is, and so on. Uh, but the only caveat to this is that it has a storage, right? And a storage isn’t a crazy amount of information that you can add there. Uh, but it is still good to have when you want to ask JP any questions. So, I wanted to give you this as context when we explain how the AI agent actually works on any. Now I drew up this diagram right here which is the easiest way for me to explain all these concepts because it can get a bit overwhelming with all this database storage extract information XYZ but to put it in a simple way what it is it’s an AI agent that has an input okay so we have an input which is telegram hey can you do XYZ what it does as a first step is that it retrieves the information okay so we have this database right here which is called the memory AI agent which has different rows and all these different rows are pieces of information that has about us and this is what it will use to then give us or use as context to then give us the answer, right? And so that’s what this is right here. And when you hear database, it just means an air table, it means a notion, it means a Google sheet, right? Just so you can store data. Then what it does is that it sends the input plus the retrieved information. So the memory all to the AI agent and what the AI agent does is the follows. It looks at the information that it got and it thinks through itself. Is this something that is worth me adding to the memory database based on the input or is it simply just a question or statement that we just need to answer based on the context that we got. So let’s say I ask it like before I ask it hey what sport do I like to play right it says user like to play sports what it does or user like to play football the input is what sports do I play that’s a question it retrieves all the information from the database well clearly the AI agent knows that this isn’t a new piece of information this is just a question that we can simply answer using the database that we have here so what it does is that it goes straight here and it generates a contextualized answer contextualized just means that it has context in this case the context is the database of memory of right and gives us the answer and then the output is uh the output to the user. So in telegram we get an answer back saying hey or it just gives us the answer right like just like a general chatbot. Now there is that case where we give it information. So we can say hey my mom’s name is Janette or whatever it is we give it here. Now the AI agent will have to classify whether that’s worthy of putting to the memory database. If it is then it adds the new information there right and it goes here. And so what it becomes is like an infinite loop that it goes like round and round and round and it keeps getting smarter and smarter and smarter. That’s why we call it a self-learning AI agent because it self-learns, right? It self-learns based on the questions and and statements and the conversations that we give it. So in Nit right here, essentially how it works is that the first part is the input. Okay? So all these notes that you see are actually quite easy. I’ll take you through exactly what it is. Uh the first step is a telegram trigger. So this trigger right here is able for us to get messages. Right? So when I run this, let me go here. Let me execute workflow execute step. And I can pull up Telegram and let’s say I say my business name is JM Solutions and we help companies be more efficient um in their own workflows using AI and automations. I can press go. What this will now do as you can see it triggered which means that it send the information here for us to start the conversation because a chatbot or an AI agent needs to have an input right like what is the thing that we’re actually processing what is the information that we’re processing and then an output which is giving us the answer back. So right here in the schema version which is the normal person version we can see that the text here is my business jam solutions xyz. So now that we have this part we send it two different ways. So the first way will be to extract the memory from here because you’re always extracting it over and over again right so we have all these pieces of information that we give as context. This is the first step that we do. So we just connect it to the get rows in sheet which means that it gets all the rows from the memory AI agent to Google sheet right here. By the way, to connect your Google sheet, you have to go here, sign in with Google. That’s it. And then we have to do sheet one and leave all the filters alone because in this case, we’re just getting all the rows and then we’re giving it to the AI agent. Now, the only thing about this is, let me just pin this. So, if I pin this, I don’t have to rerun the whole thing again. The only thing about this is that it gives it to us in nine items. Okay, so for those of you who are not familiar with how arrays, iterating, aggregating works, it’s actually quite easy. So as you can see here what this looks like is that this has nine rows. So 1 2 3 4 5 6 7 8 9 right. These nine rows are the ones that we get right. So in logic if we tell to Google sheet hey can you get all the rows it gets nine. The only problem with that is that it then processes each row individually. And that’s not something that we want. We want it all to be in one place as in we get all these pieces of information all the rows and it makes it into sort of like a paragraph that it then gives the AI agent as context. And so to do that to make it into a paragraph or to make it into we call it we to aggregate it right we use the aggregate node. So as you can see here by the diagram we’re basically getting all these nine rows and we’re merging them. So we’re putting all in one place to then give uh to ChibiT as or to the AI agent in this case as context. So we use the aggregate node individual fields because we’re doing individual fields and then the input field name will be the memory because this is the memory. All I did here is I just drag this across right and so if I execute the step what it will now do is that it will take the nine items because before you can see here it’s nine items. I can’t see all of them in the same place. Well, see here we put them all together and now this will be the thing that we give to chat GBT or to the AI agent in order for it to get context before giving us the answer. Right? And that’s all we do. So that’s the first part and that’s what we give as the first input to the AI agent. The second input here is uh the telegram. So all this is is saying hey we can either give you text or we can give you audio messages, right? So if it’s a text we send it here. If it’s an auto message, we send it here. So the switch node, this is basically a node. So like a square that allows us to send the automation two different ways based on something. In this case, the filter or the condition is if this variable exists, which is audio, then we send it one way to extract the audio to make the audio into text and then send it to the AI agent. But if this variable exists, then what we do is we send it to the text way and it just simply goes straight to the AI agent. Now, how do we know what variables to use? Well, in this case, we know that whenever we do an audio, we get this variable. So, let me actually test this and show you exactly what I mean. Just so I’m not waffling. Uh, let me do this. There you go. I can execute the step. Why did not work? Oh, right. Cuz it’s pinned. Let me unpin this. Let me go here. Execute step. Okay. Again, execute step. Never mind. Again, execute step. Let me go here execute workflow. So we’ll now put a new message and let me go to telegram. Let me say let me put it here. Me say um hello hello hello hello. What this will now do is it will send the information from telegram to the switch node. And now you can see that this is green because that was a voice message. So we know it’s a voice message because this variable right here or here or here or here or here, right? These are only present if it’s a voice message. And the same thing with text. This variable is only important when it’s a text message. And so what we do here is we split it out. So we’re saying, hey, if it’s a text, send it here. If it’s an audio, send it here. Now, if it’s an audio, we have to get a file because it is a file. And the file has a file ID. So file get and then the file ID you can find right here. File to then download it to then give it to AI to transcribe the recording. So to connect your OpenAI, you have to go here. You need an API key. You can simply go to platform.opai.com. Go to is it dashboard? Yeah. Go to API keys. Press this button right here. Name it. So nitn test. I think I’ve made like 30,000 of these. Uh and then you can copy the key. And that’s what you bring back to the uh nitan. Important thing here is that this is not free as in you do have to pay, but lucky for you, this is not expensive at all. Um, you can add $5 of credits per your credit card here and just leave it as is this. $5 can last you a long while. Obviously, it depends on how much you use it, but this is like fraction of cents when you run it, so it’s not noticeable. Um, okay. Once you connected your OpenAI, now you can transcribe the recording and audio and the input data field name, which is what is the thing that we’re giving OpenAI to take as audio and turn into text. Well, that’s data because if I test this, I go here. So I put this we can see that the output is data and that is the input on the next node data. We just drag this across and we get this. So now if I execute the step I should be able to see hello hello hello hello. There we go which is the audio that we give telegram. And that’s the first input. The second input is simply text. And we turn this to text JSON message of text because because this is very important because when we send the input here and the input here we want the output of both of these to be similar or to be the exact same named variable. Right? What that means is that the output here is text. So we also want the output here to be text. So instead of message of text because this wouldn’t be present here in the audio, it would have to be something that we can manipulate here. text, right? So now we have both the inputs are basically the same variable but it sends it different ways based on the input that we give it whether it’s a voice message whether it’s a text. Now we have the merge node which merges so all possible combinations. What this does is that it takes this it takes the uh telegram input and now if I execute the step. So let me actually did it work? No it didn’t work. Uh so let me actually start from from scratch here so I can show you exactly what that looks like. execute workflow and let me unpin this go to telegram and I can say what is my brother’s name right now this goes here it extracts all the memory so you see how nine items went through here and only one came out because it it put them all together and now this went this way because it was text and in the merge node what this did is that it merged let’s from the emerged the text from telegram and also the memory. So these two pieces of information are the ones that are going to be directly given to the AI agent to do its own thing. All right, enough of that. That was the boring part. Uh now we get to the fun part which is the actual AI agent. So this is the thing that will think through its answers. It will then call the the Google sheet tool to add memory and uh yeah so the first thing we have to do is actually define the input. So the input in this case will be JSON.ext text. And this is the one right here because this is the one from Telegram. The one from Telegram is the actual thing, the user message because the user sent us a message and that’s the thing that we sent to this here. Now, we have the system message and the system prompt. Now, I’m going to show you at the end of the video how to get the whole system for free. So, don’t worry, you’ll have this whole prompt, but what it actually tells it is an overview, so memory handling, so some rules and stuff, response styles, the context awareness, and basically telling it, hey, you’re getting this memory. basically use the memory tool when you have to add a new memory. Don’t feel forced to use memories only when they add value. And that’s why we’re giving AI sort of that task to to think through is this worth putting in the memory database. If yes, put it. If not, then just answer the question and so on. Um, and then we give it a few rules, right? The example format and even the current date and time because AI is not good at determining date and times. So, we give that as well. So, again, you get the whole prompt for free at the end of the video, so don’t worry. But this right here is really the source of the whole system because the prompt is a thing that really gives the instructions to the AI agent. So if you don’t instruct it well then you won’t get the output that you want. All right. So once this is done we added the system message and the user message. Now we have to connect the chat model. So the chat model is basically the brain. In this case we have to use open AI. Again follow the same process before to connect your OpenAI. I mean if you connected it before you’ll have the same connection here. Uh the model you can use 4.1 Mini. That’s good enough. Then we have the memory which is able to remember the actual conversation on chat. This isn’t this kind of memory. Uh this memory is just for conversations on telegram. And then we have our nice tool right here which is connected to again the same exact database memory AI agent. And the only action it takes is just adding more and more and more and more and more. So you basically just feed it more and more memories more and more sort of details about yourself as context and the memory itself. So the values to send is just a memory and all we do here is just press this button because we’re letting any define what is a thing or how do we want to structure the input for example here I didn’t tell user also likes dogs I told you hey can you also add that I like dogs right and so what it did is that we let AI define what goes in here and AI define that it should put it in this way user also like dogs so that it’s easier for for the actual system to know exactly what I’m talking about right and once this is done we have the tool connected And this is where we actually add the uh the piece of information. So let me run this and I can show you exactly how this looks. Let me go here. In this case, what we can do is we can say I also own a MVA team called Dallas Turtis. Wish that existed. Uh what this did is that now I called the tool. So now I should see here that it says user owns an NBA team called Dallas Tories, right? And that is giving us context for the future things and that’s why we call it self-learning, right? That’s all it is. Self-learning just means that it learns over time. And so that’s the reason why we connect this tool right here to the AI agent given the context as well. And then finally, we connect this to the response of Telegram. So to connect your Telegram account, I didn’t mention this before, but all you have to do is you have to ask the assistant AI uh cuz it has a whole process. So these right here are the steps you have to follow. For the sake of time, I’m not going to connect it now. Um but if you follow these, you’ll be fine. And you just have to press this button right here. And now we can put message, which is what is the thing that we’re manipulating or changing. And the operation, which is what is the action that we’re taking. In this case, it’s sending a message, but you can do a bunch of stuff. And then the chat ID is the ID of the chat, right? Logically, that’s what it is. But the way that Telegram works is that every conversation that you have has an ID attached to it. Right? And so if we get an input from this ID, then we have to give the output to that ID. So logically, if we get an input from this ID, then we have to give back the output to that ID because then it’s in the same conversation. And then the text will be the JSON.output, which is the one here. So I just drag this across. So you can see here it says, got it, bro. I just added you um that you own an NBA team called Dallas. Anything else you want to add or chat about? What the hell, man? There you go. And everything else keep the same. So now when we get the output, this is the message that we come back to Telegram uh to do its own thing. And now you got to see exactly how it works. But this is a very simplistic version of a self-learning agent. I mean, we’re using Google Sheets. Typically, you wouldn’t use Google Sheets. You maybe have an Air Table or even a rag database, right, to store these different pieces of information. Uh but you got to see the the theory, right? The theory behind it, how it actually works, how it functions. So now you can apply this to any kind of other database tool to store information and have that retrieve it every single time that it gives you answers. Hey, I’m about to show you how I built an AI resume screening agent in Anen that allows applicants to put their CVs and apply for a job. What it does is that it then extracts the text from that CV. It then matches the text of that CV to another PDF which contains the requirements of what a good applicant looks like for that specific job. Then it uses an AI agent in order to score the applicant based on the different criterias. Then it sends a confirmation email to the applicant itself before adding it to our notion database. All right, I want to show you the full system first before we go step by step into how it works. Uh just so you can see the output. I want to press execute workflow and this would be the form that the applicant would fill out. All right. So, I just finished the application and also important to know that the job that we’re applying for is an investment banking form or job, right? Um, so bear in mind because the CV is tailored towards that job. I’m going to press submit. What this will now do is it will go to Google Drive. It will upload the resume. It will download the resume to then extract the text. It will then go to this folder right here which contains a document which basically outlines the qualification uh for that specific job before giving it to the AI agent. the text of the qualification plus the text of our CV before scoring it and sending the applicant confirmation email and then adding it to our notion database. So if I go to my email here, I can see that I have thank you for your application. Hi Mikuela, thanks for applying. We received your application and our team will review it shortly. We’ll get back to you soon with the next steps. Best GM solutions. Obviously, we can remove this which is the N10 attribution and I’ll show you exactly how to do that. But just so you know, we got it here. And if I go to my tracker, I should be able to see myself in the high ranking where we have Mike Torti, Mik Torti, email, phone number. Not only that, but we get to see the resume link. We get to see the strength, the weaknesses, the risk factor, the reward factor, which are all different pieces of information. That’s really, really, really important for someone to then go in and see exactly why they got scored eight out of 10. Why are they a high ranking applicant versus a medium or a low ranking applicant? Like what is that thing that differentiates them and gives us data based on that? Okay, so with that said, let’s go step by step into the system and how it works. And if you want the full system for free, make sure to check out the first link down below, which takes you to my free school community right here. Then you go to classroom, go to the templates vault, and then you’ll be able to see the AI ré screening agent. Press this button to download it and then import it into your own account. And if you have no clue how to do that, no worries at all. You can also go here, zoom in, and you will have a tutorial right here. And by the way, if you apply and you get in, you also get access to the AI automations 101 course, which is a comprehensive guide that takes you from a real beginner in AI automation to someone is able to build automations for themselves or for other businesses. All right, so let’s go through this step by step and I’ll walk you through my thought process as I wanted to build this. Um, I basically wanted a system that could process résumés, right? And so when we think of structuring a system, we always think in inputs and outputs, right? If I go here to my miro, which is where I basically map everything out, um the input in this case would be the application, but realistically it would just be the CV, right? Cuz that’s the thing that we’re that we’re going towards. And the output would be really data like results and data on this CV based on job, right? Qualification. So it’s basically saying, hey, we have a CV. How well did it compare to that job? uh from the CV that we have. So they input a CV and the last thing is this which is typically what a HR role is is just simply to look at the applicant are they good enough or are they not good enough. Uh now the next step here is to obviously extract the text. There’s a few steps before but extract text from CV then match against qualification and then we want to use AI agent to score right this is why I do this then we want to send applicant email to be connected this to be connected right here right here and then we get the results and data on a CV based on job clarification which will then be added to our notion database. Cool. This is important because this is how you structure systems like how do we think about doing things like what is that sequential order that we go through when building these automations. Now the CV itself has to be an input coming from somewhere. It can be a Google drive, it can be a Google form, it can be in this case an end to end form, a native form uh where someone can just submit it and just give us the CV which then kicks off the um well you could say the automation, right? And so the first step to this automation is a job application. It’s us actually getting the details. So if I go in here, I can see that we have job application. Please fill out this form right here. Uh we have the full name, the email, the phone number, and then the resume. So the resume is really the thing that we I mean we care about the others as well, right? Because we have to know their name. But the resume is the thing that we actually use to be able to then score the applicant based on the qualifications for that job. And so the way that we do this is make sure that the element type. So this is saying, hey, what is the kind of response format that we want from this field? In this case, it’s a file. It’s a bunch of fields that you can use. But in this case, it’s a file because we want a file from the applicant. Multiple files. This is saying, hey, do we accept multiple files? Honestly, I don’t know why I have this on. I’ll typically have this off because a CV is one uh and we don’t want multiple CVs to them because it’s one applicant. Um, and then the accepted file types you can leave empty to allow all the types of files. So it can be a PNG image, JPG, can be a H EIC, but it could also be a PDF. In this case, uh I would just like a PDF version because that’s the best way that we can use to then be able to extract the text and I guess compare it to the other one. Um and that’s it. So we have a form which looks like this. Full name, email, phone number, and resume. And resume, as you can see, makes you choose a file, and it doesn’t let you choose everything. It only lets you choose the things that are PDFs, which is great. All right, cool. Um, so once this is done, the first part is obviously connecting our Google Drive to Nitn. You have to go right here, create a new credential, and you need a client ID and client secret. For the sake of time, I’m not going to go into this, but you can check out this video up here if you want to um see how you can do that, which will take like 5 minutes. Uh, and then we want to do file upload resume because that is the name of the file that we get. The file name will be the person’s name / CV. And then you could add it to a a folder called résumés or uh new applicant rums. Right? For in this case, the root folder will be no folder. It will be anywhere in the Google Drive. But you could obviously put it in a folder if you want everything organized in one place. After this, uh in order for us to be able to extract the text from the CV, first have to upload it. Then we have to download it. So we’re downloading the file which you can find right here ID and that’s the thing that we use to then download the file using the same connection right and we get the data and this is what we’re able to then pull through to the next node which is extract from file so we’re extracting text from a PDF and fundamentally the reason why we’re doing these steps before adding it to the AI agent is because we can’t give the AI agent two files right which is why we have to download well upload them in this case download them and extract the text right from the PDF and in this case the operation which is what is the action that we’re taking is extract from PDF the input binary field because this is binary when a file is uploaded and is downloaded it’s binary uh that’s just a format and then the data itself is the data right which is this one right here always match this with this as you can see here the output will be text that will then be used right that we have here now once Once this is done, this is the first step when we actually have to extract the text from the CV that we’re getting from the applicant because that’s the first step. The second step is this. So we have this Google uh drive folder and this is where this part comes in, right? Matching against qualifications. So when you have to match a CV against qualifications, you can either add the qualifications or rules in the EI agent or you can simply just have another document which can be as long as you want that will then be used. extract the text from here of course and then we use to match the text of the CV that we then give to the AI agent to then qualify the applicant and give us the results right and so what we do in this step is we have the CV from the applicant we basically turn that into text then we have the initial job which is this one right here from this folder and the reason why we’re doing it in a Google Drive folder is because we can then add more files and we don’t have to change this one right here the prompt here because the prompt will be dynamic based on the um the thing here and we’re downloading it, right? Which is the investment banking interim PDF, which again is the qualifications like what does good look like for this job. We extract the text from here because we’re extracting the text to then have the second pillar because you have the CV and then we have what does good look like for that specific job. And then these two pieces of data because again here will be job description will then be used to send to the AI agent. Okay. And this is where we start to analyze the CV. So again, we get the CV text and then get the job applications, which is what does good look like for that specific job. It then turns that into text. So we have two pieces of text and then add all of that into the AI agent. If I go in here, I can see that the prompt that I have is a user prompt and a system prompt. The first step here is making sure that we have defined below because we want to define exactly what the input is. This is not a chat to the AI agent type agent. And so the user prompt in this case is like what is the information that we give the EI agent for it to actually think through through its system message what it needs to do, right? And so the prompt that we give it is a candidates’s resume which we pull in from the first extract from file which is the text right here. Pull it through and the job description requirements which you get which is one here and you put it here. Right? So we have the candle resume and the job description rs and we turn this on. So require specific output format and I’ll show you exactly why we do that. But the system message is really the thing that matters the most and this is quite extensive. We have the overview. So you’re an expert technical recruiter specializing in XYZ. The output should be in the following exact formats. So we have candidic strength, weaknesses, risk factor, reward factor, overall fit and justification for rating. So these are the different pieces of uh information that we want. from the AI to do. So it’s an extensive analysis of both the CV and the qualification of what it looks to be good for that specific job. And then we give the job description here which again is basically like a double input because we give it also here. Um I don’t think you have to give it in both ways but you can. Now one important thing is that I did tell it to give me the output as candidate strength which is one variable weakness another one risk factor reward factor and overall fit and justification. So, six variables. When we give AI the ability to give us six variables, we want the output to look like this, right? And for the output to look like this, we have to get it in a very, very specific format. And in order for us to get something in a very specific format, we have to make sure that we have a structured output parser. So, this is saying, hey, this is a data that’s unstructured. That’s a block of text, right, which contains weaknesses, strength, XYZ. And then we run it through this right here, this code, which is defined using JSON. And if you’re looking at this and thinking what even is this, it’s actually quite easy. Uh so don’t worry. But what it is, it’s JSON that tells us hey we want the output in description. We want the candidic strength. We want the weaknesses. We want the um the risk factor which is an object explanation which is a string. So these are all different types of variables and we give the explanation of what each one does, right? With the description, description and so on. And so what happens here is that it first talks to his chat model which you connect here. Go to OpenAI and then connect to OpenAI by going to platform.opai.com. You can go to dashboard right here. You can go to API keys. Create a new secret key. Make a key right here. And then you paste that key back into NN right. And then you press save and you connect it. GPT4.1 Mini is great. Once you have this connected, right, this is the thing that it will use to then think through exactly what the rating could be. Yeah, how I would rate the applicant based on the requirements for that job. And so again, we get two different pieces of information here. It then ranks or then rates this. And let me show you exactly what if we don’t have this pin this pin. I believe you can pin this. Okay, cool. Here I can execute step. Please unpin extract text and try again. Okay, I think I have to start from zero. That’s okay. That is okay. That is okay. I will start from zero. Let’s do it. Let me unpin this or let me extract that. Let me go here. Let me put a CV. Just submit this. Put some random email. I just want you to see exactly like what it would look like if we didn’t have this. Plus, when we do have this. So, it’s doing everything that we want. And now the AI agent will all right. So, you can see we got the output. And the output in this case, as you can see, is just a block of text. It’s a block of text that looks like this, which has all the weaknesses, all the strength and so on. So, something like this we can add into a database in notion, right? right or anywhere in Google Sheets, whatever it is that you use in a very structured format with each column. And so what we do is then we add this here, right? We are able to then um make sure the information is in different variables. The next step once we have this once you have the whole rating, weaknesses, strength, XYZ or we go to the next step which is sending an email. So we send a confirmation email. Uh this is a Gmail node. All you have to do is first connect your account. Sign in with Google which will take you to this page. Make sure you have the right account and then bring it back. It’s very very easy. And then we want to do message because that is the thing we’re manipulating. Send because that is the action we’re taking to. So who are we sending the email to? Well, this is something that we get from here. The email subject line. Thank you for application. And then we want to put the body um the text, right? And the way that we do that is through HTML. HTML is just the way that you make your emails look pretty. You could also not use HTML. I think it doesn’t really matter. Okay, we’re not adding any links or anything. Um, and the email is hey, so hey S in this case because S is a the full name. Let me go here for a second. Let me manipulate the uh the full name so you get to see what an actual full name looks like. There we go. Save. And here you get to see that the full name turns into a first name. And the way that we do that is using formulas. So the formula here the way that it works and this might look complex for someone who has never seen uh these type of formulas but it looks like this right and the logic that I go through when I make formulas is the following. So we have the full name which is Mike Torti and a full name ideally. So Mikuel Torti is separated into the first name and the last name and between the first name and the last name there is a a space. So if we split this and this by the presence of a space then we get this we get one then we get two and now if we want to get the first one then we just have to use first to then get the uh the first name. So the way that this works is that we’re saying okay this is the full name because this is the variable. Let’s split this by the presence of a space because this is the space and then let’s get the first one right and it’s actually quite easy once you actually break it down that way. But if you look at this at hand side you think what what the is this? Um but that’s what it means. Say hey Michaela thanks for applying we received your application and our team will review it shortly. We’ll get back to you with the next steps. um as well. We should probably be able to put this right here, which by the way, this stands for break. This is a new line, right? So, we have new lines here. That’s it. And then we have notion. So, the way that notion works is that we set up a workspace so that we have one database. So, this is the same exact database, right? This, this, this, and this. It’s just the way that we look at the database is different. So in here we have a filter which is like hey the low applicants are everybody that has a score less than five. Medium applicants are the ones that have a score more than four and less than seven. And then high ranking applicants have a score more than six. Right? And that’s it. But if I just took the filter out right here you could see that I have the applicant right here. It’s just because we have a filter that we don’t see the applicants. So that we’re able to just basically sort or filter by who are the low applicants, medium and high ranking as well. And then we have applications which shows us the amount of applications that we get over time. Right now you could use a Google Sheets for this. It’s not really a crazy amount of difference. It’s just the fact that we can filter and we can do so much more in notion than we can on Google Sheets. So when we set this up, the first thing you have to do is go in here. You have to make sure that you can create a new credential. I recommend that you ask the AI assistant for what to do here because it is a bit of a longer process, but actually takes 2 minutes. Um, and get the internal um, integration secret. By the way, the alternative of this is Google Sheets, so you can use either and it walks you through everything. Um, yeah. And then once you have that, make a database that has these columns right here. Applicant name, first and last name, email, phone number, application date, resume, strength, weakness, risk factor, reward factor, overall fit, and justification. And these are the fields. So in this case we have a title which is the name, first name which is the first name, last name, last name, email, email, phone and so on. And now we actually forgot to put the date. So we can put the date as now. And the way that that works is it’s asking me for a date. And I know that the the date in any is curly brackets because it’s inside a variable, right? So we have a variable here just like this. Inside we have to do a dollar sign now. And this is the output that we get. Now, ideally, we don’t want it in this output because we still have words. So, we put a format like this. So, we format it in this way, which will then be good to then send it to notion. And then we have the resume, uh, strength and weaknesses, and risk factor, reward factor, overall fit, and justification. So, these are all the fields that will go into notion to then rate the applicant. And that’s how we get everything to here, right? Applications, uh, high ranking, low ranking, and so on. All right, let’s start from zero and I’ll take you through exactly like the the data and so on which I did before but now we go into detail. I want to execute the workflow. I’m going to call this let’s say James low my email still phone number then my CV it’s not really my CV it’s one of my friends. So if you’re looking at this man we’ll break it out to everyone. Uh press submit and then this now goes to the to the Google Drive folder then downloads a file. It extracts the text. Right? Right. So we have the text. It extracts this uh PDF text right right here. It then uses AI then think through its output right here. And now it give me an error. So what was the error? Send email confirmation. Unable to sign in. Oh, okay. Cuz I put the wrong account. There we go. Yeah, I think this works. If I execute step. Yeah, send. And then lastly, we have notion, right? Which adds the applicant James Low should be able to add it to the high ranking James Low. There you go. with everything, even the date right here. As you can see, it’s different from this one because we forgot to add it there. We have the resume link right here. And then we have the strength, weakness, risk factor, reward factor, overall fit, and justification. That’s it. Now, something like this could be very, very beneficial for any kind of business that is hiring new applicants. And there’s so much more that you can do with hiring because stuff like these takes 10, 15 minutes or even 5 minutes for someone to match a CV to someone else or to another um qualification. And if they have hundreds of applicants and that’s hundreds of hours and they have to spend to actually doing this tedious tasks that AI could literally do in seconds and teams literally spend tens of thousands of dollars for people or team members to be able to do those tasks which is insane cuz now AI can actually do them for you. Hey, in this video I’m going to build an email classifier AI agent inside of NIDN that watches for your emails coming through. It then classifies them based on different criterias. It then uses a series of AI agents that will now write back an email which will then be drafted into our inbox. All right, so this right here is the email classifier system. All I have to do is send myself an email. I’m going to go here. So I said, “Hey, question about company. Hey Miklly, I have a quick question. What do you guys do and what is your service?” I’m going to press send. This should now come to this inbox. As you can see, we just got the email question about company. All I have to do here, I’m going to test this. I’m going to press X workflow. This will now get the email that it used. It classified it as a customer support email. It will now generate a draft email that we can find here. If I go to support, I can see that this email right here, question about company, it’s here. And we generated a draft email to that question that we can now double check before sending it to the customer who wrote us the email. And this is the exact same concept when it comes to high priority, promotion, and finance and billing. Right here, we have promotion, priority, and finance and billing. All right. So, let’s build the whole system step by step. As I always say, we shouldn’t build it first. we should map it out first to then have a strategy or an action plan when we build it cuz it makes it so much easier for us. I’m going to go here and for every automation that we do, we have an input and we have an output, right? So in this case, the input would be the email coming through. So watch emails. Then we want to classify the email, right? Cuz we want to have that first before labeling it and before writing a draft email that will then be drafted into our inbox, right? So we have this stuff right here. We have uh label email or was it classify email? Yeah, classify email. And we can classify it based on support. We had what was it? Priority. We then had urgent. No, that was urgent. Was it urgency? Promotion, finance and billing and priority. Yeah. Promotion, finance and billing. Right. So we are taking the new emails that come through from our inbox. We’re then sending it to an AI to classify emails based on whether they are support, priority, promotion, and finance and billing. Then what we’re doing at that point is we are sending it. Let me put it here. We’re sending it to the appropriate AI agent to AI agent to correct AI agent. No, actually no, we should label the email first, right? label the email and then we use AI agent to draft email reply and then we actually draft a reply to inbox. So that’s I think that’s the I think that’s what we want to do. Keep it simple, right? We’re getting an email. We’re classifying it. Then we’re sending it to the appropriate AI agent to do its own thing to label it first. Or you can do the you can do the inverse as well. You can generate a reply and then label it. But I like um it’d be easier to just label it first and then draft it. And then we actually draft a reply to the inbox. I do think though that when the email is urgent, we shouldn’t draft a reply to the inbox. We should send message to team on Telegram. Okay, because the fact that they’re urgent makes it so that we have to notify our team to do its thing to actually go there and and and check it and send it through um or reply themselves, right? In that case. All right, so we’re going to use this when we actually build the system. So, let me go to a new workflow. All right, I have a new workflow right here. I can put email classifier AI agent. And now the way that we start is with the first step. So, the first step is watching your emails. So, I go here and I go to Gmail because that is a provider. If you’re using Outlook, I believe that you can do it. Outlook or message received. Yeah. So, you can do it. Um, but we’re using Gmails because we’re Google folks. And then the first step of the automation is a trigger. So, the trigger is what is a thing that starts automation? Like how do how do we start it? Well, in this case, we only have one trigger, which is a message received, which is basically saying, hey, when we receive a message, in this case, a message is an email, then we start the automation. And the first thing we have to do is connect our account to Naden. All you have to do is create a new credential. You can press sign in with Google. This will take you to this page right here. Choose an account and then bring it back. I already have it connected which will be JM solutions email. And now we are given different options. So we’re given poll times which means do you want to check it every minute? Do you want to check it every hour, every day, every week, every month, every X? Custom. In this case, we can just do we can just leave it leave it blank. And the event itself will be message received, right? Because that is the action that we’re doing. We’re receiving a message and then we’re starting the automation. Simplify just means you want to simplify the data that we get through. And I’ll show you exactly what what that looks like. And that’s it. So, we’re going to need to test this by sending ourselves an email to the inbox of the email that you connected the Gmail with. So, I’m going to go here and send myself an email. Customer uh support question. Hey, what’s your return policy? I’m going to press send. I’m going to go to my inbox. All right. So, we have the email here. Customer support question. And now I can press execute workflow. So, this is now testing the the actual automation because when we build automations, uh even AI agents, I mean everything in general with N, we want to be able to test every single time. So we have this here. This is the data that we got. Hey, what’s your return policy? I believe this is because we put an apostrophe and this is how it um classifies it. I’m going to pin this so that when I go to the next steps, I don’t have to rerun the automation every single time. All right. Now, once this is done, I can go to the next step. So this is green to classify the email based on whether it’s support, priority, promotion, and finance and billing. I’m going to go here, press plus. I’m going to go classify text classifier right here is actually a pretty good feature. I’m not going to lie. Um because we are as in the system is set up so that we give a text which is the snippet which is the actual email and then what we do is we start adding categories. So categories would be maybe support and you put a description of what a support email is. So this is for support emails asking just general questions. Then category you can do priority can do email required attention action typically from key stakeholders clients ASAP immediate deadlines all that stuff. Then we have the next one which is uh promotions we go here promotions and then this will be emails related to marketing campaigns and so on. The description emails related to finance matters such as invoices, billing statements, payment reminders uh or expense reports anything involved transactions and so on. Okay. So again we have the support which is this and I’m going to paste the one that I had before because it is more sophisticated. So emails related to ongoing communication with current clients or including stakeholders including service requests feedback support tickets and inquiries keyword requests in so we give it a few examples of also keywords. Same thing with priority promotions and we have financing and one thing we also have is the system prompt template. We will leave it like this. I think it’s pretty good. Please classify the text provided by the user into one of the following categories. Categories which is the ones up here and use the provided formatting instructions below. Don’t explain and only output the JSON which is perfect. So now if I execute the step a model sub node must be connected. Right? I don’t know why I’m tripping but we have to connect the model to this because it is run by AI. Uh and feel free to choose anything even open AI is fine. In order to connect your OpenAI, make sure to go to platform.openai.com. You can go to the dashboard, go to API keys, make a key right here, and then copy the key and bring it all the way back to and then connect your account pressing it. Once this is done, you’ll have your account connected. You can use 4.1 mini. We have different models as well that we can use. I think 4.1 mini is great. In my previous video, I spoke about how you can use open router, which is the thing that allows us to be able to choose any model that we want without having to make a cloud connection, open connection, everything else. Check it out here. Um, good video. But now we use OpenAI. So now we can execute the step. This should now work. And we can see that these are all the branches that we have. Support, priority, promotions, finance, and billing. and it went down the support branch because the question was hey what’s the return policy? So that is a support question. So as you can see here we have different options right cuz we put different categories and each category represents a path that the automation can go through right priority promotions finance and billing. So what we’re going to do now is we’re going to go to the next steps which is not this this is green labeling the emails right and so if I go to here I can then add the node which is Gmail I believe this is add label to message same connection the resource which is what is the thing that we’re actually manipulating it will be message the action that we’re taking is operation the message ID it’s something that you can actually get down here so this will be uh ID and if that’s not the right one then we’ll change it later but I believe this yeah this is ID and then the label names or IDs you can choose from your inbox right here right now as you can see here I already have the different labels so if you don’t see them here it’s because you didn’t add them here so if I add let’s say test right if I press create now I have test if I go here I should be able to see test. Let me refresh. Actually, it doesn’t show immediately. There you go. Test. Right. So, it’s only because you don’t have them here that it doesn’t show up on NN. So, make sure to add your labels to your emails uh to then be able to see them in your automation so you can add them to the inbox. Cool. So, now this will be the first category which I believe is support. So, support. There we go. You can do label equal support. What we’re going to do now is we’re going to hover over this and we’re going to copy and paste. This will be priority. High priority. Yeah, priority right here. Change the name to priority. Same thing with here promotions and then finance and billing. You could you could put a Gmail label thing every single time, but just to save yourself those few minutes, you can just copy and paste. Here will be promotions. So, this will be promotions and this will be promotions and down here will be finance and billing. Finance and billing. And down here you can put finance and billing. So now in theory when it classifies it, it should classify it and actually label the email on our inbox. So if I pin this, I should actually no, never mind. Let me not pin this. Let me just run this execute workflow. This should now classify as support and this should be labeled as support. So if I go here, the email that we received, customer support question, this is now labeled as support. As you can see, it just changed. So which is good. And now that we know that this works, we can go to the next step which is um using AI to draft an email reply. So in order for us to draft a reply, we can use the AI agent because the thing is we can also connect it to the tool which is draft an email, right? So it does two in one. It drops a reply and also draft it in our inbox. So the first thing I have to do is create a chat model, right? And connect it to our chat model. One hack that we typically do with AI agents, especially when you have five or six is you connect them all to the same tool. You could just duplicate it here. You can just go delete and then choose Open AI. But for it to look less tools and less stuff on the screen, you can just drag it across here. So now this is connected to the chat model. Then we’re going to go inside here. We’re going to name this uh customer support agent. The user message will not be chat to node because we’re not chatting to it in this case. We are just defining it below. And now here I should add the text for the email. Okay. I think we’re missing something. I think we are because if I go here I don’t actually see the text. I see the snippet but the snippet is basically the the cut version of the email. So if the email is longer then it will cut it. It will give us a snippet of it. So all we have to do I think is simplify. Yeah. I’m going to run this again. Uh, I’m going to send myself an email. What’s your policy for returns and what do you guys do as a company? I’m going to press send. As you can see, we have the email right here. Uh, customer support. And now, if I go here to end it in, I can fetch test event. Okay, there we go. So, when I added simplify, it didn’t show me all these things, but we want the text. Like, we want the actual text. Perfect. Let me pin this. If I go here to the AI agent, I can give it the uh email text. and email from. Or maybe I do the opposite. Yeah, I do the opposite. Uh, email from and email text. Gmail trigger the email from. Let’s see if I can just go here from there. We go from and then the email text will be this, right? And this is what we give the AI as a user message because there’s two types of messages or prompts in this case. There is a user and there’s a system. The user in this case is like what is the thing that we’re giving it every single time as in variables that change. Then we have a system message which is simply the instructions, right? So we give it the information on user. We then give it the instructions on system so that it uses the instructions with the the variables that we give it every single time to do the task. And so right here I’m going to paste the prompt that I have made before and go here expression go big and then paste it. And so for the system message I’m going to go full screen. I’m going to say we typically structure our prompts with an overview. Then we have tools and then we have rules. Tools and rules. So overview would be want to say you’re a customer support representative named Kelly. Your job is to respond to customer inquiries in a friendly and professional manner. Then the tools. So what is it? What tool are you connecting to this? Well, in this case, we’re connecting the draft email, right? So if you go here to each Gmail, we can do draft message draft or was it draft? Yeah, draft here. Create the draft. The subject line, I’m going to let it do its thing. Like this basically means let AI define this based on the context that it was given. Then the message as well. let the model define this parameter. This is great for us because we don’t have to give it a variable every single time. We can just press this button which makes it so much easier for us to draft emails and reply things back uh because of this feature as well. And then we’re also doing the email to email two. And the email to will be the email that we get the email from which will be this right here. And also in addition to that we want the thread ID. Now the thread ID makes it so that when we go to let’s say support here. Yeah. You see how it replied on the thread. So the thread just means in the same conversation because the opposite of that could be that we have this just as a reply as a draft on a separate email but it’s not in the same thread. So this allows us to be able to have the same conversation. It’s sort of like a chat ID on on Telegram. Um it’s the same. So we can say uh thread ID and we can find a thread ID. Where can we find it? There we go. Thread ID. This will be the tool that we use that we connect all the tools to cuz again just like we can connect the child model to the same tool. We can also create a draft and email tool and we can connect that to all the AI agents who make the emails. So in this case we have customer support agent with a small G. I don’t know why it’s pissing me off. Um and then we have this is it. So I’m going to test this. I’m going to go execute workflow text to classify. Oh, okay. Okay, gotcha. Because we also have to change this. So if I go here text and then replace this again. Make sure this is not simplify because simplify gives you less variables. Um I want to press execute workflow again. This will not classifies it. It will label it as support and then it will use the AI agent to reply an email or to make a reply. I’ll put subject line. Now, the one thing that I don’t know why it didn’t do is it didn’t call the tool. I know why. Because we didn’t tell what tool it needs to call. So, I’m going to rename this draft email. I’m going to go inside. I’m going to go in the prompt and I’m going to say draft email. Use this to send an email reply to a customer. Always sign off as James from ABC Corp. And the rules is keep the emails concise. That’s it. Keep the email concise. Um I’m going to execute the workflow again so you get to see how it now calls the tool. It’s all prompting, right? Like AI agents are all prompting because if it wasn’t for the prompt, it wouldn’t have called this tool. The text right here, I believe. Yeah. Return policy. What’s return policy? And this is the answer that it gives. A return policy allows customer to do XYZ. All right. Now that we have this, we can now replicate this for pretty much all the other agents. I’m going to copy this. Going to paste this. Going to paste this here. Going to paste this here. The only thing we have to do is that for label priority. Let me actually see if I can change the order. Let me change the order here because I want priority to be first cuz priority goes to a different way. Let me go here and put a space. Paste this. then go back here and then this be the thing here. So I just switched it because I want priority to go to goes first and then support to go second. All right, cool. Now that we have this, we are able to then rename the agents. So the chat model here will be connected to here. This will be connected to here. It looks a bit messy because we need to space it out. So let me space this out a little bit. Let me go here. Chat model will go here. And now I’m going to add this here. Put this down here. It’s also important for you when you build automations for it to actually look clean or structured. Um, so it makes the I guess visual when you’re debugging it and so on a lot better. Um, and so now we have customer support. We can do promotional promotion agent. We can do finance agent. [Music] Let’s hook this up to the same tool, right? Because the only difference really is is the label, right? And then we make a reply, but and we do have to change part of the prompt, right? So, we have to go inside finance and say you are a finance support representative named Kelly to customer increase to finance increase. This will be promotional. So, you are a promotion no support representative to promotional queries. That’s it. And then this one will be priority and the message will be different. So I’m going to paste this. You’re an agent in charge of high priority emails. Your job is to summarize incoming emails and escalate them to the human. And the tool will change, right? So we’re not using the draft email anymore. We’re using Telegram. So in this case tool, we can search for Telegram. Telegram tool. And in order to connect to Telegram here, just follow the step-by-step guide. For the sake of time, I’m not going to be able to show you step by step how to do it. But if you follow these instructions, it’ll be good. And now you’ll have this. So the message is the thing that we’re manipulating. The the operation will be send the message. The chat ID, I don’t think we need it, right? To be honest. Yeah, we don’t need it. And the text itself will be defined by the model. I mean, we do need it, right? But we can define this. We can we can let this be defined or not, right? If I’m wrong, I’ll we’ll fix it. But there we go. Reply markup none. Okay. So, Telegram. And what I’m going to say here is you’re an agent in charge of hyperarities. And the tool you’re going to use is Telegram. Use this email to send the summary of the email once it’s summarized. Look at that. English. Use this email to send the summary of the email once it’s summarized. That’s fine. And now what we can do is test it. to test this right here. I’m going to go here. I’m going to press this little pencil right here, which basically manipulates the data. I can go. Okay, I think we’re cooked here. Received. Where’s the text? Text. There we go. Want to take this out and say, “Hey, there we have a client emergency. We She wants to know or they want to know how much we charge urgent. Well, actually, let’s not put this cuz that’s clearly obvious that it’s urgent, right? I’m going to press save. And now, if I execute workflow, this should send Telegram message, but it didn’t because the chat ID, I believe, was wrong. Chat not found. Okay. So, what we have to do here is this. Yeah. Yeah. Yeah. Okay. Okay. Okay. Cool. Cool. Yeah, cuz the chat ID here isn’t is a number. It’s not it’s not text. So, it doesn’t it doesn’t categorize it as that. Yeah. So, the problem here was that the chat ID it gave it as urgent emails, but the chat ID is numbers. So, that’s wrong. So, what we have to do is we have to use Telegram. Go here Telegram and follow me through here. There’s a clear thought process to why we’re doing it. Uh we’re going to um actually let me go back add another trigger telegram on message received on message un message. Yeah on message I can now go to telegram I mean we can see that the worked right like the email was sent. Um what I’m going to do though is I’m going to execute step. So this is now watching for yeah watching for messages. I want to say hello. Okay, with this here I can now get the chat ID. Okay, so now if I get the chat ID, I can then move this. I can hardcode it right here. So the chat ID can be the same, right? Because it can be in the same exact chat that we have. Um, so let’s try this again. Let me go to execute workflow. And here we should see an email coming through at any time. So hybrid email from authority a client emergency requires XYZ. And we can remove this. So we can remove this message was sent automatically with Nitn. I believe it’s here. Add fields append edit and attribution. We can turn this off. Okay. So we got to see the message was sent successfully. And now let’s try with let’s say finance, right? So let’s say we send ourselves an email. Say hey there. Can you provide us with the billing statement? Um James want to press send. All right. So we got the email billing statement. I can press execute workflow. They should now send it down here. Finance and billing. It should label it. It should make a reply a draft. And then I should see it right here. Finance and billing. Finance and billing. Right here. I can see that we have uh information. Now, one thing that you should be asking yourself here because if you’re not asking yourself this, then I don’t know. Uh this is obviously hallucinating, right? Like let’s be honest, like how how this can’t be accurate because we’re simply using AI which is not trained on any data. And so to mitigate this, what we would have to do is you can add a step right here where we can basically pull in information from a superbase. So you can have superbase back to the store which is trained on all our company’s data and then we can then pull the information and then draft the reply cuz then we have context like the the actual agent doesn’t just hallucinate because obviously this right here we’ll prepare a billing statement and send it to you shortly. This is obviously not true and so this just makes it up and so in real life in actual business you can’t have something like this specifically you would need an extra step here of pulling information from a vector database which is a basically like a Google sheet that’s better which you pull information from before sending it to the client before actually replying to the client because it actually is accurate right at that point. So that right there is a full email classifier AI agent built inside of N8N. In today’s video, I’m going to show you step by step how I built a full AI powered blog generation system inside of Naden that can write highly effective wellressearched blogs by a team of AI agents. All right, so this right here is the system. I’m going to run it from scratch and show you exactly how it works before we uh go step by step and show you how I built it. I’m going to press execute workflow. I’m going to put the post topic. Let’s do AI in finance and let’s do investment bankers. So the post topic for the blog is am finance. Then we do investment bankers. Let me just finance. There you go. And ton of voice will be direct. So these are the three different inputs that we give it. We press submit. What this will now do is it will send the information to the first AI agent which is a new letter expert which basically does research on the topic that we’re doing. Then what we do is we generate an outline using an AI step which will then be split into four different parts because the outline has four different parts of uh of the blog. We’ll have a research agent which is this one right here which will do more research on the actual topic that is written on that first paragraph or first section of the blog uh and second and third and fourth as well. Then what we do here is using the outline which is split up into four different parts. We send it to the research agent which is this one right here which is now doing research on each part of the blog using perplexity and it’s actually writing the snippet for that specific part. Then what we do here is we merge the output from here and here as well. We aggregate them which means we put them all into one place before sending it to the editor AI agent which in this case is an AI agent that will edit the actual newsletter. So that’s that’s going to be the final version and we use cloud here because claude is a better model to write content. Then we use just an AI step to generate a title and then we send the actual newsletter to our inbox. If I go to my inbox and on my inbox I can see that I have generative AI transforming investment bank operations and this is the full blog that we use. And a good thing about this is that it uses it actually references which sources. If you go here to two, it references the source that we’re using, right? Also, you can see down here first, second, third, fourth, fifth, and sixth. And this right here is just a prompting thing. Um, and now you have a fully optimized blog which gives us highly in-depth research from the top sources, from top credible sources that we can use. And a good thing about this is you can have this running daily cuz right now we have a form, but you can replace this with a Google sheet that will have different topics and then a ontime schedule, which means that it will run every week, every day, and so on. And you’ll have a fully optimized blog in your inbox. So with that said, let’s see exactly how this works and let’s go step by step. All right, so let’s go through the first step which is the form input. So we added a form. Again, this can be any kind of input, right? The form is just the easiest because we can just simply execute step and we can have access to this form right here, which is a very very simple form that we just create natively within NN. And for the forms itself on NN, we have the test URL and we have the production URL. Now bear in mind the test URL is just the URL that you use when you’re testing. Okay, hence the name test URL. when you’re going to production, which means that you are turning this on, you’re activating this, that’s when you use the production URL. So, in theory, what this would look like is you wouldn’t have to go inside here and press execute step and run the whole thing. You would just activate it. You would use a production URL, and that’s the thing that you paste into your browser when you’re doing whatever you’re doing, right? As you can see here, this is not activated. So, this is deactivated. Um, so we can’t see it. Then, we have authentication right here. here and authentication can be used to basically add a password between the person that wants to fill out the form and actually filling out the form because if you don’t want anybody or if you don’t want everybody to have access to the form then you want a password. Well, in this case we can just leave it blank um cuz this URL is pretty unique. Then we have the form title in this case newsletter form and then these are the fields. So the fields is what are we asking the user to fill out? In this case, we are asking the post topic which is in text field and a placeholder can be VI and finance. Placeholder just means this, right? So if you execute a step, this is a placeholder which means what is a thing that they see and typically you add this as inspiration for what they could add. Right? Let’s make this a required field actually. Target audience text required field and then tone of voice drop down. So we have three different choices. So we have authorative uh tone, humorous and direct. These are the three different choices. So this will be the input again when we press execute workflow. This will execute the actual workflow. So I can do AI in computer science target audience 50year-old men tone of voice can be authoritative. And then we see here that this is the answer that we get. Okay. And this is the variables that we then pull into the next step. Now I’m going to pin this so I don’t have to rerun it again every single time. The next step we’re doing is we’re setting variables. Now honestly you don’t have to do this. I don’t know why I did this to be honest. Um, you can go without this, but I just wanted to set the variable topic, target audience, and tone of voice for no reason actually. So, we can actually delete this. Uh, but because this is connected to all these, then it makes sense to have this. I typically have this just to have things organized. Um, and basically what this looks like is we’re replicating this these variables to just have topic, target audience, and tone voice. And typically why you do this is because on the form submission, we also get the submitted at form mode, which is extra variables that I don’t want to see. But at the same time, you can go without this because I mean these these fields are only two fields, right? There’s not a crazy amount. Um, but we usually use set variables when we have an input, which is a ton of different variables. I think you use like API or any of these softwares, they give you like a 100 variables and then you basically want to extract the variables that you actually need and that’s where you use a set variable. In this case, it didn’t make much sense of why I used it, but you can still use it cuz we don’t get charged by step, we get charged by execution. Then we have the first AI agent which is a newsletter expert. We can use a tools agent. There’s three different types of agents. OpenAI functions agent which uses OpenAI to just do its thing. Conversations agent so you can talk to it. We leave this as tools agent because we are using tools with the agent. Uh the source prompt which is what is the input that we’re getting. In this case, if I execute the previous nodes, I can see that the input is this. So we give it the prompt user message because every AI agent has two different types of prompts. Okay, it has a user prompt and it has a system prompt also assistant but the main ones are user and system and the user prompt in this case would be what is the variables that we’re feeding into the actual AI agents operates to do its thing and a prompt user message here is what are the variables like newsletter topic tone of voice and target audience which we’re pulling in from here that it uses to actually do its thing right so that’s for the user message and then we have the system message now the system message is a prompt that gives it the instructions, right? The instructions for the thing. It doesn’t actually give it the variables because the variables go in the user message, but we give it the overview, the context, the instructions, the tools that it uses, um, examples as well, input, output, input, output. So, these are assistant prompts because we’re giving it an example here, example here, example here, example here to make it, I guess, to give it more context as to what we want to do. Uh because sometimes AI it’s so creative sometimes that it just spits out what it wants to spit out. So if you give it a few example, it sort of like guides it. It narrows down the the focus that it needs to have when making the blog for you. Um and so this is the full prompt and again at the end of the video I’ll show you exactly how you can get the whole system for free. So don’t worry. Uh but you can also take a screenshot of this and drop it into chatbt and ask it to extract text. Uh that’s what I used to do all the time. And now you have the system message right here and you have the user message. And we can see we ran this before and this is the output that we get. Of course, this is cut. But if I go to JSON, I can see here that this is a full thing. So table of contents. So we are generating table of contents for the newsletter, right? And we’re using perplexity as a tool to do so. Why is because you want to do more research on the actual topic to then give it proper table of contents. And table of contents is like okay, what’s going to be in the actual newsletter? What’s going to be in the blog? Once we have this, let me pin this. Then we go ahead in the next step which is generate an outline. And here we’re not using an AI agent. We’re just using a simple step. Now to connect your OpenAI to NDN, all you have to do is press create a new credential. You can go to platform the openi platform.openai.com. You can go to login, choose your account, and then you want to go to dashboard. Get your API key right here. Press this button. Get a key. you can copy and paste back right here. Bear in mind this is not free as in you still have to pay for this. Um and you pay for this using something called an API credit. Now the API credit is something that you can see where is it billing the left hand side and you will add money here. It is very very cheap. So it will only cost a tenth of a cent when you run this. Um so but make sure you have about $5 cuz that is the recommended amount that we use. All right. Now that we have this, we have connected our OpenAI to end. We can use text because that is a thing that we’re manipulating. The action that we’re taking is messaging a model, which means that it’s sort of like we’re going to chat GBT and we’re typing something to get an answer back. Then we’re using the model 40 mini because it is the um we’re going for like speed and quality, right? And a 40 mini is great. And the prompt is this. Your job is to split out the table of contents into an individual item for each section. I’ll put each section separately in a field called newsletter sections. When doing so, keep in mind that the newsletter target audience is this and the tone of the newsletter is this. So now we’re pulling in the variables from here separables. Here’s a table of contents. So what we’re asking it to do is this. We’re asking it to basically get the table of contents which is a block of text and then output an array. Right? An array I’ll show you exactly what it is. An array is a something right where it contains different items inside that something. So in this case it contains the four different sections. Uh each section has a title and has a description. Title and description. Title and description. Why do we do this? Well you can simply and by the way this whole system you can simply replace by just using one prompt from TGBT to make a blog. But because you want to make it higher quality, right? And go through basically generating an outline and taking each bucket of that outline. What I mean by this is taking each newsletter section and then giving it to AI to do research and then making it more optimized and then making it better, right? And so what we’re doing here is we’re asking it to take this text which is unstructured because it’s a block of text which doesn’t make much sense to us and we can’t really do anything with it and then giving it to AI and saying hey take this block of text that we have here. So this is the input and basically split it out. So I want you to split out an array which is something that has different items in it. And you know it’s an array because typically has a square bracket. Square bracket. Yeah. Square bracket here and here. And inside the square bracket there are a bunch of items which is this and here. And then this and here and this here as well. And same thing with this, right? And so these items are all pretty much the same. And those are the four items which means that there are four table of contents, four different parts of the blog that we want to iterate. We want to split out right each one and then use each one for research. Use each one to write the blog and use each one to make the blog better. So once we have this then we can spit out right. So I mentioned that we let me pin this. If I press this you can see this is now four items. Why is because the array itself is best for us to use when we want to get the array which can be found here. So if I go here new set section this now will split up four different items first, second, third and fourth and that’s exactly what we then feed into our AI agent which is a research agent right here to do more research. So the input of course is a tools agent because you’re using tools. Uh the source prompt is user message which we’ll define below. And then the user message itself which is what are the variables that are going into the AI agent for it to use to do its thing are the section title which is this section description which will be this right here. Where is it? Generate outline. There we go. Description newsletter target audience which should be this right here. The target audience. There we go. And newsletter tone of voice. And so we feed all of this in so that it has context as to what the actual section is, right? And so this being the user message and this is a prompt that we use for the research agent. And so we have an overview which is you are an AI agent responsible for delivering only the final content for a newsletter. Then we have context uh which is all necessary details including the section title, the description, the target audience and the tone will be provided. then the goal and the content must be supported by research and then we give it instructions and this is usually how the the actual prompt goes right we have overview context instructions now in this case we have tools it’s only one tool because we’re connecting this to perplexity to do the research and with that said we have citations examples so we give it examples and SOPs as well and this is a very very good prompt as in it has markdown formatting which is the hashtags which is basically saying hey this heading one, this is heading two and so on. And then it has a bunch of stuff as well. So rules, guidelines, all that stuff that he needs. And from here we start using claude comparison to OpenAI right here because claude because now we’re actually writing content, right? And Claude is the best at content. And to connect your cla account, press create a new credential anthropic console. And then you can go to get an API key. You can go to create an API key. Just name it whatever you want. You get a key that you can then paste back here. Now 3.5 set is one of the best for content. Let me actually search it up. Um, which cloud model is best for content? I believe it’s 3.5 sonnet. I think so. Not cloud cloud. Let’s see. Cloud. Showing you guys the full raw content. Uh, because that’s what it is. Claus Opus 4. Okay. Cloud Opus 4. Do we have that available to us? I don’t think we do. Yeah, we don’t have an API version. So, let’s do API model because not all models are given to us for an API. Um, Cloud 4 generation, Opus 4 and Son of 4 are hybrid models. Opus 4 is the most scalable. Yeah, son of 4. Son of 4 um is designed for speed plus quality as well. And since we don’t have four here, we’re just going to use 3.5. And that’s the thing that it uses as its brain because again an AI agent usually has a brain which in this case is LLM and then it has tools that is connected to which are in this case perplexity the thing that it actually uses to take action. And if you want to build your first AI agent from scratch check out this video up here. Once we do here is we run this what this will now do is it will go through each section one by one. So four different items at the same time. Not at the same time obviously separately. And it does research on each one. And the reason why we’re adding two different inputs is because the first input is the actual research that it does. And the second input is the description. All right. So now we finished the actual research. And bear in mind that each section of the blog will be researched, right? And that’s what this does. So I’m going to pin this so we don’t have to rerun it again cuz it does take a while. Obviously got cut in the video, but I’ve been here for about 4 minutes waiting. Um and now with the merge node what we do here is let me press execute step. This will now get the output of the research agent but it will also get the title and the description. So the merge node is usually combining right two inputs because you have one and two and we’re putting them all together. So you see how it went from here, here, and here to all three right here. And these are four different items, which means that it does it for every single section of the block. All right. Now that we have this, we can then aggregate it because we don’t want to send four items individually to the editor AI agent. We want to send all together, right? Because we have four items. Let’s put them all together. And as you can see by the diagram here, this node right here is to take all the different separate items and put them all together into one paragraph. So let me go here execute step and here we get all the titles and we get all the outputs because again four items for the four outputs in this case for the research agent and that’s why we put individual fields the input field name will be title because it’s title. Same thing with output which is this one right here and that’s what it takes to merge the list. Again merge list just means merge everything together like this. So, we’re able to then feed it into the editor AI agent which will be the thing to actually write the blog, right? To actually put everything together. Um, it will be a tools agent. The prompt will be the list of titles and the list of article content which we get from here and here. So, we’re giving it, let me show you this. We give it this a full user input. So, it’s going to be a big prompt plus we give it a system message as well. So, the system message will have an overview. So, you’re an expert editor specializing in creating and planning content to output a high quality formatted article. You’re given a list of titles and outputs and you will use these to create a newsletter tailored towards the defined target audience. Create a section in the article for each title with a hyperlink source in each section based on the content. So, when I was making this workflow or this AI agent, I thought of the fact that obviously you want to have insight, what’s it called? Hyperlink um yeah, hyperlink um citations. So for example, when you go into the actual word and then when you press that word, it goes directly to the source of that news. And that’s exactly what this is. This is a fancy way, a HTML way of saying, hey, this is the URL that we’re giving. And this is the name of the actual thing that when we press this, it takes us here. And so that’s what it is. And we have the objective as well to create content. Uh we have the citation management. We have the source section. We have the output format. We have a ton of stuff in this prompt right here. And then we want to output a thousandword maximum or else the automation breaks right because there’s a limit. Uh and today’s date is this. Why do we give it to today’s date is because sometimes within the actual blog it needs to sort of site um it says tomorrow, right? Like how does it know what today is? AI is not the best at this. So that’s why we give it the actual date. So now with this prompt right here, I can press execute step. This will now give all of this and these uh this prompt right here to be able to give us a final optimized sort of blog that we can use to send ourselves an email. All right. So, we have the output right here. You see here with all these lines and and P’s and A’s and H2. This is called HTML. HTML is basically the way that we make our text look pretty. You know, when you see emails, when you get emails with headings, you get with colors and beautiful things. That’s all HTML, right? And so we want to do that because of the fact that we want headings, we want a text when you press on it, hyperl, right? You press on it, it goes to the source, all that stuff to make it look pretty and to make it look more formatted. We use HTML. And then we use another AI right here, which is an A step. Again, same connection. Message a model for mini, which is fine. And the prompt is create a title for the incoming newsletter. The tone of the newsletter is authoritative. The target audience is 50-year-old men. And here’s a newsletter. So, we give it the full newsletter. And then we say only output the title in plain uh in plain text, no quotation marks, and capitalize the first letter of each word. Example, is artificial intelligence a friend or foe. So, basically, this is making the title for the newsletter, which we can then feed into the subject line of the email that we’re making. I can press execute step. This now gives us the actual content, which is the title of the blog. quantum computing and AI transforming the future of technology and that’s the thing that we would use to then be able let me pin this to send ourselves an email so in the email section just connect your email and go here and sign in with Google connect your account bring it back and you’re all good and then the thing that we are manipulating is message the action that we’re taking is we’re sending the email that we’re sending it to of course is my personal email the subject line in this case will be the title here right will be this right here content we bring it across here and this is Now the title that we use and then the email type because again Gmail gives us two options whether you do text whether you use HTML. Well, in this case, because we wrote the email in HTML, then we get this, right? We get a full thing, which is the thing that you saw in my email. And then we want to turn the append attribution off, which just means that usually when you send yourself an email, at the end, it will say NN send this or sent by NN, right? We want to take that off. And as well, we want the name of the actual person to be daily newsletter, which is why we add here sender name daily newsletter. All right, we can just test this execute step. What this will now do is it will send us another email. I go here and refresh quantum computing and AI. And this is a newly written email with hyperlink text that I can go here and I can go to the actual source of the research which is amazing. And it has headings. It has more research. And the citations are coming from credible citations, right? Which are great to have. And at the end we have sources as well. here. And now this you can use as a way to keep yourself updated but also to post it on your you can say on WordPress or any of the sites that you make blogs in, right? Because you have a ton of research, a ton of value that you can get because this workflow right here is a series of AI agents. And the reason why we do a series of AI agents is because when you break things down and you actually go in depth into each topic or each section, the quality is is just much better. And so as I mentioned before, you can have a form which is the input which is the thing that what do we feed in to the actual system, but you can also have a Google sheet that you can run through every single row and you can then add a you can say on the schedule right here at the start which runs maybe every day right so every day and then it runs and then it takes the topic from a Google sheet and then it runs through the whole system step by step. Now, within our agency, we’ve implemented these sort of systems, especially with blogs and content into tons of businesses just because of the fact that businesses know they need to make content, yet they don’t have the time. They use AI anyways. So, might as well automate the whole process and save them a ton of time and make it actually valuable and and with actual research and with good prompting so they can actually get results. And so these systems right here are perfect for them because it allows them to have such an efficient process to generate this content that can either be sent to our email that can either be sent to a WordPress. WordPress is just the way that you host your website. You can have blogs on your website, blogs on LinkedIn, blogs on whatever platform you use. Uh that is highly effective, highly researched, well researched, right? Cuz if it is well researched and so this system is great because it saves the company tons of time into making content and we know it’s good because we have good prompting. which companies usually don’t. Hey, in this video I’m going to show you step by step how you can build your own research AI agent inside of Naden. And the best part is that it actually takes less than 5 minutes to set up. So I’m going to show you exactly how it works, how you can set it up, and how you can use it within your automations. So if that sounds like something that you want to learn, let’s dive in. All right, so fundamentally we have an input and we have an output. This is the same exact structure as a normal AI agent and the input could be research XYZ. Then the AI agent has system prompt or instructions. System prompt just means what is the thing that we tell the AI agent to do. Um and it can be hey research this or if this happens then call this or do something else. And the output would be the actual research. Now between the input and the output the AI agent now it’s hooked up to open AI which is basically chat GBT and that’s its brain. That’s how it thinks. And then for its tools, cuz tools are like the things that the AI agent calls that it sends the request to when it wants to get something back. Well, in this case, we’re using perplexity because perplexity is the research LLM. LLM stands for large language model. It’s like Chad GBT, Claude, they’re all LLMs. And this right here is specifically done for research. So I can go to Perplexity here. I can show you that this uh LLM is like Chad GBT. It looks like it, but it’s known for research. So I can say find the latest news on AI. What this will do is that it will get sources. It will start getting all the sources and it’s known for because it’s really good at finding research and it gives you the full breakdown of everything even giving you all the sources that it used for that specific research which is insane cuz it does research over 20 30 40 research papers all within seconds to give you an answer. Something that Chad GBT could do but isn’t meant or prompted to do. And so that’s what we’re going to use to connect to the AI agent in order to do the research. And again, we’re doing it automatically. So, we’re using the API version just like we’re using the API version for OpenAI. So, we’re just creating an AI agent that is hooked up to perplexity to do research and then we get the output. So, if I go to N, I can go to N workflows. All right. So, I’m currently in N10. I can go to create a workflow. As you can see, we have two options. And if you want to watch the video of me building it with AI, check it up here. But we’re going to press add first step. We can go to agent. Just press agent. And this is how you add an AI agent in any. So this is where we start configuring things. And so we’re sending the chat here. This will then send a signal to the AI agent. If I go inside, I can see that the user message, which is what is the thing that’s going inside the AI agent? It will be the chat input, which I’ll show you exactly what it looks like. And then after the user message, we can add an option. We can have a system message. The system message is the instructions. This part right here. And so that’s what we add here. We can say your helpful intelligent assistant that does research. I’m going to give it a better prompt later, but for now we can leave it this. And now, as we mentioned before, we have the chat model, which is what is the brain of this LLM? In this case, it can be openai, which is the one right here. And I can connect OpenAI to my account. The way to do that is to go to platform to openai.com. I can go to dashboard. I can go to API keys. And the API key is sort of like a password that says to an A. You feel free to use my API key for my account in OpenAI. In top right, create a new secret key. and name it. So it can be end. You can create a new secret key. Leave everything as is. No restrictions. And now you have this key that you can paste within any 10 and name it. I can name it Mikuel 15th of October. I can save it. And now I have my account connected. Bear in mind that this is not free. So you have to go to here to profile to billing and add money here. $5 is more than enough because it’s only taking on one/10enth of a cent, right? So, it’s fine. All right. Now that we have this done, we have this connected, we can choose 4.1 mini. This is basically the brain again, how it actually thinks. And now we can connect it to a tool. Now, we also have a memory here. And the memory is usually used when we are using the AI agent sort of like a chatbot like this. We want it to remember the previous conversation or the previous answer or question that we gave it as context for the next steps. Well, in this case, uh we can add it. So we go here I can put simple memory and we have context window length which is how many past interactions does the model receive as context. You can leave five that’s fine. And now for the fun part is perplexity. So this is how we actually do the research. So I can go to perplexity. You can go to perplexity tool right here which is talking to the API of perplexity and generating um responses with citations. I can go in here and we get introduced to this. Now you will not get introduced to this because you will not have an account. All you have to do is press create a new credential. And now you need an API key. So all you have to do is go to Perplexity.AI up here and you want to make an account. Once you make an account, you can go down to account. You can go to API and I believe that you have API keys on the left hand side. Right here you can accept terms and generate a key. I can do nitan research agent test. I can create a key. I can now copy it. and paste it here. I can say Mikuel 15th of October. Put it here. There you go. And press save. And now you should be able to see it here. And you have successfully connected any to perplexity. But as we mentioned before, just like OpenAI, this is not free. So you have to go to API billing. So you would have to buy credits. I think I put $5 on a few months ago and I still have it. $4.17. So it’s very, very cheap. And once you have this now you can actually use the API for tool description we can set automatically operation which is what is the action that we’re doing is messaging a model and you can do custom API call but in this case messaging a model just says hey I’m going to automatically go into perplexity I’m going to automatically type something and get an answer back and now we have the different models I’m going to go to perplexity API models to see the difference each one there you go models so here we have all the models and we have the search models mod which are inherently the models that you just use uh to retrieve information just like a general searching model which is the one that we’re going to use. We have reasoning so more for multi-step tasks and research. So this is really for conducting in-depth research. The only thing about this is that it does take a lot longer than uh something like sonar or sonar pro. So we’re just going to use sonar in this case. I’m going to try both actually. Um but let’s start with soner and then we can put it there. Can go inside and now I can change the model to again soner. We can use sonar pro as well. And now we have the user prompt. So the user prompt is what is the thing that we’re giving perplexity. So the sort of input right that it uses when it’s doing the research. So in this case, if we press this button right here, what this will now do is it will let the model define this parameter. So the AI agent is smart enough so that it decides what goes into perplexity for it to actually do the research for and then giving us the output. So I’m going to press this and we can leave everything as is. All right. Now we have this, I can test it. So I can go here open chat and I can say what is the latest news on why 95% of AI products fail. I can press go. What this should now do is it will talk to the uh perplexity tool and it will talk back to the openi to structure the output for us to get it back on the chat. So we can see we have the research here which is in-depth research. So you can see it’s pretty good research compared to something like chat GBT. The key reasons why 95% of a products fail, poor data quality, lack of business alignment, execution, cost, privacy, hype versus hard work. Uh, and then the 5% of a products that succeed typically is XYZ. So, we get a full report or full answer researched, right, which is actually pretty good. This is the thing that Perplexity is giving us back, right, which is the responses. We can see the prompt tokens, uh, the amount that it took us. So, 0.006, which is very, very cost effective. And in citations, so the citations that he uses, it actually goes to YouTube videos, which is interesting. Who is this? Let’s see. The AI bubble, why 95% of AI products fail, 1.1 million. It’s cool. Um, and we have more search results, right? Which we can then use as citations or as more evidence as well. And the content is what is the actual message back that it gives to the user with all the citations. You can see 247 obviously refers to um citation 2, citation 4, citation 7. So that’s pretty much how you can set up an AI agent uh that can do research. Now I’m going to apply this to a business use case. So let’s say we had a business which had a form on the website which you’re going to make and the form on the website asked someone to add their website, right? So they say, “Hey, what’s your name? What’s your email? What’s your phone number? And what’s your website?” Right? And so what this does is that it takes the details from someone filling up the form on the website and then it uses Plexity to do the research on that website before giving us an answer that we can add to our CRM. So let’s build it. This right here is going to be um the same because it’s pretty much standard. Uh I’m going to change the prompts a little bit, but apart from that it’s fine. And I can do on form submission because we’re making a form and this will be the first step in this case. I can go inside and I can put a name for the form which is website form. By the way, don’t worry about these. Test URL is just the URL that we use when you’re testing. Production we use when we set the automation to active. Authentication is if you want to put a password, but we don’t want to. Uh we have the title and this is please fill out the form with your details. Then we can add form element which is saying hey what are the questions? In this case we can ask them actually full name. Yeah. And we can say company name. We can say uh company website which is the thing that we’ll actually use. I believe that it has date checkboxes. No or email only. Um and that’s it. Right. We can just ask three different questions. Of course, a company would probably want to know what is your budget, what are you looking to to do and so on. But these are three simple questions. So I can execute step and I can say Mike authority company name is jmolutions my website is jmsolutions.com submit. This should now send a signal here with the details that we can then use for the next steps. So I can pin the information which means that now I don’t have to rerun it again every single time that I want to run the automation. And now the only thing that goes into this is not the chat input because you’re not chatting to it anymore. What we’re doing is we can define the user message below and again user message is the thing that we actually give to the agent every single time that is different. In this case it will be the company website and what we can do is actually do company website company name actually and then company website. Company name. There we go. Here company name. And there you go. company name and company website is the thing that goes into the AI agent for it to use when making research of that company. So I’m going to say you are a helpful assistant that helps to do research on new companies that come through. You could say that, right? Assistant. Yeah, you can say that. Uh and then let’s say uh for rules. So I’m going to say we are or actually the the research that we are looking for from the company should contain target audience and let’s do offer. So we want to know the offer of the company and target audience. That’s it. I believe this should work. Uh let’s see if it doesn’t. If it doesn’t, we’ll change the prompt. And now this will be the same. Yeah, this will be the same. Let’s test this out. Let’s go here. Well, actually, no. Yeah, we can’t use the simple memory because the simple memory only works when we using a chat model. So, when we’re chatting to it, like a chatbot. But in this case, we’re not doing it. So, we’re just using um these two. Let me press go execute workflow. You see how I didn’t have to fill out the form every single time. Now, it’s doing research. And then at the end, it gives us James Solutions targets SMBs looking to improve operational efficiency through innovative workflow automation solutions XYZ. Cool. Which now we can add to our CRM. So I can just make a new Google sheet. I can name it say CRM new website leads. I can say company name or full name. There you go. Full name. Company name. Let me zoom in so you can see here. Go X. I can do company website and research. I can make this black, white, bold, and reset to row one like this. I can still see it. Cool. And now I have to connect Google Sheets to any. And to do that, I can go here. I can press plus. I can go to Google Sheets. I can then append a row in a sheet. Append just means you’re adding a row into a sheet. Connect your account by going here. Just press sign in with Google, which will take you to this page. You can press your account that you are connected with and once you’re connected you can go to sheet within a document append a row because that is the action that we’re taking. The document would be CRM new website leads the sheet will be sheet one. Yep. And then the values to send. So this is saying hey what do we want to add here here and here every single time that it runs. We would like to add the full name which you can get on the left hand side on the form. So full name, company name, company website, research, and something more that we want to add is submission date. So submission date because we ideally want to know exactly what date and time they submitted the form. This now refreshes because it saw that I changed something within the sheet. I can then add submitted at right here. But the problem is that if I go if I press this to go full screen, this right here is very messy. And so what I want to do here is actually format it so it’s readable to a normal human who has no clue what t01 all of this stuff is. So what I can do is I can go in here and I can put dot to date format I believe and I can say what is it? Format date format. Yeah. Okay, cool. Let me go into the formatting guide so I can see how to make a date look normal. God, this is horrible. Let me see here. August 6th, 2014. This will be DD. All I have to do here is just put DD. There we go. 16th of October, 2025. And this will be the format that we add the date inside of the Google sheet. So now I can pin this data, which means that I don’t have to rerun this again. I can just press go. What this should now do is she would send the information here to the Google sheet. Mikuela James solutions with the website with the research which it’s very long. Let me make this a bit bigger. Why not go here you can then read about offer and who they’re targeting and submission date as well. So you get to know exactly when they submitted the form. And there there is a use case that you can use the research AI agent for to do research on someone when they come through from the website or some sort of input from somewhere else. And we built this type of system for a company before uh a bit more extensive. So a bit more stuff um but it did research on new leads that came through the website and then it looked at their social media, it looked at their website, it looked at everything that they had to then give it to the sales reps right in their CRM before the sales reps actually called the lead, right? Because they had more information. they were more prepared um before actually going out and selling to customers. In this video, I’m going to show you exactly how I built a voice agent inside of 11 Labs and connected it to Nitn that allows us to be able to send emails, get contacts, and schedule calendar events. All right, so on the left hand side, I have the voice agent in 11 Labs. On the right hand side, I have the AI agent in Nitn. I’m going to press execute workflow, which is now waiting for the voice agent to send information to the AI agent. And I’m going to go and talk to the AI agent here. Hey, my man. How’s it going? What’s up, brother? Um, can we schedule a calendar event for tomorrow at 5:00 p.m. with Michael James and just say that it’s for celebratory meeting? All righty. I’m setting up that celebratory meeting for you with Michael James for tomorrow at 5:00 p.m. Boom. Your celebratory meeting with Michael James is also for tomorrow at 5:00 PM. Is there anything else I can help you with today, you magn? That’s it. Magnificent. What? Magnificent. There we go. So, we have a calendar here and the name celebratory meeting scheduled for this email, which is Michael James, which you can find right here in our database with Michael James in this email as well. There you go. All right. So, we’re going to go through the whole process step by step. The first step is actually going to 11 Labs and seeing how we actually set this up. So, if I go here to the actual homepage, so when you make an account on 11 Labs, you will have this dashboard right here. All you have to go is here and you go to agent platform. So typically you’ll be in the creative platform which is for voices and so on. In this case you want to go to agent platform. Want to press agent new agent right here. When you press a new agent you’ll come on this page right here. And this is where you start adding all the settings. So the first message is what is the first thing that the AI voice agent will say. In this case as you can see by or as you could have heard uh by the voice agent it said hey my man how’s it going? And this is important because it’s the first thing that the AI agent says. Then the assistant prompt in this case is this. So, so we said you’re a friendly and funny personal assistant who loves helping the user with tasks in an upbeat and approachable way. Your role is to assist the user with sending emails and scheduling calendar events. When the user provides details like who the email is for and what it’s about, you will pass the information to any end tool and wait for its response. If the user tells you that he wants to schedule a calendar event, then you will pass the information to the N10 tool and wait for its response. Once you get the confirmation from any that the email has been sent, truthfully let the user know it’s done and ask if there’s anything else you can help with. And I can also add something else here. Once you get confirmation from any that the event was created, truthfully let the user know once it’s done. Now basically the way this works is that we have the voice agent that we speak to sort of like a person and when we give information to the voice agent what that does is that it sends information to our AI agent in any sort of acting as a back end to then do the actual thing that we told it to do and then send back a response right to the actual voice agent saying hey everything is good. It’s sort of like you have the CEO who talks to the head of sales. the sales guy in this case does the action then he goes back to the head of sales saying yeah everything was good and then the head of sales talks to the CEO right the CEO doesn’t actually talk to the um the actual sales guy because there’s a intermediate step there’s a step in between and so this is the exact same thing here between me and N10 it’s 11 laps is me talking to 11 laps which then speaks to the backend system which is N10 and so what we have here again is a prompt dynamic variables leave this blank llm I use Gemini 2.5 five flash cuz it’s pretty cheap plus fast. Uh the backup LM configuration, leave this as default. You can leave this as default. The thinking budget is fine right here. We don’t need to control any internal reasoning tokens. The temperature right here is basically controlling how creative do you want the AI agent to be. The higher the temperature, the more creative it is. The lower the temperature, which means it’s deterministic, so we can determine exactly what it’s going to say. It’s less temperature. Now, for voice agent, you want to be careful with this. You want to make sure that it’s not too creative because then it goes outside of the instructions that you give it. But you also want to make sure that it’s not too deterministic, which means that it’s not too fixed into the instructions because then we’ll have the problem that it starts sounding like a robot. Limit token usage. And so we’re basically predicting or we’re limiting the amount of money, the amount of tokens which equals to money credits uh that we’re using for the LLM. LLM just stands for large language model. is like chat GBT, Claude, Gemini, Grock, all these are LLMs. Then you can also add a agent knowledge base in case you want to add documents that you want the AI agent, in this case the voice agent to have access to when giving you back the answer, which is great. And now for the thing that we really care about is the tools, custom tools. So this is how we connect custom tools to any or how we connect voice agent to any. So if you can just press add a tool, you will get to this page right here. You have to put a name. In this case, you can just put N10. And the description is use this tool to take action upon the user’s request. And then the first thing we’re doing is adding a web hook. Now, for those of you who don’t know what a web hook is, a web hook is a URL, which in this case looks like this, which in any way to set it up is go here, add a trigger, and then a web hook call. So on the web hook call right here. And now this is a thing that is used when we want to receive a signal. So from the voice agent, we say, “Hey, can you do this for me?” It sends all the signal to the automation to actually do it. And that’s what a web hook is used for. Make sure this is post because post is the way that we send information. Get is the way that we get information. By get, I mean get here. Now, I’ve made a full video showing you exactly web hooks, HTTP APIs, all that good stuff. You can check it out up here. But that’s what we use to send information to the actual AI agent inside of N10. Response timeout is how long to wait for the client tool to respond before timing out. The default is 20 seconds. This is great in case your actual workflow, your AI agent inside of N10 has an error and it doesn’t actually send back the information. And so we’re just putting some precautions saying, “Hey, if it doesn’t send back the information, just let the user know. Leave this all as is. Leave headers the same, path parameters the same, query parameters the same. And finally, we have body parameters.” So body parameters are the thing that we say the instructions or the variables that we send to any AI agent for it to actually take action. So in this case there are three things that we have to send over. As you can see by the description I said ask the user to provide the name of the email recipient and what the email is about unless they already provided the information and ask them for the calendar event date and time if they’re looking to schedule an event. Now in terms of properties we have to send different variables to the actual workflow. Why? As you can see here, if I go inside the web hook, which is the thing that we use again to send the data, once we said, “Hey, I want to schedule a calendar event with Michael James, call it celebratory dinner at 5:00 p.m., what it did is that it sent the body parameters.” So, who are we doing the thing for? What is the event description? And what is the calendar event time? And so, these variables are crucial in making sure that the AI agent in N10 understands what it is that we want to do. and as well who are we doing it for or what other variables need to be taken into account when actually doing the actual thing and so in 11 labs we want to start adding properties. So the first property is two which is who the email is going to or who to schedule the event with or for yeah and make this required because we’re going to need this either way and leave this as an imprompt because we’re leaving AI to decide this variable right here. The second one is email content so what the email is about. I made sure that this is not required just because sometimes we want to schedule a calendar event and we don’t need to send the email content. So this is not required. Leave this as LM prompt because it allows us to let AI define this as well. I didn’t mention this but string just means text, right? In this case you can do integer number object array. We just want to keep it simple. This is literally just text that’s going into the web hook. So leave this as is. This is the name of the event for the calendar. Now that I’m thinking of it, this doesn’t have to be required because sometimes we just want to send an email. We don’t want to schedule a calendar event. And then finally, calendar event time, which is what the event time and date is at, which is not required, which is used when we want to schedule a calendar event. And leave the last thing as is. So that right there is just setting up the tool, which is all we really need in order to connect 11 Labs to Nitn. Now, once we have this, let’s go to Nitn and see exactly how it looks. So this right here is the AI agent that we’re using. In case it’s your first time looking at the AI agent inside of Niten, stop this video, watch this video up here where I show you the AI agent fundamentals. Trust me, it will make much more sense once you watch that video. Um, but essentially an AI agent is consisted of an input and an output. In this case, the input can be who are we sending the email to or who are we scheduling the calendar event uh for. Then we have the event description or we have the email content or we have all the different variables that I spoke to you about based on what the user wants to do. Then we have the output which is a message that is sent back to the voice agent saying yeah everything was good. Then we have the AI agent in the middle which is the thing that actually takes action right then we have the brain which in this case it’s open AAI it’s the way it actually thinks and then we have the different tools which is what are the softwares that are connected to the AI agent for it to actually do the thing that it needs to do. So the first thing is a web hook. We want to make sure that this is post because that’s the method that we use on the 11 labs. And when you get the data here, you will see a ton of variables. Honestly, I have no clue what any of them are. But the only thing that you really have to care about is the body. So the body is the actual variables that we get from the voice agent for us to use when we want to actually take action on whatever it is. And so we get in this case to Michael James event description celebratory meeting and calendar event time tomorrow at 5 p.m. And that’s all you need to then send to the AI agent with a user prompt which is usually a message that we give to the AI agent that changes every single time cuz in this case we have the prompt user message and we have the system message. The system message is more so for instructions. So we say hey here’s where you are here’s the instructions just follow this and then here is where we give the variables that change every single time. Now as you can see this is code right here but what this means is the person details so who are we sending the email to which you get from here if I make this smaller two if I drag this across I can see that is JSON.pbody.2 Email content is not something that always shows up depending on what the user wants to do. And calendar event time and event description is something that we add here. Event title and uh calendar event time as well. And so we drag these variables across right here. And again, if you want to add this right here, you would have to run the voice agent and tell it, hey, can you send an email? And that will send an email here. And it will give you this variable because this variable is only available when you want to send an email. And that’s it for the user prompt. So very, very easy. We just give it the variables and now we get onto the system message which is the instructions. Now if you get the full blueprint for free you will be able to have the whole prompt. So don’t worry um or else take a screenshot of this and then put it to chat GBT and tell it to extract the text from the image. But what we’re doing here is we’re using the typical prompt format which is overview. So you’re a friendly witty personal assistant who helps users send emails get contacts and schedule meetings XYZ. Then we give the tools. So the tool name plus the description. It sends an email only when instructed or when email content is provided. So when the variable email content is given and then schedule calendar event and so on and then instructions the rule and finally current date and time. Now the reason why we give the AI current date and time is because AI isn’t the best at guessing or knowing the date and time of today. So with this prompt we’re then able to take action right and the next step we have to do is connect our AI agent to the brain which is in this case is OpenAI. And to connect OpenAI, you have to go to platform.openai.com, log in, make an account, and then go to dashboard. You can go to API keys, go to create a new secret key, name it, get the key, and then bring it back to nan right here, which is basically a password that says, hey, you can use my OpenAI account, and then you press save. Now, leave this as GBT 4.1 Mini is more than good for what we want to do. And then we have the tools. So, we connected this to three different tools. The first tool is Google Sheets to get contacts, which is this right here. Then we have Google Calendar right here to schedule calendar events, which is this right here. And finally, we want to send emails to our Gmail, which is this right here. And so the theory behind this is that if you noticed, I didn’t actually give the voice agent an email. I just gave it a name. And so that’s why we have the step of retrieving the contact email from the Google Sheets here where we have the name and then we have the email. So if I said to the voice agent, hey, can you send an email to Michael James? I instructed the AI agent to know that it has to look at here first to be able to get the email to then take the action, right? And so it will go here. It will say Michael James, Michael James has this email. And this is the email that we’re going to use to be able to schedule the calendar event or send the email to the actual person. And so we go in here to connect your Google Sheets. All you have to do is create your credential, sign in with Google. It will take you to the standard um login with Google page. Once you connected your account, make sure to have sheet within document. You want to get rows, which is the action that we’re taking. Again, get rows just means get all the rows from the actual Google sheet, which is that one right here as mentioned. So, it gets all of them, and then it decides who is who. Then you want to choose the exact Google sheet. Uh, contact database USB. And then the sheet within the Google sheet will be sheet one. And finally, that’s when you get the actual output, which is row number two. The name is Michael James. the name is John Lori, James Low, James Arthur with the emails as well. And based on what the user added as a um sort of input, it will then choose the corresponding email. So if it’s Michael James, he will choose this. If it’s John Lori, it will choose this. If it’s James Low, this James Arthur this. And that’s for the first tool. Then we have schedule calendar event. Again, same exact concept. Go here sign in with Google. So you can connect your calendar tool description set automatically. The resource, which is what is the thing that we’re manipulating. In this case, it will be the event. the operation which is what is the action that we’re taking. We’re creating an event. The calendar will be my calendar and then start and end. We can simply just press these two buttons which basically means that we’re letting the model we’re letting AI define these two parameters. We want to turn this on so that we don’t have to do it manually which is the beauty of AI agents. Then we have two different fields that we want to fill out. The first one is attendees which you can find here attendees and then you simply do the same thing here which is just pressing the AI which in this case the model itself will send the attendee email over right here and then the summary you can pull from the where is it event description over here and that will be the title of the actual meeting and that’s how we get the calendar event to look like this where we have the title and it sends it to the right person and then finally we have the send email so if I go here same exact concept just go here send sign in with Google set automatically the resource that we are manipulating will be a message the action that we’re taking is we’re sending a message the beautiful thing about any AI agents to set up tools is that we literally just have to press three buttons and that’s it so we’re letting AI define who are we sending the email to what is the subject line and what is the message and what we could do here as well is turn this off append attribution so that at the end of the email it doesn’t say this was sent by anything and finally we use a respond to web hook node which responds with the first incoming item, which is this right here. The celebratory meeting with Michael James has been scheduled for tomorrow. If you need me to send an emails or add more details, then let me know. And that will be the thing that’s sent to the actual voice agent in 11 Labs. So, think of this as a boomerang, right? We have the voice agent here. It then goes here and then it brings it back to the voice agent, right? Sort of like again, we’re talking to an employee to the head of department. Employee back to the head of department to the CEO. All right. So, I’m going to test this again. And in this case, let’s do sending an email. And we can send the email to James Arthur. So, right here, I can call the AI agent. Hey, my man. How’s it going? What’s up, brother? Uh, can you send an email to James Arthur? And can you say that we are disappointed in your work? You should have done better in yesterday’s meeting. And that you are almost about to get fired. All right. I am sending that email to James Arthur right away. Oh, there. I found a James Arthur with the email mish.cal5gmail.com. Should I send it to that address? Also, that message is a bit strong. Would you like me to help you rephrase it a little more gently? Nah, you’re good. Just send that email over. Understood. Sending that email now. No holds barred. Oopsie. It seems like there was a little hiccup and I couldn’t send that email. Don’t worry, it’s not you. It’s probably just a glitch with my system. Can you try Can you try again? I’m on it. Let’s try sending that email one more time. Oh, dread. Seems like I’m still having a bit of trouble sending that email. Okay, so there was trouble sending the email. Let’s see why. I thought it was because it needed to confirm, but in this case, let’s let’s go inside here. And we actually did get the email content. So that’s weird. So I think that is within the prompt itself. Uh send an email only when instructed or when email content is provided. M interesting. So in this case, what I would do, I would just test it again. And it might have been a hiccup on the 11 lab side. And by the way, when you go live, you don’t have to execute the workflow every single time. just for testing purposes, we do, which is why when he was trying again, he said there was a hiccup because I had to rerun this again and I didn’t give enough time for me to press run and it actually sending the information. Uh, so let’s test the AI agent again. Hey, my man, how’s it going? Yo, can you send an email to Michael James saying that we have dinner tomorrow at 5:00 p.m. Uh, and just send it through. All right, I’m sending that email right away. Oops. It looks like I need a little more information to send that email to Michael James. Seems I didn’t get the full email content or a clear event title. Could you please tell me exactly what you’d like the email to say? And if you want me to schedule this as a calendar event, what should the event be called? Uh just just name the email. Um the email is about just having dinner tomorrow and it’s to Michael James. And no, we don’t have to schedule any calendar event. Got it. Just the email then. Sending it off to Michael James now. Oh no, it seems like there was a little hiccup. The email didn’t go through. My apologies. It looks like I’m having some trouble connecting right now. Could you perhaps try again in a little bit? Or is there something else I can help you with in the meantime? Yeah, try again. Try again. You got it. Let’s give that email another shot for Michael James. Well, shucks. Seems like I’m still getting a bit confused. All right. So, I think it’s because I don’t have the variable here, which is called email content. So, I’m going to add this there and try again. Hey, my man. How’s it going? Yo, can you send an email to Michael James saying that we have a meeting tomorrow at 5:00 p.m.? All right. I’m sending that email for you. Consider it done. I’ve sent your email to Michael James with a message about the meeting tomorrow at 5. Is there anything else? Great. So, we know why. Now, if I go to my email, I can see that we have the meeting reminder at 5:00 p.m. from JM Solutions, which is the email that I connected to NATO. Now to explain the problem that I just got because you’re going to have a similar problem as well. Uh is that inside the prompt I actually told in the rules that you should only send an email if you actually receive a variable called email content. But here I actually had this deleted and I didn’t have the name for the email content. It was just the actual email content. And so by adding the name it then recognizes that we got this variable which means that now it’s allowed to send an email. So that right there is how you can make a voice agent inside of Lemon Labs and connect it to our AI agent inside of N10. In this video, I’m going to show you how I built a trading analyst AI agent inside of N10. You can chat to it on Telegram and ask it to check any stock. It’ll find the chart, study it with AI, and tell you exactly what it sees, like if it’s going up or down, and how strong it looks. It can even compare two stocks and tell you which one looks better. All right, so the AI agent is divided into two different parts. We have the AI agent here and then we have the tool that we call which is the next workflow which is this one right here which is made to then get this sort of chart analyze it with AI and give us the answer back. All right. So I just turned this on. So it’s now waiting for a message. I can say can you analyze Microsoft then go what this will now do is it will talk to the AI agent which again is prompted with instructions. It then starts calling the tool right here which is this right here. So if I go here to executions, I can see now that this is running. So there’s a current workflow running, which means that it’s giving us the answer and it’s getting it back. And then it’s going to be able to then give us the whole analysis back on Telegram. And now it’s going to give us the actual analysis over here. So overall trend, recent price and action, support and resistance levels, MACD, which in case you don’t know, I also don’t know, and volume analysis, overall market sentiment. So basically a full breakdown of the stock because traders go look at this pretty much every single day, right? They look at this, they look if it’s going up or down. And so this AI will do that for you, saving you that time of doing it yourself. And one more thing that it can do as well is it can compare two different stocks. So I can say here, can you now compare Apple with Microsoft and I can go play. What this will now do is it will send it again to the actual tool. But the only difference now is that it will do it twice. So it will send the first item which in this case it will be either Microsoft or Apple. It then analyzes Microsoft. It will get the graph then we’ll get the graph of Apple and then it will give us the full analysis of both stocks together. As you can see it was smart enough to know that it already sent us the graph for Microsoft. So what it did is it sent us the graph for Apple right here and it then gave us the actual analysis of overall trend recent price MCD volume analysis support and resistance and current market positioning for both Apple and Microsoft. So now you’re able to actually compare each one individually in all the different uh categories right here which are about six and we have the key takeaways as well. And to me this is insane because now we’re able to analyze stocks individually but also compare them and have AI do the whole thing for us. With that said let’s go through step by step exactly how it works and how we set it up. So this right here is a typical structure of an AI agent. Right? We have the input, we have the output. Now in this case the input will be Telegram. So the first step is actually connecting our Telegram account. You can do this by going here, press this button, let AI tell you step by step what you have to do. It’s a longer process than than I would explain in just two minutes. And as you can see right here, this is the output, right? And the output in this case is update ID, message ID, from ID is bot, first name, language, all these things we don’t really have to know. The only two variables that we really care about is chatter ID because this allows us to actually send back a message in the same thread. It’s sort of like you’re having a conversation with, let’s say, your friend. You don’t want to be sending a reply to another guy, right? You want to be sending the reply to the same exact conversation. And so this right here is the conversation. It’s just numbered. And then we have the text. So the text right here is the actual text, right? It’s the actual text of what we ask the AI agent to do. And that’s what it will use to then send to the AI agent which is instructed, it’s prompted to do different things uh to then take action. We connect the input to an AI agent which has a prompt inside. So I’ll go through that in just a second. But the AI agent in this case is connected to a brain which in this case it’s Claude. And to connect your cloud account, you have to go here, go to anthropic.com console, login, go here, create a key, put a name for it. So let’s do N10 add. And then you’ll get this key that you’ll then paste. If you go back here, then choose the model. In this case, we have different models. Cloth 3.5 sonnet is fine. We usually look for uh quality plus speed. But for something like this, I think quality is more important than speed because it is quite a technical sort of topic. So we want to make sure that it actually is good. Then we have the memory. So you connect this right here memory which in this case is just a simple memory tool which is N and it ends memory tool and we give it the context window of five. Now what this means is that it takes the previous five conversations or the previous five messages sent by me which is great because like you saw I told it hey now compare Apple with Microsoft. So it remembered already that we already analyzed Microsoft. So what it has to do now is just analyze Apple. And it’s all because we have this exact uh memory tool. And one more thing that we add here is a chat ID. This is so that it remembers the actual chat that we’re having with the AI agent. And then finally, we have a tool. Now, before I get to the tool, let’s go through the prompt inside here. It will be a tools agent because we’re using tools. Define the find below, which is a user prompt, which is what is the thing that we’re telling the AI agent to do, which in this case, like I mentioned, is the text right here. So, we drag this across. And then we have the system message. So, if I go here, this prompt is quite extensive, as in it’s pretty detailed. And by the way, if you want a full blueprint, I’ll show you at the end how you can get it. And right here, we’re not doing any rocket science. We’re using the exact same prompt structure that I mentioned on my video up here, which is prompting AI agents. And that is using an overview. So, you are an AI agent specializing in XYZ, giving it an identity. Then, we have context. So, things that it needs to know, and then instructions, because it’s important for it to know exactly step by step what to do. Then we have tools. So tools is very important because then it knows what to call what action to take based on what we tell it to do. Then we have examples which is the assistant prompt which means that we give it a few examples so it has some context when it actually does the thing and in this case we give it three examples and then finally SOPs which is pretty much the same as instructions and final notes which are some final things final rules to give it. And so in this prompt, what we basically say is, look, the user is going to ask you for a stock to analyze. What you have to do is just call this tool when you want to analyze any stock. And so this tool right here, what it is, it’s connecting or it’s calling a different workflow inside of any tech, which is the one right here, which I’ll go in in just a second. And so this isn’t a typical AI agent where you just connect a software directly here and it takes action on the same workflow. This is an AI agent that calls a different workflow and then gets a response back just like a boomerang. Now, if I go inside here, the only thing we have to do is name it. So, get chart. And the reason why we added get chart on the prompt is so that it knows that this is the get chart tool. And now that I think of it, I think I called it I think I added a space in the prompt. So, let me go here and edit it. Uh, get chart is fine actually. Get chart. Okay, that’s fine. Make sure that the name of the tool is exactly the same as the name in the prompt. So get chart and then the description which is what does it actually do in this case call this tool to get an analysis of a requested stock. Please return the URL from this tool in marked on formatting for example this URL. And the reason why we ask the image to be in this format it’s so that it can then send it over to us on telegram in a format in a way where it actually makes sense. Then we have the source. So this is saying okay we’re calling this tool which is calling another workflow which in this case is here called anything workflow tool and right here we give it a description of the workflow and then we have source and source and workflow just means what do you want to call in this case we want to call the name of the workflow which we have right here. So to set this up, you have to make a completely new workflow and make sure that you have this node right here which is I believe uh when executed by another workflow which is the one right here and so you’re sending the data and then you’re getting the data back which in this case the from list it will be to technical analyst agent because that is the name of this right here and again I’ll give you the whole blueprint for free so you can just play around with it and so with this done what we get in the technical technical analysis agent. If I go here to executions and I go to the previous one and I can press this button, copy to editor, which will show me exactly the data that I previously mentioned before, we get this. Now, for those of you who are new to the trading world and stocks, it actually isn’t that hard. If I go to Apple stock, I can see that Apple stock isn’t actually called Apple. It’s called AAPL, right? NASDAQ, which is again the boss of all the different stocks in the US. And then we have APL which is in this case called a ticker which is a short version of Apple ink right and so when we want to send it to the actual thing to make the chart and so on we have to give it in a way where it actually understands. So we can’t say Apple ink we have to say AAPL which is why we call them tickers. once we receive the ticker from these AI agent right here. And so what would happen here is that we give it a can you now compare Apple with Microsoft and it will know that now Apple needs to be turned into a ticker which will then be sent here to the tool which will then be sent here which is the actual workflow and which is this and then this will be the thing that we now use to actually make the chart and download it. Now the question you’ve been asking yourself is how do we make charts like these? How does this happen? We have to go to a platform called chart/image.com which is the one right here. chartsimage.com and you want to be able to make an account. So, sign in. And this is completely free. The only caveat to this is that we have a daily limit of 50. So, you can only call this 50 times. The next step you want to do is go to the API documentation, which is just a documentation that says, “Hey, here’s how you can use it.” Right? on the left hand side just understand that the base URL which is a URL that we have to call this is always sort of like a link that you say hey server do this for me this is the start of the link and then to actually be able to call the right exact graph because we have tons of graphs that we can’t call we can get this we can get this we can get all these in this case we have to choose the right one so if I go here to the graph that we want if I go under I can then see something called a curl now a curl is something that we just literally just paste into a HTTP node which is a just a square inside of Nitn that will do everything for us. So all you have to do really is copy this curl right here. Go to Niten and then be able to just add a HTTP request and then all you have to do here is import curl. So you go here, you paste this and you import it and you will have this. And that’s when you start filling things out. Now, if you get the blueprint, you won’t have to set this up, but at least now you know exactly how it works. And right here is where we start adding everything. Now, one thing you have to add is / storage because then it allows us to be able to get this as a URL format and make sure everything’s good. Make sure this is posted so that we send the information of the ticker and then we get something back which in this case is a URL of the actual um stock. And then we have to put the X API key. Again, the API key is something that you can find here. API key generate a new key here and then copy it and then content type. Make sure this is application/json because all in all you just want it to give you the right format right and then finally the thing that matters the most is this right here which is what are we actually telling the the server to do. As you can see here this is the body. We call this the body which is what is the instructions that we tell the actual server to do like what stock are we asking it to to get. In this case, you can see that we have a symbol which is NASDAQ colon ticker which we get from the actual previous steps. Now, as I showed you before, the way that the stock is represented is NASDAQ colon apple, right? Ticker. So, we want to do the exact same thing right here. NASDAQ colon ticker. And so, with that said, what it returns to us is the URL of the actual stock right here, like I’ve showed you. And then finally, you want to put response format JSON because we added up here that we want the content type to be JSON as well. So just make sure you have this and you have this here. So you’re able to get the URL of the actual stock. Once this is done, then we want to be able to download the chart. So download the actual URL because this isn’t publicly available so that OpenAI or AI can actually go inside the image and analyze it. So the next step is just using a simple HTTP request to get the link and download it. Execute the step which looks like this. We get it in a binary format. Binary is just the way that an image or file is represented in the web. Which then goes to the next step which is stock analysis which is an AI. So we choose OpenAI and the way to connect your OpenAI is just by going to platform.AI.com. You can log in. You can go to dashboard on the left hand side. You can go to API keys create a new secret key right here and then put a name and then create the key like we did for claude. Bring it back here. put the API key here and then make sure you choose image which is the thing that we’re actually using and the action that we’re taking is analyzing image the model can be GBT40 that is good enough and then we give it a whole prompt so text input which is telling it hey you’ll be given an image now just assess the image analyze the actual chart based on the candlestick analysis MACD analysis volume support actionable other observations that it then uses based on the binary data data here data data that we give it as an input. So you want to make sure that this is binary. And I remember thinking that binary was such a complex thing, but what it actually is, it’s just literally a way for the web server to represent files. And so what we say here is we say, hey, here’s the input, which isn’t a binary file. And the name of the input is data because that is the name of the variable that we get. So just put data here. And in detail can be auto that’s fine. And now what it does is that it takes the actual stock and then it gives us the output which is this right here which is candlestick analysis. If I go to JSON I can see the whole thing right here. Potential breakout zone. The price is approaching 270. It’s giving us a whole breakdown analysis of that stock which we keep for now. And we go to the next step which is Telegram. And if you have the connection that you made before use the exact same connection. In this case it will be message which is the actual thing that we’re manipulating or changing. The action that we’re taking is send a photo because we’re sending the actual graph. We’re not actually sending the explanation first. And the chatter ID is a thing that I mentioned that we called or that we had right here. Chat ID schema chat ID. This is only a one time thing, right? Because once you copy this here, it will send everything to that specific conversation. So once you copy this from there, you’ll then be able to have the photo URL be sent from here URL which is a thing that makes it look like this in Telegram. And then finally the actual thing that goes back to the AI agent here for it to actually finish is the last step of the workflow which in this case is here which is response. And the response will just be the analysis that we get from uh where is it stock analysis here which is a content right here. And this is the thing that then goes back to the AI agent inside here as an output. And finally, we made the graph. It sent to our channel. It then sent the analysis back to the AI agent. It formatted it in a way where it actually makes sense. And finally, it sent it to Telegram right here with the child ID, which you can get here, chat ID, and the output, which in this case is here, output, and make sure that this is message, and send a message. So, let’s try this out one more time. I can go here. I can say, can you analyze Amazon? And by the way, not all stocks are going to be recognized here, right? Like something like Samsung isn’t part of NASDAQ to my understanding, to my knowledge. Um, and so if you put Samsung or something like that, it will not detect it on the next workflow because it is not part of that subset of stocks. And so make sure that whatever stock you ask it to do is within the category that we added when we asked to make the chart. So now it’s giving us the chart which did it in the other workflow. Then finally here it give us the actual trend. Now I’m going to do something interesting that I haven’t done before. So let me actually execute the workflow again. Let me go here and let me ask it can you now compare Amazon with Apple and with Microsoft. I go here. I’m interested to see what this does. if it remembers this, if it remembers the other one as well and what the output will give us and it seems like it doesn’t actually call the tool because it already analyzed the three of them which is amazing brilliant because now we have the full analysis here so overall trend Amazon Apple Microsoft recent price action MCD analysis so let me say which one should I buy when I go enter let’s see which one tells me that I should buy based on this anal analysis right here. As you can see, we have this here. As an AI assistant, I’m not able to provide specific investment advice or recommendation. Fair enough. Yeah. So, I guess we’ll just have to look at this right here and decide for ourselves. There you go. All right. So, this right here is obviously a very cool use case. Uh, but it should give you ideas for other use cases that you can build, right? And the ability for us to call different tools within our AI agents and then bring it back all in one place. And that’s the beauty of tools within the AI agent because you can talk to it as if it’s a normal human, but it can take actions on different things. And again, it all depends on what tools there are out there, like the image chart tool. Because if it wasn’t for this, we wouldn’t be able to actually do this. Hey, I’m about to build a live Instagram paraset system right in front of you that scripts post from the top AI news Instagram account in the world, rewrites them your tone of voice using AI, and turns them into a stream of content that you can post automatically. All right, so this right here is a system. I can press execute workflow. This will now run the automation. Ideally, we run this every single week. Uh then we scrape the Instagram post from the top AI news account in the world on Instagram using Apify. As we can see here, this is currently running. Then we wait 5 seconds before actually getting all the data and then looping it through. So, we only let 20 posts at a time. In this case here, we’re checking whether it’s actually relevant to our target audience before sending it to the next AI to actually rewrite the post and then adding it all back to our Google sheet database. All right, we can see it just ran successfully. I can go to the Google database. I can see here that we have the username of the account. In this case, it’s the same. The date when the post was posted, the post URL we have here. We can always look back the original post and the rewritten post using our ton of voice, target audience, and so on. So, we have every single week a stream of content ideas. So, we can then post automatically that are repurposed using our tone of voice. So, now let me save this. Let me make a new automation. All right, we start from scratch. And again, the first uh step of always building the automation is not actually building it itself. It’s going on Miro to map things out, to break it down step by step before we actually go out and build it. So, if I go here, I always look at an automation as an input and an output and then in between there’s different steps that we have to just figure it out. Well, the input in this case is I guess someone else’s content because we are doing a parasite system and parasite just means that you that you just steal someone else’s idea and then you just repurpose it for your own uh target audience. In this case, if I wanted to get the latest AI news and I wanted to use Instagram, I have to find an account where they posted the latest AI news and it was the top in the world. So initially what I would do is I would go here and say what is the top AI news Instagram account in the world and then I would get this right here evolving AI. So go here. Let me see what they have. Yeah. So they’re pretty big Reddit users go viral after revealing prom tricks and try to almost feel like cheat. Yeah I think that’s pretty good um sort of new AI news and they’re posting really regularly. I mean this is 4 hours ago 6 hours ago. Okay. So they post like twice a day. Yeah, three times a day. Four times a day. Four times a day. Um, which is great because now we have a lot of news, a lot of content to then repurpose. So the input is this. So we’re going to put input uh in this case post from evolving AI. That’s for Instagram. We put a note here Instagram IG. Now the next step after this is actually extracting the text from the post. So this is called scraping. We want to go here to let’s say this post right here every single week and we want to take this whole text and this is what we’re going to use to then repurpose which means that we’re going to change the tone of voice but the message is the same. So the overall information is the same and we’re going to make it our own content. So the next step here is scraping post text. Now for us to actually scrape the post text from Instagram we would use a platform called Apify. So, Apify is I mean the way that I have it represented is just the Amazon for scrapers. The Amazon for all of these things that a smart dude in the world created using code. Uh but of course we’re not using any code. We’re just using it automatically using our no code platform end to end. Um so if I go to go to console, you have to make an account and you go to API store on the bottom you get to see that you have usage which is $5 because API actually gives you $5 for free every single month that you can use. And so let’s go to an example here. We can see this is in the back example. Let me go here. Yeah, that we have the scraper. So this is the thing that we use to actually scrape. And I’ll I mean if this looks complicated, don’t worry. I’ll break it down. And we have to use $150 or we have to pay $150 for,000 leads. So, if we get $5 for free and we have to pay 150 4,000 leads and this changes every single scraper depends on what they are, then do the math there and it should be around 4,000 leads if I’m right. The math dudes in the comments, let me know. But that’s how much you have to pay. So, ideally, what I would do is I would go to the API store. Again, it’s like you’re looking for a product on Amazon and the product that I want is a product that is able to scrape IG posts. Okay? So, I want to split scrape uh or let’s just do Instagram post scraper. And we have two options. Instagram post scraper and aify. Instagram post scraper. So, aify is the actual platform name. So, typically I would go for something that’s aify based because again it’s a platform. 50,000. I think that’s pretty good. And $2.70,000 post. That’s a bit steep, but I think it’s fine. Uh I mean, we’re not going to scrape a,000 post. I think we’re going to do maybe 50 a week. So, it’s basically free because we get $5 a month. And this is what the the sort of UI looks like. So, on the top we have the name of the scraper. Then we have the description. Then we have the input. So, there’s two different ways that you can run the scraper that you can actually use this. You can either go in the platform and run it here. So, run the um start the actual scraper or you can use the JSON, you can connect API to end and then be able to run it automatically within the no code platform. And if that made no sense to you, no worries. I’ll explain exactly what it is step by step, so don’t worry. Um, but we can see here that the inputs are uh, well, there’s really only one. There’s one input, which is either an Instagram username, a profile URL, or a post URL. So, if I go to what was it? Evolve AI, I think. Yeah, there we go. Evolving AI. If I go here on the top is a URL, and this is the post URL or the profile URL that I get to paste here, right? And this is the I mean the thing I already had pasted but it’s the input that we have that we give API saying hey here’s a profile URL just scrape these posts on this time frame this many posts for this many post in this time frame it says extract post that are newer than date so the input that has to go here is the URL of the of the actual account which you can change with your own URLs if you want then the number of posts that we make or that we scrape and then we scrape um we’re only scraping the posts that are newer than this date right here. So again, you can run this. If I press start, what this will basically do is it will now say it’s running right here. And over time, it will start giving me results. So results are just basically here. Here’s the output. As you can see here, the actor is getting your data. All right. So we’re already seeing some outputs come up. These are the different uh text posts that we ideally want to be able to then repurpose using our tone voice. We’ll name the post URL, which comes from here. So this is the text that it extracted and we get a bunch of them, which is great. All right. So I mean ideally you would have to run this. Let me abort which means that you stop the automation. Well it doesn’t really mean that in real life but in the automation context it is but now we stop the scraper and we said hey stop scraping but now we have the different text post that we would like to use. So we know this works cuz we get the output. So all right cool scraping IG post using Apify. And then the next step would be using AI to check if it’s relevant cuz it’s great that we get all this AI news, but are they actually relevant to who we’re targeting and who our audience is? Um, so in this case, we use AI. Well, we can say chat GBT, but I think that’s fine. And then we ideally want to rewrite the post using our tone of voice. and then we would add it to a Google sheet. Now, this right here, this automation, we ideally want to run it every single week. So, the first step actually is run automation weekly on a Monday. So, we have fresh new ideas that we can post. So, run automation weekly on a Monday. Post uh from involving AI, which is an account on Instagram. Scrape IG post using API. Use AI to check if it’s relevant. Uh and then we rewrite the post using our tone of voice and add it to the Google sheet. So in this case the output is a Google sheet full of content. All right we can get to building now. All right let’s go to end and the first step that we have to do is let me just do a trigger manually which means that just to test but later on we’re going to replace this with a on schedule which we run every single week. Uh so we do trigger manually right here. So the first step is to scrape IG post using API. So how do we do this? Well, we have to connect API to end. I can go here to API and I have this node and I can now run an actor because again these are all different actors that we have within the actual platform. This is an actor. So I can run an actor and then in order for us to connect API, we have to go to create a new credential. We have to go to API key. I believe that the API key you can find on settings. Yeah, API integrations and then you can copy this right here. If not, you have to create a new token and I think when you’re new to API uh then you paste it right here. Let’s do 100 million connection and press save and we’re good to go. Then the resource is actor because we’re running an actor. The operation so what is the action that we’re doing in this case is running an actor and then the actor source recently used actors is fine. Now, one important thing here is that if you go to the actors, so again went to Instagram, we can also go to runs because we already run this already. Apify, Instagram. Yeah, this one right here. Aify Instagram post scraper. In order for us to see it here, in order for us to have it in our list of scrapers, we already have to run this in a platform. So, if you don’t see it here, it’s because you need to press start and save and it will start the automation. It will start the actual actor. You have to run it once in order for then for you to see it right here, which in this case is uh Instagram post scraper aify Instagram post scraper. Cool. So now it’s asking us for the input JSON. So the input JSON is essentially what is the thing that we’re feeding to the scraper saying, hey, do this and then give us the data back. Well, in this case, we can either do it manually or we can use JSON like I mentioned. So for us to use JSON, all we have to do is copy this whole thing and we delete this and paste it right here. So I’m basically saying, hey, I’m running it automatically. I’m using the JSON that we have to use. And that’s it. And now what we’re going to do is we’re going to be changing the date. So first I’m going to run this just to get some test data. You can wait for finish. This means that we’re waiting for the scraper to be done. Let me execute step. We go here. I can see that on the runs now this is running. This is starting the scroller which means that it’s starting to scrape. But what I was thinking here is because this is saying, hey, only get the post newer than this date. We want the date to be dynamic. We want it to be the date that we’re running it minus 7 days from the last week. So we only want to run post from the last seven week. Are we finished? Yeah. Yeah. Yeah. Yeah. Cool. Okay. So we got the data. In this case, we didn’t actually get the post, but we got something called a default data set ID. Now, Apify, the way it works is that we run the actor, and then we don’t actually get the post there. We have to give it to another node in API which is called the get data set items. Yeah, right here. And this node right here will be the one with the same connection that we then do a data set get items and paste the data set ID that we have from here which in this case we can get from here default data set ID. So drag it across. This will be the thing that we use to then extract the data. So if I remove the limit, I think you can remove it. Yeah. Yeah. I can pin this, which means I don’t have to rerun this again in order to to do the whole thing. I can now execute the step and this will now give me the post. So the caption for all the different items that we have and this is a long long list. Uh yeah, we can see it in schema, we can see it in JSON, in table as well. All right, now that we got the data, now we can move on to the next steps. And by the way, all we did is run this run the actor sent it here to then get the data. So all the different post text that we want for the next steps and that’s it. Uh let me go here to mro. This right here is good. This right here is also good. And now we have to use AI to check if it’s actually relevant. So the next step right here is to add another node. In this case is an AI step. We’re not using an AI agent. We’re using an AI step which in this case I think OpenAI is I think pretty good at this. We can now message a model. In order to connect your OpenAI, you have to create a new credential. You have to go to platform.openai.com. You have to go to dashboard. Go to API keys. Make a new secret key. Name it whatever you want. You will have a code. And you will then paste back here as an API key and press save. Now bear in mind this is not free. Like all of this is not free. You have to pay for API tokens which you can find in your profile billing and then put some money here. I think $5 is more than enough. It I mean it lasted me 6 months so I think it will last you hopefully. um unless you’re completely bombarded with with different scrapers but that should be fine. Now once you have this connected the resource is text the operation so what is the action that we’re doing in this case it’s message a model the model that we want to use is mini 4.1 mini because I’m going for quality and speed which is fine so again for prompt we have a system prompt which is you are a helpful intelligent xyz assistant and paste this I go here full screen you can see the whole prompt you’re helpful intelligent precise Instagram post classifier for an AI focused audience people who build with or want to learn AI uh understand cool news that come out of it and that actually strike and have an interesting take. I think this is a pretty good overall. I mean, you would have to change this with your audience and who you’re targeting. Um, and then for the second message, we use a user message. For the user message, I’m going to paste this. If I go here, zoom in, I can say, hey, classify the Instagram post for an automation focused audience. Return only verdict relevant or not relevant. It’s relevant if it’s something interesting news on AI that come up. not relevant if it’s a motivational, personal, non motivation, coding, crypto, politics, finance, or tool discounts or vague hype with no build/impact. And then we want to output this as JSON. Now, what why do we use JSON here is because we only want the output to be either one of these items. We wanted to say relevant or not relevant, right? And we toggle this on. Output content is JSON because then we’re basically saying, hey, I told you to do is JSON. Now, I’m telling the system that the only output that it can do is JSON. That’s fine. Uh now we have to write the actual data that we’re giving the um the AI which in this case is the caption. If I go here I’m basically saying hey here is the Instagram post to analyze. It gave me an output but it’s because I ran it when I shouldn’t have run it. Uh and now I can drag this across [Music] and have this as a caption. So the caption is basically the text of the post. Let me execute this step again. So this is now running. And now it should give me like an accurate answer as well. And let me rename this while it classify God. Classify relevance. Rename. Did it run? No, I didn’t run. Cuz I renamed it. All right. Well, now it’s running. And I actually forgot to put one step in the middle because ideally we’re doing 20 items now because in here we’re telling it, hey, only get 20 items. And we can put this to 100. Whatever it is. Let’s put it to 100 cuz that’s more realistic. Um I mean they post four times a day. What is it? Four times a day. Let’s do 30 actually. Or 50. Let’s do 50. Yeah, we don’t want to send all 50 here. Maybe we want to send 20 at a time. And now we can see that we start to get the different outputs. So not relevant, not relevant, relevant, not relevant, relevant, not relevant, not relevant, relevant. So it’s good because it’s not giving us all the information that’s relevant. It’s only uh filtering out the ones that we actually care about based on our audience. So in order for us to actually not send 20 at a time and we can do we can batch it. So instead of because I put 50 here when we run this now it will give us 50 posts. I don’t want to send all 50 post through. I want to basically loop over it. So which means that we send only 20 through. Then at the end of the automation we bring it all back and we do another 20 and do another 10 until it’s finished. So in order to do that we have to use the loop robot items. This is saying, so we connect this to this. By the way, you can delete this and delete this. You’re basically saying, hey, after this, loop over only 20 items. So, I only want to send 20 posts through at a time. And the next step is here. And then at the end, the last step of the automation, we bring it all back to here. So, it takes the ones that are remaining. Now, one thing I also forgot to put here is the date. So, if I go here inside, so now I can manipulate the data. So here um ideally it’s telling us hey this post have to be newer than a date. Well in this case I want it to be the date that is running minus 7 days. The way to do that is to put square brackets put now I believe dot minus 7. Let’s see if I got this right. days. No it’s giving us the actual text. We don’t want that. So in this case what I would do well actually I can do format. I think that works. Yeah I think that works. So we’re formatting the date. I mean first of all we’re minusing. So now now is today then we’re removing or we’re subtracting 7 days from now. So last week the past week and we’re formatting it as y mm dd which uppers this as this. So let’s try this out. I mean could or could not work. So we’ll see. We only the only way to know is to actually test. So, let me unpin this and let me execute the step. Okay, cool. It worked. Cuz if it didn’t work, it would give us an error. Perfect. Okay, cool. All right, we know this works. Let me stop the automation and let me uh yeah, pin this. It’s fine. And now, after we classify the relevance, which in this case, this step. Now, we want to be able to rewrite the post using our tone of voice. So, first step before we even go there, we have to set different variables because I want to extract the variables that I actually care about from the data set items because there’s so many variables. I mean this overwhelms me. Ideally I want to get um the like count, comment count, views count and some other stuff as well. So in order to do that I can go to edit fields. I can then go to I think I have to run this. Yeah, I think I have to run this. Maybe not. Let me try this. There we go. Little hack. Um, and now I can put the comment count. Let me actually one quick hack. Instead of you putting the name, you can just drag it across and it’ll put the name itself. And then I think it’s like views if I’m not mistaken. View. Yeah, video view count. Put it here. And then I think it’s likes likes count. And then I think that is pretty much it. So likes count, comment count, views count, and a full text. and date posted. Yeah. So, full text and date posted. The full text in this case will be the caption and the date posted will be the time stamp here. Yeah, this one. I think it should be this one. Yeah. Yeah, it is this one. But I don’t want it in this way. So, later on, we’re going to change it. But it’s fine. So, for now, we can set we can actually leave this here. So, we can set the variables and then go to the next step. And this will make more sense once I once I actually show you later. But essentially why I’m doing this is because later on when I want to pull information here from the let me run this from here I don’t have to go all the way into here and then start finding information I can just simply go here and find the things that I need right so in this case the caption we can leave this as is but I feel like I want this here caption and I think this is fine. The next step is in your automation to be able to then filter filter based on the ones that are relevant. Some are relevant, some are not relevant. So I’m going to put a filter here. You simply have to press filter. And the verdict has to be equal to relevant. So the filter is saying, hey, only let the ones that are relevant to the next steps. So if I if I pin this and again amazing feature and then I run this now I see that out of 20 only 12 went through which means that only 12 were accepted and were actually relevant. Once it’s done now we can uh send it to an AI in this case Claude because Claude is better at making content be able to rewrite the post using our tone of voice. If I go here bot anthropic in this case we can generate no messenger model which again you can find I don’t think you could find it anthropic down below there messenger model and you go inside and now to connect your collad you have to go to get the API key you can go to anthropic console to console.anthropic on public dashboard and then get the API key. You can create a key, name it whatever you want and also make sure to add money into your billing because it’s not free but again just like OpenAI this is very very cheap. All right, cool. So now we can go back to Nen and we can paste the API key. We can connect it. The text will be text operation will be messenger model. The operation which is what is the action we’re doing again message model. The list we can actually use. I think 3.5 hey is good. Let me actually go to CH. That’s good. Which model is good or is best for content? I mean this is realistic what I would do if I didn’t really know and not will tell me. It depends. No, not complex. Yeah, 3.5 Sonnet. So, we can use Sonnet 3.5 Sonnet. Yeah, it’s fine. And now we have to put the prompt. Now, for the sake of time, I’m not going to write the prompt from scratch. I’m going to paste the one I had before, but it’s fine because you get to have the system for free. And I’ll show you exactly how to get it. So, don’t worry. Um, now this has the overview, which is you are helpful intelligent writing assistant. And now that I think of it, this should probably be a system prompt because as I mentioned, the system prompt is the prompt where you tell it, well, that’s why. Okay. All right. Take my words away. Uh there’s no system prompt option. So, we just leave it in the user prompt and you are a helpful intelligent writing assistant. The task is to rewrite the Instagram post that I’m going to give you in a way that encapsulates uh encapsulates the original theme but uses different words. I’m targeting an audience that are people who build with or want to learn AI and they are always fascinated by new discoveries or news that actually make an impact. My results over the last year I’ve generated six figures, worked with over 40 businesses and taught 17,000 people and I got to do a bunch of fun stuff like travel, enjoy my life, etc. Rules use a no fluff young tone when rerunning the Instagram post only up the Instagram post and that’s it. Perfect. Now on a uh technical level, the prompt right here where we use hashtag this is called markdown formatting. Markdown formatting you know when you go to docs right and you type something when you write an essay you have the title which in this case is heading one. So title, let me have heading two. Let me have heading three, right? Let me have heading four. And I believe text, right? And so the same thing one one of this I believe that it’s a title. Yeah. Then this right here is heading two. This right here is heading three. And same thing with heading four as well. So this is why we add markdown formatting in our prompts because then AI can basically it knows the hierarchy of the actual prompts. So it looks so it knows to look at the overview first the task and then my results and rules as well. All right. Uh and now we can add another user prompt I believe which is the IG post because we wanted to give it the post to actually rewrite and say hey here is the IG post to rewrite. I can go I think yeah it’s here edit fields and put a caption drag it across and a good thing is that we actually get to see the output before it’s even run which is great um okay cool so this is good simplify output is good now we can run this press this now this should run so again we only send 12 items yeah 12 items we’re we’re ready to go okay cool in the meantime let me make a Google sheet which is a database where we actually get to store all the content. And I believe I want the username, repost URL, the original post text, and the rewritten post text. Okay, cool. Make this white this middle. Let me freeze up to row one. We’re good to go. Let me make this a bit larger. So now it’s going to be a bit bigger than that. If I go back here, I actually see that this is not over cuz it does take a while cuz cloud is timeconuming. But now it’s finished. We have right here. Yo, this is actually insane. Apple just dropped a game changer. Your AirPods Pro can actually now be your personal translator. Just tap both stems and boom, it picked up your foreign language. Custom noise. I didn’t know I could do that. All right. And now we bring it all back to the sheet. So this right here, it’s all good. And look at how I’m actually structuring the automation. So I mapped it out. And then every time that I finish something, I go here to green cuz I’m iter. It’s called iterative testing. So we test every single step to make sure that it’s good. And then we want to make sure some sort of confirmation checklist that we can then um say yes, it’s good before going to the next step. So the next step here is adding everything to the Google sheet. Let me rename this IG. Again, not ideal. Let me do IG. And then here, let me do Google Sheets. I can append a row in a sheet. Append row just means add a row. To connect your Google Sheets, you have to go here and sign in with Google. It’s just a simple page. You can just choose your account and so on. Um, that’s fine. Once you’re done with this, you can do sheet within document append row because this is the action that we’re doing. The document will be IG GG. Choose the right account. Yeah, there we go. The sheet will be sheet one, which is this one right here. And now we want to be able to map all the fields. So mapping just means that we want the username to be somewhere from here. We drag it across post URL, original post, and rewritten post as well. So the username I believe we can find I mean what was his name? Evolving AI. Yeah, there we go. Owner full name. I can get across. Now why do we actually want this is because what if we change the URL of another person later on. We still want to know exactly where the post came from and then we want the post URL. Post URL. There we go. This right? Yep. It’s good. Uh and now the original postex is I can get from the man if any beginner actually used end for the first time I get so confused here. There’s so much to so much to look at. Then the caption is this. It’s good. And now the messenger model which is the text the rewritten post. I like how we just translated it in our own tone of voice. Yo this is actually insane to this is wild. I like that Apple just dropped the game changer. All right. Cool. Um, all right. We can test this as always. We can pin this, I think. Yeah, we’re good. So, now we should see this. It’s going to be formatted weird or not. Yeah, it’s good. Uh, what I’m going to do is I’m going to make this smaller. So, we get to see the username, the post URL. Perfect. The original post and then rewritten post. I like all of this apart from this. Yeah, like this. I mean, this is obviously not us, right? Yeah, this is not us. So let me go to AI edit rules. Do not use any CTA at the end. Not the best change in prompt, but it’s fine. We’re going to run it from scratch um again. So don’t worry. But now that we’re finished with this, so we said, hey, okay, we run this actor, we got the data, we set the fields cuz it’s easier for us to actually map later on. I mean, this should work when it’s running. Um then we said okay we maybe we can get 50 posts but I only want to run 20 posts at a time. So we run 20 post here classify the relevance if it’s relevant then we go to actually make the post then we add it to the sheet and then we go back here and we run the next 20 and the next 20 until it’s finished. Well in this case it’s 50, right? So it will run twice and then it will run three times on a third it only get 10 finish. So let me unpin all this. There we go. Let me save this. Let me refresh the page. And now I should be able to run this. Yeah. Yeah. Execute workflow. I can now wait. If I go to the post scraper, I can see that this is now running. And this usually takes about 24 seconds. It can be a minute depending on how many results you want. 46 seconds. Yeah, it depends. You can start to see the posts that are being scraped right now. And we only get the data. Okay. Oh, it’s 19 19 posts. Okay, cool. We get the data when it’s finished. So, it goes here. Now, it’s going to classify the relevance. Let me check in here. Yeah, that’s good. I guess it only found 20 post uh from the last seven days, which is fine cuz we did put a time frame, right? It’s going to rewrite them and then put them into the IG GG database. Now, the reason why we we give it like, hey, you can script 50 posts, but in the past 7 days, they only had 20. So, uh it didn’t find 50. We can see here that the content is now being added to the Google Sheets. So if I go here, I can see that more content has been added. I mean this is 24 and we made 11. So 1 2 3 4 5 6 7 8 9 10 11. So these 11 are the ones that have just been added, right? Which is great. And we have more content. As you can see, there’s no CTA changed it compared to this. There is a CTA. So we made that change. Perfect. Um, all right. Now, only thing we have to change for this automation is that we have to run this every week. I can delete this. Now, I can go here on a schedule. I can say weeks, one week. We can trigger this on a Sunday at midnight. Just Oh, actually, no. I said Monday. Let’s do Monday. Uh, Monday at 6:00 a.m. Yeah. Just who wakes up before then. Um, and then press save. And now you should have a working automation that runs every week. It will script the different post. It will get the data set items. It will then send the nodes or set the variables. It will then only run 20 at a time. It will classify whether this is actually relevant for our target audience. It would only send the ones through that are actually relevant. It will then rewrite them. So, let me rename this to rewrite post before adding them to our Google Sheets database with all the content right here. Hey, I’m about to build a live Twitter paraset system right in front of you. that scrapes tweets from top performing posts on Twitter based on a keyword that we give it, rewrites them in your tone of voice using AI and turns them into a stream of content that you can post automatically. All right, so I’m just going to run it and show you exactly the outcome that we get. We have a form where we can add a keyword. So in this case, let’s just put AI agents going to submit. This now starts the automation. It calls a scraper on Apify. So it can scrape the top 100 tweets on Twitter based on that specific keyword that we give it. If we go here, we can see that this is running. It’s got 80 so far. So you can see now it went to the wait because we’re waiting 5 seconds before adding it to the next API node to get all the data to then add to the first AI step which will classify the relevance of the tweet whether it’s it’s actually good for us to actually post it or whether it could be considered a good content idea. And we’re only letting 50 items through at one time because we want to make sure that we don’t give all the AI all context and all 217 tweets. This now sends only the relevant uh tweets now to the other agent or to the other AI step which will rewrite it in our tone of voice before adding it to the Google sheet. All right. If you go here to our Google sheet, we can see that we have the AI agent keyword, the original post, so the original tweet and the rewritten tweet that we take in order for us to then be able to post it to our platform. All right, so let’s dive in. I’m going to go to a new workflow. Workflow personal right here. And we start from zero. Now theory, I would have to go to Miro, which is a platform where we actually map out the automation before actually building it. We’re going to start strategizing behind what is it that we want. Right now, initially, a paraset system is using someone else’s content to be able to repurpose it for our own. And so because we’re talking about Twitter, Twitter operates with keywords, as in like you give a keyword and you can get a bunch of tweets. So the input has to be a keyword right the input is a keyword that’s the input now the keyword can be can be a form can be a button can be a message it can be different things um we can sorry we can give the input in different different ways a form a message whatever it is an email but in this case because we have notion uh sorry nitn forms integrated within n andn we can use the form right here actually let me just put nitn form here and this will be the keyword that will be like the only question that will be asked now After we have the form uh with the NN keyword, we would be able we should send it to a scraper. In this case, we use APFI. And I’ll talk about which one’s the best, how we actually find them and all sort of stuff. Uh but in this case, we so scraper scrapes tweets based on keyword. Scrape tweets. Actually, just put scrape tweets based on keyword. Let’s make bigger. And now we want to be able to send it to an AI because not all tweets that come from that keyword are relevant to what we do. So use AI to check if to check relevance and then if it’s relevant, we want to rewrite it. Okay, rewrite relevance tweets. Okay, so that’s exactly how it’s going to go. And then we’re going to be adding it to a Google sheet. Then on form script tweets based on keyword that we have using the form. Then we use AI to check the relevance. Then we rewrite the relevant tweets. Uh so this will be a filter in here. There’ll be a filter whether it’s actually relevant or not. And then we can rewrite it and then add it to a Google sheet. Okay. I think that’s pretty pretty it’s pretty standard pretty easy. Um the first step here is N form. So let me actually make that on NN. And again this is step by step so you’ll see everything. The first step right here I can press add. I can go here and now I can have different options. In this case, it will be on form submission because we’re using the N andN form right right here. So if I press this, I will have this page. Now again, N&N end forms, we have a test URL, we have production URL. The test URL is something that we use when we’re actually testing the automation. But once this button right here is turned on, where we actually activate the automation, so we don’t have to keep executing a workflow every time manually, uh we will be using production URL. But in this case, let’s leave it here cuz we’re testing. Authentication, we’ll leave it. Uh we don’t need any password. Authentication is sort of saying, do you want a password to your form? We don’t need it. Uh the form title can be Twitter parasite system. Yeah, there you go. Uh I don’t know, for some reason I always put the Y instead of the I. And then here you can add please add a keyword to activate this system. And now we can so this will be the form description as in what you’ll see on the form. And now we can add we can start adding the questions. So we if we add add form element this just means add a question. Uh the field name will be keyword. It will be a text and placeholder. Let’s just put an example AI automation. Okay. And this will be an example thing that they see before they even write it to get an idea of what they have to put. And we put required. Then it’s asking us respond when form is submitted. Yes. Because you want the trigger. We want to send information there when the form is submitted. And that’s it. Uh so let me execute the step. Let me test this out. Let me do AI agents. I submit. And now here I should be able to see the output and it’s green. All good. And the keyword is AI agents. Tells me the date the form mode which is in test mode, right? Because we’re using the test URL. Uh so that’s good. So that’s the first step done. Now we get on to the next step which is the Apify. So scrape tweets based on keywords. Uh let me delete this. We’ll go to Apify from scratch. I go to apify.com which is a platform where it’s sort of like a Amazon and the thing the products that you’re buying are scrapers. Okay. And scraper and the Amazon products someone makes them you just use them. Okay. So in this case that’s exactly what this is. People make scrapers you just use them to do whatever. Uh and it’s all code in the back end right? Again we don’t want to use code. So that’s why we use SL assistant. Um, so typically when it comes to to scraping, like the first thing you do is go here and search up the thing that you want to do. In this case, it’s Twitter scraping. What’s there? Usually I would look at the reviews. Like that’s the first thing I would look at. Reviews, reviews, reviews, and the ratings. And then I would go out and look for the price. Now because I already did this um I have on home this this scraper right here which is if you want to if you want the actual thing just copy this X data/ Twitter X scraper you can copy this you can go here aify store you can paste it and you will have this one right here. Okay so this is the one that we’re going to use because of the fact that it’s actually very cheap. So Apify actually gives us $5 to anybody who signs up every month. Okay and we have 8 GB. This is more than enough to be using this scraper which is 35 cents per thousand tweets. If we scrape a 100 tweets per keyword we have to do and that’s that’s what that’s very that’s not even not like that’s not something to even mention right in terms of price. So it’s basically free. Um so you can use it as much as you want. Obviously again not infinite right because we still have 35 cents for,000 tweets we have $5. So with that being said, um we have basically the scraper tells us that the input in this case can either be a start URL. It can be a URL of a tweet or whatever it is. It can be a search term which is a keyword or it can be a Twitter handle. Okay, in this case we want to be able to add a keyword because that’s the thing that we’re inputting, which is why we add So if I press X, I can add here. Let me do AI automation, whatever it is. And for you to actually see it on end, you have to actually start and run it once, right? To save. So I already did this so I don’t have to do this again, but you can start and then save it. And then maximum number of items output. That’s good. All right. So let me go to NN and actually cuz I have the scraper already. I’m going to go to API right here and I’m going to run an actor because the actor is the scrapers like the scraper itself is gonna actor. Uh so if I press run on actor it gives me the option to um to actually connect api to end. I press there I can now put the API key which I can find when I go to settings I go to API integrations and this will be the one here default API token. I copy this and I go out here and I paste it. this. So now let me put 100 connection 100 connection second September. Press save. This will now save. So you can see here you can’t see it cuz I’m there but uh it will be credential successfully created. If I go here now I will have the connection. Okay. The resource will be actor. The operation will be run an actor because that’s the action that we’re doing. Actor we can be uh actor source recently used actors. You should do API store actors in case you haven’t used it yet. From the list now you will have a list of actors that you’ve probably used. If you this is the first time you will see none of them. Um but you I mean you will see the one that you just you just ran which is the one that I we just spoke about which is the one here. So this is the one that you have to use. Look for the handle X data Twitter scraper or look for the name XCOM uh X.com Twitter API scraper. If I go here I can then look the thing right and it tells us the name. So we know that it’s this one. I’m going to press this. And now it’s asking me for a few things. It’s asking me what’s the input JSON. So how do you know the input JSON? Well, you can actually scrape on API using two different ways. You can scrape on the platform. So you can go here and actually put the keyword and run it and get the results manually and download as a CSV or whatever it is or you can actually use it automatically. Use it automatically. You need the JSON here. So this is the manual process. In in case you want to use JSON, we have to press this button right here. And now it gives us the JSON that we can copy, right? And the only thing we have to change in this case is a search term, which is the variable that we get from the form that we fill out. Okay? So if we copy this whole thing, we go here, we paste it back. Uh, okay. So if you do this, we just copy it. And now the only thing we have to change here because the search term is the thing that’s dynamic, we have to change the search term which we get from the keyword. So if I delete this and I pull this across keyword in the middle right make sure that it is in the middle make sure that is uh that is not here make sure that it is in the middle between the two quotes. So this will do is this variable right here will be changed. Okay, it will be dynamic will be something that changes as the form submissions change. So what I do here we created the actor we connected the actor. We said okay this actor is fine. Then I went to API said okay if this is the manual way of doing things with these with these settings a automation 100 and so on top the JSON for it is this top a automation 100 and so on. Right? So you want to copy this, you want to paste it here. And then the only thing you want to replace is the actual keyword that you use u to actually script the tweets. And that’s asking us for um wait for finish. In this case, yes, we want to wait for finish. What this means is that we can if we toggle this off, we can basically send the data to the the actor, but it will run. It will say it’s successful as in like it won’t give us the the data back. It will just run it. But if you press wait for finish, what it will do is that it will send the information to the actor like this. It will wait for the actor which in this case can take 45 seconds to finish and then it will give us the data. Okay. So in this case that’s exactly what we want. Uh timeout we don’t need timeout. Memory is fine. That’s fine. So let me actually test this. Uh in this case I can press execute step I believe. Yeah. So what this will do is it will go here. You see how now it’s running. So it’s running a new search term uh based on the keyword AI agents which we just ran before. Again executes that. The good thing about NNN is that you can actually test it using the data from the previous steps. So now it’s waiting. So we’re we’re actually waiting for the data to come back. We script 60 so far and now I believe we have to wait at 20 more seconds for it to to load. Um but this right here is is basically what’s happening. It’s giving us a whole log of the whole of everything that’s happening within the actual platform and how it scrapes. All right, cool. So it’s finished. If I go here, I can see that I get different data, but we don’t actually get like you can see we don’t actually get the tweets. What we get is a bunch of fields. And the thing that you really have to care about is this right here, default data set ID. Because this right here is the thing that we’re going to feed into the next node, Apify, for us to actually extract the information. If I copy this code and I go here and I put another API node, API, in this case, it can be get data set items. So, let me I mean, I actually just find it there. We are right here. Get data set items. So if I go to get a get data set items, what this means is that the only thing that we have to feed it is the data set ID. So if I paste this manually in this case it will have to be automatic. If I execute the step now this will give me all the data just 50 items 50 tweets for that specific keyword where we can that we can go through. I go in table I can see that it’s a bunch of data and it’s divided into pages. This is how we get the data from API. This actor runs we wait for it to finish. Then we get the data set ID which we feed into the second node which will get all the data from that data set ID. And then we can go out and uh and use it for whatever. Now the limit we can leave to 500. So if I go to execute step now we see 179. It was 50 because that’s a limit. Um or that was the limit. Data ID with that’s the thing we have to replace. So in this case you can go here to default data set ID and you want to drag it across here and the connection is the same. the resources data set operation is get items uh offset limits and that’s all good. All right. So now that we have the data we can go to the next step. So if I go here to miro uh the next step is to use AI to check the relevance. There’s only one problem here is that we’re sending 179 items to the AI step which you can’t do because sometimes it can’t overload which means it’s too much information and will not run. It will error out. Uh, so in this case, in order for us to actually be able to send, let’s say, 50 and then 50 again and then 50 again until it finishes, we have to use a loop over items. So I go loop over items. And now it’s asking me for a batch size. So batch size is saying, okay, what is that number? How many items do you want to send through before we loop back and get another? Right? So in this case, we can do 50 and leave everything else as is. So in theory now, it will get 179 or whatever it is it needs to get. It will send it. It will only send 50 through based on here. And then it will go back 50 again. 50 again until it finishes. Okay. So I’m going to delete this. Let me delete this. And now I can start adding the next steps of the automation. So in this case again is the AI to check the relevance. So we can go here loop to AI. You can go to OpenAI message a model because we’re messaging a model. And now in order for us to connect our OpenAI to uh NN we have to go here to create a new credential. We have to get the API key. Now the API key is something it’s sort of like a password that says hey and then you have access to my account you can talk to it you can talk to the GPTs whatever it is you have to do automatically in order for us to get the API key we have to go to here to platform the openi.com we can go to uh you have to sign in of course go to dashboard go to API keys on the left hand side you can create a new secret key on the top right uh name it whatever you want we can do and then workflow when you create a secret key this now will be the API key that you will use when you have to go back to end and paste it here. Okay. Now, make sure you don’t share this API key with anyone because it is um it is something that if someone else has access to it, they will start spamming your money. Um so, don’t do it. So, copy this, bring it back here, paste it, and then you will have the connection sorted. Now, once this is done, you’ll have the connection here. The resource is text. The operation will be message a model. The operation is sort of saying what is it that we’re doing. Uh and then from the list, the models, we can just use let’s do 40 latest. I think that’s fine. or four or mini. I think four or mini is 4. Yeah, 4.1 mini. That’s like we’re looking for something that’s like quality plus speed, right? Um so 4.1 mini. That’s fine. All right. So we have the prompt right here, which is in this case a system prompt because again we give it an identity. Uh if I go in here, let me just zoom in and you say you are helpful precise tweet classifier for an automation focused audience. uh people who build or learn automations and then make.com Zapier uh APIs and web hooks, AI agents, RPA workflow ops, integration patterns, real build tool releases that impact automation work. Now, this will obviously be replaced with whatever you’re doing. Um so you can change this to to your kind of audience. Uh but for me, it’s AI automation. And now I’m going to start adding the user and assistant. So for the user, I’m going to add a prompt that allows it to say user uh to say whether this is relevant or not. So again system is for you are a helpful intelligent XYZ. So it knows it’s that thing. So if it thinks it’s that thing is going the output quality is going to get better uh because you gave it an identity. And now for the user prompt we say hey classify a tweet for an automation focused audience return only verdict uh relevant or not relevant. So this is using JSON we’re saying hey only output this. This is the key. This is the value relevant or not relevant. um based on these rules. Relevant if it contains actual automation content, how-tos, real builds, API, web hook, interpretations, agent, RPA workflows, templates or ops patterns because in this case we only want things that are actually relevant to what we do and then not relevant if it’s genetic AI tech news, motivational, personal, no automation coding, uh politics, finance or tool discounts or vague hype with no build impact. And we only tell it to output JSON only. Okay, because that’s the only variable that we want. We don’t really care about anything else. We just want to say hey is this relevant or is this not relevant? Uh once this is done now we can give it the tweet. Um so if I add another user message so in this case I have to I believe I have to run the previous steps. Yeah I have to run previous steps for me to see here I have to execute previous nodes. In this case it’s running. So we have to wait about 40 seconds but then we’ll be able to pin the data and then we can we don’t have to rerun everything again. All right. So it just finished running. Um I mean now we’re using AI but we have the variables on the left hand side we can use to actually add it here. I’m just going to stop this. There we go. Okay. Now all we have to add is this. So we added you are a helpful intelligent or um whatever assistant and the prompt is you need to check whether the actual tweet is relevant or not. U but now we have to give it the tweet. So last user message will be here’s the tweet that you need to classify. And now we have to find the tweet here. So if I go to not loop over items, it will be get a data set items for sure because that’s where the data is all at. If I scroll, something you have to do with these sort of things. There’s so many fields. Most of them don’t matter. Okay. Okay. Yeah, it’s definitely description. Description. That’s the closest thing that looks like a tweet. Yeah, description. So now we can drag this across. Not loop of Adams. This one right here. We can drag this across. Make sure it’s API right here. And now this will be the thing that will be used to actually check whether it’s relevant or not. So here we can rename this to relevance agent. Although it’s not really an agent, right? Cuz it’s just a step. It’s an AI step. All right, cool. So once we do this, now we can um we can go to the next step which in this case is actually filtering. Okay, so we want to actually run this because we want to make sure that we have the data to test. Uh, but I actually forgot to do one thing. So, this agent is going to run, but I forgot to do one thing, which is turn this on. Uh, output content is JSON because we tell it, hey, output this as JSON. So, we have to turn this on to let it know the output is JSON. That’s all it is. Uh, so now what it’s doing is it’s uh running through 50. So, I mean, we still get the data and I’ll show you exactly what it looks like. U, but now it’s running through all the prompts. is checking every single person or every single Twitter um post that’s made and that’s the thing we’re going to use to go into the next steps. All right. So, you can see now uh it’s null. There’s no data. So, now we have to turn this on. Output content as JSON. And let’s rerun it again. Let’s execute the step again. Now, it will take the data from these steps. And now it will run it again to make sure that we can now actually test the data or test the step to make sure that we we have the correct things. All right. Cool. So now that it’s finished, I can see here schema. Okay, why did it error out? Why did it not work as we expected it to? Okay, this is part of the process. So let’s see. I think it might be because of it’s not actually the author description, it’s the text. So let me just press text here and let’s see what I get. It should be full. Okay, that’s why. Okay, full text. I think that might be it. Yeah. Yeah, I think that full text is the full text of the Twitter post. So, let me execute the step again. And again, this is part of the process. I mean, we we mess up. We have to see we have to check the variables, not check the variables, see what works, see what doesn’t work. Um, and if I didn’t show this part of the process, I’d be lying cuz that’s always what we go through when we build automations. I’m just going to wait again until it finishes. All right, cool. So, now if I go in here, I can see that now we have relevant, not relevant, and so on. Now, the next step here is to add a filter because we’re asking to give us the relevant and not relevant so that we can filter out the ones that are not relevant and only send the ones that are. So in this case to add a filter we just press plus and put filter remove items matching a condition. This case the filter would be if the verdict is equal to relevant then we send only those one through. That’s it. That’s what we’re doing. So if I run this believe that it will do it. Yes. Should do it or run it. Oh it’s going to run it again. Okay. I forgot to pin the data. Okay. I should have pin the data. So they don’t have to run it again for always always remember to pin the data cuz then you see how now to rerun this to only run the step I have to start everything again and I have to wait like 40 seconds. Um so lesson learned uh we’re going to pin the data in the next uh in the next round. All right so it just finished and you see how of the 50 that went through only 27 stayed. Only 27 were relevant. Now let me pin this data. I can drag it across and press B. So now if I wanted to test this again, I would just um have this finished. And now to get on to the next steps, uh we have to go to the rewrite relevant tweet. Okay, we’re still going to use an AI, but in this case, we’re not using OpenAI, we’re using Claude. Now the reason why we’re using Claude is because Claude is extensively better at writing content. Okay. So if I go here and I write claude anthropic I can go to generate a prompt. Zoom out. Now to connect your claude to the uh NNN we have to go here create a new credential. You have to get the API key. So we can go to anthropic console um get the API key. Create a key right here. You can name it whatever you want and then you can add and you’ll get the API key. Once that’s done you bring it back and you will paste it here. All right. So now that you pasted and now you connected your API key to claude, the resource is text. We’re going to message a model. The list uh let’s do 3.5. Hu. That’s fine. I think that is one of the best at writing content. Or is it sonnet? Okay, let’s just do in this case. I think it’s like the fastest. It takes the most context uh the most amount of words. Uh, and the prompt in this case, let me just copy it from the automation I made before is the one here says, “Overview, your helpful, intelligent writing assistant. Uh, rewrite the tweet that I’m going to give you in in a way that encapsulates your original theme, but uses different words.” So, that’s what parasite just means. We’re taking something and rewriting it in our own words. I’m targeting this audience. My results uh are this. So, I worked with over generated just under six figures, worked over 40 businesses, and taught over 17,000 people, and I got to do a bunch of fun stuff like travel, enjoy my life, etc. The rules is use no fluff young tongue when rewriting the tweet because that’s me young. Um and then only upload the tweet and that’s it. That’s a pretty standard prompt. That’s a pretty good prompt. It has overview. It has task and it has my results. Now what you see here is hashtags. Hashtags are in MAC. They’re used for markdown formatting. So this right here means it’s heading one. This right here is heading two. Heading two. Heading one. Okay. We do this because that way the GPT knows what’s the title and it can it can basically categorize or has the hierarchy to what to look at first. All right. All right. So now that this is done, we can now prompt the same model to uh we have to give it the tweet essentially for it to actually do something. So we can add a message user. In this case, we can say here is the tweet to rewrite rewire. Rewrite. All right. And now we can pull the tweet from uh was it full text? Yeah, full text. There you go. All right. So now that this is done, we can I believe test. Yeah, we can test. Let me actually let me pin this as well. This as well. So I don’t want any problems having to run everything. Uh let’s uh let’s execute the step. So now it’s actually running. This is running. Taking the data from here and from here. And it’s going to give us an output which you then need. All right. In the meantime, uh once we finish this, we have to make a Google sheet. Okay, so let’s make the Google sheet right now. Let’s go to sheet new. Let me copy the headers that I had before. Keywords, original post, and rewritten post because again, we want the I mean that what I wanted here when I actually thought of the system was the keyword. I want to see exactly what uh where the comment came from the keyword, the original post. So in this case, it will be the original tweet, rewritten tweet. Okay, that’s fine. All right. So you can see this is taking a bit long but that’s fine because it is taking I mean it is clawed and it’s 27 items as well to rewrite something. So that’s uh that’s normal. So now let’s rename the sheet to Twitter Twitter system because I already name this parasite system Twitter system. The sheet is one. Uh let’s put this to new tweets ideas. And now, okay, we have the output here, which in this case is rewritten uh rewritten tweets that we can use. And now we want to store everything in a Google sheet. So I’m going to go here, press plus sheet, Google sheet, add a row. So append a row. Append just means add. And now you have to connect your Google sheets. You have to go here, create a new credential. You can sign in with Google. It will take you to a page. You can just press the account. In this case, this is my account. Press okay. Successful means all good. You can go back to N. Name this cal connection and then the date. Press save. That’s fine. The connection’s made. Now we want to do a sheet within a document. We want to append a row. Again, operation just means what’s the action that we’re doing. And the document is Twitter system. Twitter system. Cool. And the sheet is new tweet ideas. We’re going to leave this as map each column manually because this is the manual step. want to basically map the variables to the columns so that they change and they add every single time. In this case, the keyword is or can I find the keyword somewhere here? No, I think we have to run this. Yeah. Yeah, we have to run this. Execute step. Okay. Wait, let me get the let me get the link. Execute step. AI agents. Now I have this. I can pin this. So that here I think now we’ll have access. Okay, I think I need to rerun. Oh, not here. Here. Yeah, I’m going to have to rerun all the steps in order to get the data. That’s fine. That is okay. That is okay. It happens cuz I definitely need to get better at pinning data and making sure the data is not we don’t have to rerun the whole thing and we can have previous steps pinned so we can use it for the next steps and alerting process here. So that’s fine. Okay. So this is done. When this is done, we have to pin this. Uh we’ll be able to access this variable right here, I believe. And then we can add everything to the sheet. All right, cool. So now it uh it ran successfully. Let me pin this as well. And here uh at least one value has to be added. Yeah, that’s fine cuz we didn’t add any keywords. Uh here I should be able to see the keyword. Perfect. Original tweet. This is the text. So full text. Let me do something actually because I keep after looking at this. Let me just put a set set variables node. Like I’ll show you exactly what it is, but um let’s do keyword. It just makes it so I don’t have to go back to here and and find everything. But if I put keyword here and I put uh get data set items, I put text. This is like the tweet original tweet and this is re written tweet. I can go to claude and get this. Now if I go here to to Google sheets, let me run this. Using the item method does not work when painted in this scenario. Please unp get this time and try again. Okay, so we’re in a bad position again. That’s fine. Let me just do AI agents and then I can change this later. Let me just start this pill filter. Okay, cool. Then this runs. Okay, I just wanted the data here so I can I can just send it here. Okay, now you see how I don’t have to go back and forth in the form. Find it here. Find it here. Find it here. I already have it here. Keyword, original tweet, and rewritten post or tweet. Okay, so it’s much easier for me to uh to actually use it. And now if I go here, I need to send this back to the keyword. Okay, I don’t know what I did. I don’t know why I did that. There you go. It’s here. Keyword. So that’s fine. Because again, we’re mapping it from from the previous steps. And lastly, I’m just going to run everything from scratch to see how everything works. And one more thing we have to do is this right here. When it finishes, we have to get back uh here. to make sure that we get the rest that are finished because we have 100 uh 215 only 50 go through all this. We want to go all the way back to get another 50 until it finishes. So, let me unpin this. Let me unpin this. I’m just pressing P, hovering over it, pressing P. Now, we’re going to start the whole thing from scratch. Let me reload. Let me get this whole thing good. Let me execute workflow. Let me do MCP. Um, yeah, I think I think it’s fine. I think it’s pretty it’s a pretty hot topic right now. So, submit. We can go here. So, now it’s running the actor. So, if I go to Apify, I can go to running and I can see here that is running, which is great to see. I guess most most of the times when you’re building automations, things don’t go your way and things don’t work. But it’s about figuring it out. That that’s how you really become the system architect. uh when things don’t go your way, you just build, you iterate, you just get better. And now we can see all of this is running, which is great. Um how many recorders did it get? Okay, we got 97 so far. All right, now it went to get the data set atoms, it then sent it to the first AI step to check the relevance of the agent. And again, as you can see here, only 50 went through. And also, if you’re asking what the done is, this just means once everything is looped and everything’s fine, what is the thing we do? In this case, if you leave it blank, nothing will happen. Uh but you can maybe send an email to yourself saying, “Hey, uh we just finished looping through all the items.” In this case, we don’t it’s not really necessary, so we don’t have to do it. All right, so it’s good. Out of 50, only 27 went through. Now we’re using claw to rewrite the post, which will take about 40 seconds uh before we’d add everything to the sheet. All right, so now it finished, and now it’s going to the Google sheet. Now it’s going back to get the other 50. So I can see here that I mean it is a bit messed up. So if I go here and I actually format it, I can see that now the keyword is MCP. This is the original tweets. This is the rewritten tweets. Now I can use this for whatever it is I have to use, right? Which I have a stream of content ideas just come through based on the top tweets based on that topic in uh in Twitter that I can use. Hey, I’m about to show you an AI system that I built that scripts YouTube comments from any video and turns them into fresh high converting video ideas posing real feedback from your audience or even your competitors so you can see exactly what people want, what they’re confused by, and what they’re asking for next. All right. So, this right here is a full edit and automation that I built. Uh, and by the way, if you want the free resource, the whole template you can download for your account. All you have to do is go to my free school community, go to classroom, go to templates vault, and right here you’ll see the latest video that I posted with the resource that you can download. And if you’re unsure as to how to import it onto your account, there’s also a tutorial right here that I made, which is important to end. All right, with that being said, let’s dive in. So, the automation itself is is a workflow. So this is not an AI agent and there’s a very specific reason for that and we’ll talk about that in just a second. But it’s separated into six different steps. The first step is list of YouTube channels. So we have a list of YouTube channels in a channel ID. So we have a channel ID from each channel. From each channel we took the 15 posts that are most recent from their feed. We scrape comments from those posts, the most recent ones. Then we check with AI if it’s relevant to what we do and who we help and who we serve. Uh if it’s relevant, it makes a title for that idea or comment. a YouTube title, a video idea that could happen based on that comment. Then based on if it’s relevant, we also generated a hook and an outline and we store everything in notion, which is where we store everything for YouTube ideas and so on that we can then use to actually draft it and post it and so on. All right, cool. So the way it’s going to work, I’m going to run this. Um, so typically you would have this running every month, but I’m going to add a manual trigger. So I’m going to go here, other ways trigger manually right here. Connect it. So I want to see I want to show you exactly how it works and how it looks and everything around it and then we can go into step by step how it actually uh works and all the settings and stuff. All right. So I’m going to execute workflow which starts the workflow from the start. It ran over here. We script the YouTube channels. Now it’s using Apify which is an external software to be able to scrape. Scrape just means extract comments from those videos. It is going to take a while just because it’s 14 items. So it’s 14 uh videos that it has to scrape right for each each time. As you can see right here, the actor is running. So the automation is running. So we have to wait until we get the actual uh result back from here. Okay. Then once it’s done, which took about a minute or two, uh it goes to the wait because we’re waiting until we get the results back from API. And I’ll explain exactly what that means. And then once we get the actual items and the results, we in this case we have 505 comments. These 505 comments will go to the first agent. So in this case, it’s an AI step. It’s not really an agent that checks whether it’s relevant. if it’s relevant, it makes the title for our video and then sends it through here to be able to then make the hook and the outline, right? Uh in this case, we’re only passing 50 items at the time, which is why we’re using the loop over items, which means that out of 500, it doesn’t send all 500 at the same time, it sends 50, right? And then we do 50 again and 50 again until it’s done, right? Um to make sure that we don’t we don’t time out, we don’t get we don’t exceed exceed the token limit, which is something that happens with AI when you add way too much text or way too much information. Okay, now that it’s done, it only passes through the ones that are valid. In this case, it’s only seven. So from those seven, we generate the hook and the outline to then send it to notion which is where we add we store everything right here. As you can see, the topics are being added right now where we have the content idea, we have the hook and we have the outline, right? So let’s take an example. So we have how to automate meta ads inside and manage unlimited videos. Then here I have the hook. So based on this idea, we have I helped over 40 businesses automate their AI and referrals. Uh today I’m going to show you how to automate meta ads inside of manage. So this is a very simple hook. It follows a very specific framework that I use uh which is credibility and then talking about what we’re doing. And then we also have the outline right here, which is basically giving you a structured outline for the video that you can’t make uh from 1 to 8, which is great because when we’re filming YouTube videos, it’s sometimes it’s hard uh to think through an outline or you take some time to think through how you can position the video, how what you can talk about from step by step. Um instead of just going on the camera and just just speaking out of nothing, right? Um so that’s exactly where we’re going the outline as well. And now what it’s doing is that it’s going back here. It’s then doing the whole process again until all the 505 comments are being passed through. Okay, in this case only 100 went through and as you can see more and more being added to notion, more and more come. So you just have a stream of video ideas that you can use for your channel which is awesome especially for I’m on YouTube game so I’m I always do YouTube and that’s what I that’s what I do right now. Um so this is awesome. I’m using this myself to be able to just figure out what people want, what people don’t want. I feel like you don’t really run out of ideas in the AI space, but it’s still good to know what people want, what people are struggling with, um the sort of problems that they want solved, the sort of videos that you can make based on feedback from other videos, uh other comments that they put on videos, right? Which is such an underrated strategy. So, as you can see now, I have a list of topics, and again, this is running until it’s finished, until all the 500 items are finished. So, I’m just going to skip to the part where it’s done. So, because it will take about 5 to 10 minutes, I’m going to stop the automation. So it’ll take too long. Uh but as you can see now what it would do literally was based on this one channel. So only one channel went through. It took all their videos. It scripted all the comments from those videos. It sends it through here to check the relevance if it was relevant to us what we want and what we do and who we serve. Then it make the hook and the outline. Then it sends it to our database. And then it goes back here to get through all the comments. And then once that comment is done, at least all the comments are done, then it goes back and does the second channel and the third channel or how many channels you put. So, it’s a whole repetitive loop that you don’t have to really do nothing apart from adding the channels there. And you can run this every month and this just runs automatically. Um, and you just have a content ideas to just have here with the hook and with the outline. You can then obviously review, approve or or reject, right? Whatever you want. Okay, cool. So, I’m going to save this. I’m going to refresh. Um, we can go through step by step how I actually built this. This is, I would say, one of the more complex automations, but it actually is very simple once you break it down step by step. and go through the logic of what you have to do when you’re building. So again, the first step would typically be uh an on-time trigger typically every single month because you’re only scraping 15 videos and 15 videos is typically what someone uploads every month if they’re on it, right? Um which a lot of YouTubers are, which is great. So we get to pull comments from their videos or even our videos, right? This can work for our videos or their videos. So on time trigger would be the first thing. So we would have with this really on a schedule. So the schedule will be once a month and then the the first step here is to like the logic here is to have a list of YouTube channels that you can then run through each one and then go through go through the whole flow, right? Um so this node right here is for us to actually set the channels. So when you want to set the channels um you don’t necessarily you don’t have the you don’t have to put the link to the channel. You add the channel ID, right? Which is what we’re adding here. And I explain exactly what this is um what an array is and all that sort of stuff. But when you go to YouTube, let’s say I go to Alexa Mosi, right? Alexer Mosi right here on the URL, he has subscriptions and he has this long code. So I can if I just pull everything in, I go to my so I can show you exactly where the ID comes from. Okay, the ID. So we have the fixed part which is where this one and then we have the ID which is this. So we would need the ID for each channel to be able to actually scrape the channel. Okay. So when you go to the YouTube um and you want to use a channel for this in this case you would just copy this or I mean copy only this part right which is the ID of the channel and then you would add it here. So the channel ID now the reason why we are and these are three different channel ids of different competitors that I have in the space and the reason why I have this as an array is because when you want to run three different things at three different times you need it to be in an array and then split it out. Split it out just means that it takes an array which is a list of different items inside here. For example, let me show you. It will give you three different things. So, schema, channel ID zero, channel ID 1, channel ID 2, and then take each one individually and start running the automation. It will split it out, start running the automation uh individually, right? It’ll go through the first one, then we’ll go back second one, go back, third one, right? Um, so again, we have this, which is channel IDs, which is I just added channel IDs of my competitors that I can go through every single time. If I wanted to add or remove, I can just simply remove this or add. Right? In this case, if I wanted to add Alex or Moszi, all I have to do is go here bracket channel ID and then with a small L and then you add the the code and now this is pretty much set. Now these right here are called key value pairs. This is a key and this is a value. Okay, the key is channel ID, which is the same for each one. And the value is what is the actual thing. Yeah, you need a space. There you go. Okay, cool. So, that’s how you do it. Um, and this is JSON. So, the JSON has an array. And that’s sort of the the technical part to this. But if you just had an array, you have three different things. You can then split it out. So, the next thing again is splitting it out. So, we have the array. The array itself, it doesn’t run through each one individually. It doesn’t run through them cuz the array only has one thing, which is channel IDs. In this case, we want one, two, and three. Right? If I go here, execute step. Now, we can see that we have three items. So on the table, you can see that we go through the first one, then we go to the second one, and then we go through the third one. Okay? So now we’re able to actually run the automation one first, second, and then third. Okay. So what are we doing here? The settings here are basically channel ID because that’s the variable that we’re using. In this case, channel ID, which is the one here. Channel ID, channel ID. It’s all the same, right? Which is why we’re able to split it out. Include no other fields. We just want this which is where we take these and then take one individually run it second individually run it and third individually run it. Okay, so that’s why we do it. Now the reason why we’re using this loop items is because um Natively runs three of them at the same time, right? Obviously in three different things, but it runs three of them at the same time. We don’t want that. We we want to run each one individually. So to be able to only run one at a time, we have to use loop over items so that we can run this and then at the end when it does everything, it goes back. So that’s what this is. It goes back to here and runs the second one. So when we add batch size, which means how many items do you want to let through? In this case, it would just be one. We have three. You can see here three items, but we just want one, which is why we put one here. Uh once we did this, we can then edit field. So this in this case, we just have the channel ID. This is not necessary, but I just wanted to extract the channel ID so I can so I can have it. Um, let me execute the notes right here. And now I can just drag this across and put it here. So I have the channel ID to then feed in to the next step, which is where we actually scrape the videos. U, but this is something that’s not necessary. You can just simply add this to the next step. I just wanted to have something that’s more clean. So channel ID right here, which is just mapping field. And now we go to the list of top 15 videos that we have to scrape. Now, in order for us to scrape something, we typically would use Apify. So, let me go here. Apeify, which is basically a platform where people make their own scrapers. So, they code scrapers. They do the hard part. We do the easy part, which is just using it, right? And the good thing about Apify is that we um it’s actually free. So, not necessarily free because we still have to pay. But if I go here to the one that I actually used before, and I’ll explain exactly what this is. We can see that for this scraper to scrape 1,000 results, which in this case is 1,000 comments, we have to pay 40 cents. Okay? And we’re basically scraping about 20 comments, 20 30 comments per video. Uh, so we’re paying nothing really. And we have $5 for free from Apify. So if you do the math there, you’re basically paying nothing. So that’s why we use Apify here. But for the YouTube videos, we also can use something called an RSS feed. Now the RSS feed is basically a way for you to tell the web like hey using this URL go out and scrape go out and find um the YouTube videos that we can use. Now in order for us to set up the RSS feed we can go here RSS feed and then we go to this page right here and then we have to add a URL. So the URL is something that is fixed. The only thing that changes is the channel ID. So we go through here within channel ID 1 we script all the videos. Channel ID two script all the videos. Channel three until we finish all the videos. Now, how do we know this URL? How does this happen? Well, if I just go to Google and I search up um RSS feed YouTube channels, I can see that if I I usually go to Reddit or you can see here as well that you can use this. So, https w youtube. So, this is just a format for the YouTube videos. If I go here, I can see that this follows a very specific format. It follows the https.youtube.com feed subscriptions and then the code. Right? In this case, it would be this. uh it wouldn’t be subscriptions. Yeah, it would be feed. So you go here, you copy this, you would paste it here, right? And then the only thing you have to change is this part right here, channel ID here, which is where we pull in the variable from the previous step to here. That’s exactly what I did. So in this case, if we execute the step, we can see that now we I think this is next arrive. Yeah, next arrive. We um we scraped the videos from Nick’s arrive and we have 15 of them. So 15 items means that we have 15 videos and this only scrapes the top 15 videos. If you wanted to scrape more, you could use Apify um to scrape a list of 100. But I feel like for the most recent ones are good because they are the most recent ones. So they’re on top of they’re on top of like the the most recent ones, which is great to scrape. Uh which is exactly what we want. So here you can see the 15 videos, right? Why automation beginners should start this platform and all this sort of stuff. So that’s what we want to see and that’s what this does essentially and if you change the channel ID you change the videos that you’re scraping. So it’s very very easy and you can see we just ask Google and it give us the URL. Okay, if I go here then what we want to do is and this is comes from testing a lot of the videos that people post not a lot of them but some of them are shorts they’re not long form videos. So we want to be able to filter based on whether it’s a long form video or a short form video. So if I go here, I can see that the link. So the link right here. Yeah, the link right here. If it’s a short, it will say it’s a short. It will add the the name of shorts here. Okay. And this will tell us that it is a short. Now you can’t see it here because this is a long form video. But if it was a short, I think it would say https youtube.com watch I think shorts something. Uh and that tell us that it is a short. Okay, you can’t see it here just because this is a long form video. But bear in mind that we’re just saying, hey, don’t let any shorts through. I just want long form videos because they’re more validated like that’s what they’re actually posting and usually shorts are just a way for people to repurpose their long form videos and then bring them to which is exactly what we do right so okay so JSON link we’re saying hey let me drag this across if the JSON link does not contain shorts then send it through okay so there are cases let me go here so see how 14 items went through is because let me go here and show you I think there there has to be a short here because only 14 went through there we So you see how on this URL Y uh Y saturation doesn’t matter. This is a short and if I go here I can see just cuz something this is a short from next arrive right and this comparison is a long form video. So we basically don’t want any shorts we want the long form videos. So and the only difference between each one is that the short comp contains shorts here. All right, so the filter is done and then we go through the apify. So third step is scrape 100 comments from the videos. So if you go to apify and you go to actors. So again, apeify is a way for us to be able to scrape. Scrape just means extract different information from the web um for the YouTube videos that we’re that we’re talking about. We want to scrape the comments. So typically what I would do is you would go to actors or API store, sorry. And you can search for actors. Actors again are just different pieces of code, different different scrapers that you can use to scrape whatever you want. So if I added YouTube comments scraper, what I would do first is I would look at payment method because I typically want the pay on results uh or pay per output, right? Like 40 cents per thousand comments because then I have to pay. Some of them make you have to give it a subscription for API, which is the ones that we don’t want. But let’s say I go here. This is two uh $240 for,000 comments. This is Yeah, this right here is $20 per month plus usage. So, we typically have to pay for the scraper. So, we don’t want this. Uh 50 cents for,000 scrapers. That’s fine. And then 25 a month. So, we definitely don’t want this. I found a scraper. What was this? YouTube comment scraper. So, grow social grow social media YouTube comment scraper. So, if I go here, let me search it up. Yeah, there we go. I found one that’s 40 cents per thousand results. Okay, so this is right. You just have to copy this. You can copy grow media YouTube comment scraper and you’ll find this. This is the cheapest that I found and gives me the best result, right? And the thing that we can add to this uh that we can actually the fields right itself are the YouTube view URL and the maximum comments. So what’s the video and how many comments you want to scrape? So if I go to Apify, if I go here back to NNN, I can add a run an actor. So run an actor just means we’re giving you the the actual video go out and scrape, right? So we scrape it and then so let’s say I go to execute step. What this will do is it will take the URL from here it will give it the JSON link and it will tell you hey maximum comments is 100. So if I go here to runs now you can see that it’s running and we got 45 comments so far and these are all the comments right we can have a lot of comments from these videos which is exactly what we want when we are scraping videos and that’s exactly what we have with API. Now to connect your API account you just have to go here create a new credential and then you need an API key. The API key you can find I believe it’s settings API integrations and you can have yeah this right here default API token. You can copy this and then you can paste it to right here and you can save it and you have the connection and then you have to choose the actor. By the way, you have to save the actor first. So if I go to actors uh YouTube, you have to save it. So save here or start it at least make a test run to be able to see it here. That’s one of the the things that I struggle with at the start. You want to run an actor. That’s the action. Recently used actor. That’s fine. Actors here. And then the input JSON is what we get from here which is basically saying hey what’s that thing that’s going into the actor. So we put this and now we’re waiting for the feedback or for the actual output. So if I go here to runs I can see that this is still running. Um I believe we got it back or I think okay I think it’s going through all the 14 items. Okay I know why. Let me just stop this. This will still keep on running. The reason why it kept on running is because we go through the 14 items and it’s going through all the 14 videos which is why it takes quite a bit. Uh it takes like one to two minutes or two to three minutes based on um yeah the type of video it is. Um okay so once we have that we can add a weight because of the fact that here the output yeah it isn’t the actual comments we get a database uh data set ID. So if I go here to save execution so I can see the previous one that I had. Okay I went to one that I that I did yesterday. If I go here, copy to editor, I can see that this one it ran. It gave it to API. And as you can see here, we don’t get the actual comments. So we don’t get the comments anywhere here. There’s a bunch of stuff. What we need is this. What we need is default data set ID. So default data set ID is a thing that we then feed into the next node which is get data set items which needs the default data set ID. So what we do here is we go to the run after. We then look for default data set ID which is something you have to do every single time with API. It’s just the way it works. So we drag it across and this is a thing that is now going to use to be able to get the results. And now this is giving us the comment ID, common text, like count replies, all that sort of stuff, right? That we want. Once we get the actual results, what we want to do now is because of the fact that we get let’s say 500 comments like you saw before here, which is the output of the actual get data set items, we don’t want to run through 500 items all at once. We want to be able to batch them. So basically saying just like before, we don’t want to run through all the channels at once. We want to say, hey, we have 500 comments, but I’m only letting 50 through. And this is where the relevance and title come in because now we’re using a loop item again, which is where we’re saying, hey, I know we’re getting all these comments, but I only want to let 50 through. And then you can run it back and get the others that are left and do it all and over and over again until the comments are finished. So loop items once this is done is we add it to an agent. I mean in this case it’s not an agent it’s an AI step to connect your um OpenAI to NN. You have to create a new credential. API key. You can find it at platform.open.com under dashboard API keys. Create a new secret key. Create it. And then you can paste it right here. You can save it. Now once this is done, this will be text message and model. Uh the model will be 4.1 mini. Uh because I usually use a mini because it doesn’t it can take more information, right? And because right now we’re giving it 50 comments at once all at once in the AI it will take a while to process. Uh and the prompt that we give it is first assistant prompt which is a prompt that we get that we give the AI when we want to say hey you are a helpful intelligent whatever it is in this case is you are helpful intelligent content writing assistant. So we give it an identity. So the AI thinks it is that thing and it will the output will be higher the quality and then the user prompt will be below is a YouTube comment for one of the videos. Your task is to determine if the comment is relevant and if it includes any questions, inquiries or suggestions that we can use w as an idea for future video. Return your output as JSON and then we can um add a few examples. So in this case you would have a system a user prompt and then to give it a few examples you give it a user and assistant. Okay. So what this means is that we give it hey if I give you this comment this will be the output. Okay. So the user is me giving it something. the assistant is what’s the output that you you want to have and I’m giving it two examples in this case or three yeah three examples so the first example would be um is there any reason to use an AI agent node instead of basic LLM chain which is an actual comment that someone put in a video and here it will be relevant so content idea is AI agent versus basic LLM node when should you use each one that could be a solid content idea or something else this is a video from Nate uh Nate Herk um someone said a small request can you please make a video on a client on boarding. So these sort of things is exactly what we want to see, right? So someone’s asking for a client on boarding for N&M projects, the content idea in this case would be how to onboard your clients for N&M projects and this is relevant. But if someone puts thank you cuz they put thank yous and you’re great and all that sort of stuff, we don’t want to put it as a as a relevant idea because no idea here. Okay, so that’s what we’re doing. We are giving it a system prompt. So saying you are helpful, intelligent, whatever it is. Then here we’re saying hey this is what you have to do and then we want to be able to add the comment first. what’s the output that that I want comment output comment output. So it has three different examples. One that’s relevant, a one that two that are relevant and one that’s irrelevant. So it knows exactly sort of where to go. And then this is the comment. So the last u prompt which is the user prompt which you can add message here uh will be the after comment. Yeah. So we’re using JSON here because of the fact that we want the verdict and we want the uh content ID as separate variables that we can then feed in to the filter and the other steps. Okay, so in this case 502 went through in the filter only 199 went through based on the 502 based on the response from the actual uh AI and the filter in this case it’s if the verdict is relevant so if the variable verdict is relevant let me add a uh in this case it would be verdict relevant and then content idea how to make a NN agent from scratch. I’m going to pin this and then this is basically what it’s going to see. It’s going to see verdict which is the one that I put here and then it’s going to see the content ID but in this case we’re saying only if this is relevant then send it through. Okay. So once this is done we can now add some fields. So these are the fields that will be added to the hook and outline. You can, this is again is an optional step, but I just wanted to add fields cuz I like adding fields to be able to separate information. Uh, cuz again, we what we did is we scraped 100 comments. We sent it to the AI and we said, “Hey, only run 50 at once.” The AI checks whether it’s relevant or not. If it’s relevant, it will send it through to the hook and outline because it’s a relevant comment. It’s a relevant idea. Um, we could use it. Now, we want to generate the hook and outline, which we did before here. Hook and outline, which is why we’re using this AI step. But in order to generate the hook and the outline, it needs to sort of understand what we do. So what I added here is two variables which is social proof which is basically uh some results that I have and what I do and some tone of voice of direction. This is the tone of voice and direction. And this is what I feed into my next AI step which is an AI step that generates the hook and the outline like I mentioned before. And this the settings will be the same. The system prompt will be you are helpful intelligent content writing assistant. We can also write intelligent hook and outline YouTube hook and outline writing assistant. That’s more contextual to what we’re doing. And then we’re saying your task is to generate high quality engaging hooks and outlines for content ideas. You receive a content ID in JSON and you will return it in the following format. Hook string outline string. And then these are the different things that we give it. So you can see this is the projected output that we get. And now we give it a few examples I believe. Yeah, we give it a few examples. So in this case the content idea will be build a rag agent inside of nnnn and the assistant will be this. Right now we’re giving it the content ID and because we give it to we told it to give it to us in JSON which is just a programming language. Uh it will give us the JSON language into two different variables. So it will be hook and it will be outline. And the string is just something we we say when we wanted to say it’s just text, right? So we say give me the hook and text. Give me the alignment text. Give it an example. And now you can see red because it’s not uh this is not correct or like this. What is it? This. Yeah, this is not correct. But um this would pass through the content idea again which is something like this content ID builder rag instead of and now this will give us the hook and the outline which we can then send to another set variables which takes all the variables and puts them all into one place. Again, not needed, but I love to split information so we’re more we’re more structured with the way that we do things. And now once this is done, once we set the variables, we can send it to notion um the YouTube comment database where we have everything here where we want to see all the common ideas. All you have to do connect notion is go to here, create a new credential, and then you can get an internal integration secret. You should follow this guide. It will take you through everything that you need to do. It’s a bit more of a longer process. Um you can use Google Sheets as much as you can use notion. I I’m just a notion fanboy so I love to use notion and in this case it will be database page because this is a database right this right here is a page from the list in this case the database is called YouTube comment script database so we can do YouTube comment script database the title will be what’s the first thing which is this content idea so it’ll be the content idea the hook will be this the outline will be this initial comment will be this because I want to see also what the initial comment was to make sure that I know exactly if the AI I’ve messed up or not right so we get the hook the outline and the initial comment If I go here as well, I can see the initial comment. For example, what’s the average time most students take to get their first client? So, how long does it typically take to get your first client and what additional investment are needed to be on the and what investments do you need? So, you can make a video about uh how do you get your first client automation journey with zero dollars up front, right? And that will solve this sort of painoint that this person has. Um, so that’s something you could do. So, we get the comments, we get the hook, and we get the outline, we put it all into and the title, we get it we put it all into notion. And now once this is done, it will then loop back. So we go here, loop it back um to here to get the other comments that are valid. And it’ll do it all and over and over again until it’s finished. And then we wait and then we send it all the way back here where we can do the other channels. So it’ll go through the three different channels. And say you have 10 channels, it will go through the 10 channels, right? And it will just run it every single month. Uh now typically I would suggest that you run this every month or every week. Uh it depends on the amount of channels that you have to be honest. Um but because we’re scraping 15 YouTube videos, we also don’t want duplicate comments, right? Um and we don’t want to give the same content ideas. So think of a YouTuber, normal YouTuber, they typically post like what once every 3 days. Uh and in a month, um that’s about 10. Yeah, 10 videos. So if you put that in mind, you can run this every month and 5 days and it will be free, right? And I mean you would only have to pay for N andN from the start until the end which is which is a very good pricing model that they have. So that right there is for the way that is set up or we obviously have the different steps and make it a structured possible and when you look at cost and how much it actually takes to run this API as I mentioned right here. So let’s say we have 29 results and 1,000 results is 40 40 cents. So do the math there. It’s 0.00. It’s not even noticeable amount of money that I have to even mention, right? So it’s not really expensive or at all. It’s free uh because we we get the $5 free from API that you can use to be able to run this. And the other expenses really are the AI, which because we’re using 4.1 Mini, it’s relatively cheap, so there’s nothing really to worry about. I think it would be a few cents or 0.01 01 um whatever uh because it’s very very cheap like I mentioned and end so n charges you per execution which means from the start until the end so if you’re doing it maybe 10 20 times again this is very very cheap because you’re running it every month and so on right so this is very very cost effective when it comes to an actual system and that’s exactly what we have this for now who can you actually sell this to well YouTubers content creation agencies they always need to done for you especially done for you YouTube content agencies they need to always come up with new ideas for their clients. So if they have a system that scripts through all the different comments for their clients and sees it’s actually validated data. It’s not just stuff that they make up because that’s what people are actually asking for, right? Um so if they have a system like that, it saves them a bunch of time in the actual strategy and titles and hooks and outline, all that sort of stuff that they can that they have to allocate right now. Uh so you can save them that time of actually doing the actual work. That right there marks the end of the video where I showed you exactly how I built an AI system that scrapes YouTube comments from any videos and turns them into fresh high converting ideas. And by the way, if you’re looking for all the blueprints and resources that I’m talking about in the video, check the second link down below. You can go to the classroom section. You can go to the templates vault and you’ll be able to see the Nitn course right here and all the different resources that you can simply download the automation blueprint for and import it into your own account. And if you have no clue how to do that, no worries at all. You can always go to the welcome here and you have the tutorial which walks you through exactly how to do it. In this video, I’m going to show you exactly how we automated 95% of our onboarding process using notion and endn. All right, so this right here is exactly what we’re building. Essentially, it’s an onboarding system. Now, the onboarding system starts with this step right here, which is filling out an onboarding form. Now, the onboarding form is filled out whenever we close the client. So, we’re on a call, we close the client. After the call, we fill out the onboarding form as soon as possible, uh, which kicks off the actual automation until the end. Now, the onboarding form contains the name of the client, the website, and small details or general details about the client. Then, we’re adding it to the notion client HQ headquarters, which is exactly how we manage all our clients internally, all one place, uh, task, team, meetings, all that sort of stuff. So, we add the details of the new client, which we just closed, to our client HQ, uh, which autopop populates a client portal. And that’s I put it here just because it’s not a an an automation. It’s a notion based automation. So we have it here. Then we automatically add four onboarding tasks. We make the drive folder which is the drive folder that we’re going to use to store different assets for that client specifically. We’ll create a Slack channel internally which we will then manually share access to with the client. And then we send an onboarding email to the client which is saying, “Hey, welcome to the team. Super excited to have you going. Here’s the drive link that we actually created for you. Uh we also sent the Slack access. We’re going to send you the Slack access in just a bit.” And yeah, that’s pretty much it. All right. So let’s go to NN which is a platform where we’re actually building automations which is an automation platform. Essentially it’s taking a task breaking it down automating it step by step. So we don’t have to do it the automation does it itself. So we all start with the the onboarding form right here which is this one right here right where we have full name, email, company name and website. Then we have the client folder. We share the file because we want it to be accessible to everyone. We add the company to our database. We add the contact related to the company cuz every company has a contact which in this case is a CEO or whoever it is. Then we set the onboarding tasks. In this case there are four. Uh the first one is audit which is the first step of our delivery process. Then we have setting up this access which means softwares. Then there is start implementation which is essentially starting the structure for the system we’re going to build for the client. And then automation structure which is layering automations in the bigger system as well. Uh then we obvious link. Then we create a slack channel for that client. Slack is just the way that agencies talk to clients. uh you can use WhatsApp, whatever it is, Telegram. Uh probably not Telegram. I don’t think that’s for agencies. Uh but uh but yeah, we use Slack and then send email onboarding email to the client with some different variables. And by the way, this is templated. So if I go here, don’t get overwhelmed by all of this. Uh but it’s saying so to officially kick things off with you. I know investing in a service like this is a big decision and our job here is to make sure it feels like the best decision you made all year. Uh below is your personal onboarding folder with everything you need to get started. The link right here. We also made a Slack channel. Uh we’re thrilled to have you join the JM team and can’t wait to get started. Cheers, Mikuel. Now this right here is something that a lot of agencies don’t have, which is touching on the psychological angle of onboarding. Uh because not everything is technical, not everything is folders, drives, all that sort of stuff. It is still an investment that a company is making. So you want to make sure that they don’t have buyers remorse. They don’t feel like they have not made the right decision. Um so let’s actually try this out. Let’s see how it works. So all I have to do now is press execute workflow, which will essentially run the automation once. We have to fill full name, email, company name, and website. So let’s do it and then press submit. If you go back to our an automation, it shows that it’s running. All these screen steps just says it’s successful. It’s making the different task which all have due dates as well. Um one is I think 1 day then 2 days then 3 days and 4 days when the automation is running. Just finishing up the task Slack channel and then getting the email. So now if you go to our notion HQ where we manage everything from clients, contacts, tasks, meetings, analytics. If I go to clients right here, you can see that we have one media here added to the canon board which is where we manage all our clients, all our delivery uh statuses. And if I go to one media, I can see that the client portal was automatically generated. If I go to the client portal, which is essentially a place where we manage everything for clients because this saves the time of us having to email the clients for different stuff, having to find information. We want to keep everything in one place for every single client, which is exactly what this is doing. In this case, if this is sent to complete, this automatically sends an email to the client saying, “Hey, the name of the of the actual task, which is in this case, the audit, right? The audit is finished. The next step is software access. The next step is database building and so on.” So, it goes step by step. So, it’s all automatic as well, the updates to the clients. So, we don’t have to manually do it. Uh, we can keep software access here. We can then have databases. So, in this case, it will be resource area. We can add any folders and so on. And then the miro would be the mirror for the audit because our first step of the delivery process is actually auditing what they have and mapping everything out step by step with the whole team. So we put this all stuff here. They have access to this. If I go back to the client, if I go to task, I can see that these four tasks were autopop populated for the specific client with due dates that are 2 days, 3 days, 4 days in advance depending on what you want. Uh but this is what we like to have. You can see the task progress which is so if I say I put complete, it shows 25% task progress. And if you have a bunch of clients here, you can see all the tasks you’ve done, the percentages and so on. So we have everything in notion right here which is autopop populated again. And also one more thing the tasks are stored in notion as well. So you don’t need another project management tool. You don’t need to store clients another place, right? Everything is in one place for notion. So with task is here. Companies here. If I go here I can see that the website is stored here. The address, the email can be stored separately. If I go to contacts, I can see that one contact was here which is the person from the email to with the with my email as well. We can also add more fields like phone number, type, right? RO title, time zone, and so on. But just for this case, to make it simple, we just want to leave it like this. And then if I go back to the email right here, I can see that I got an email from JM Solutions saying, “Hey, Mika, so pound to efficiently kick things off with you. I know investing in a service like this is a big decision. So our job here is to make sure blah blah blah.” And then we have the onboarding drive folder. If I press here, this will take me to the drive folder, which is named with my company name. So one media onboarding folder in this case. And this is where we can store any creatives or anything that they have, brand assets and so on. Whatever it is that they have, um, they can store here in the drive folder. And the client itself just gets a nice email sent to them uh, automatically without the team having to do it themselves. And if I go to Slack, you can see that we have the one media channel right here, which is a channel exactly for that client specifically where we can store anything. We can communicate with the client. Uh, cuz for any agency service that you have, it’s a good way to communicate with the client itself, not being on email. uh cuz when you want to do quick things, it’s good to be on something like this, WhatsApp, whatever you have works. So this is automatically generated as well. And that’s the full onboarding process right there. So again, we all started with a form. We then put it to notion where we have a place where we can store everything. We generated the client portal, which is something else that a lot of agencies don’t have because they scatter in different tools to find client information. In this case, I said, look, let’s put everything in one place in one portal where we can manage everything for that client, which is so so good, especially because it sets the expectations, but it also increases the way that the client views you because you’re more professional. you have your together basically uh all in one place. Then we have the onboarding task as well so the team knows exactly what to do. They’re alerted as well uh so they can get started on the project. The drive folders automatically generated the Slack channels done uh so that everybody knows exactly that we have a new client rolling and then the onboarding email is sent to the client. Now something like this depending on the agency really uh it will take around well anywhere from an hour to days. I’ve worked with agencies who take days to do this uh which is which is utterly insane. uh when we have this automation right here that does it in seconds all by filling out a form. So this is such a powerful automation. It’s high leverage for the time that you put in. The output is so so good and it’s so so powerful which is exactly why we recommend it to all these agencies. And this was all done using notion right here and then using NN right here. Hey about to build a live LinkedIn outreach system right in front of you. We start by filling out a form with the details of who we are targeting. From there, it actually scripts thousands of leads from Apollo, pulls in their LinkedIn URLs, and automatically drops hyperpersonalized connection messages that we can plug straight into our outbound campaigns. Okay, so as always, I’m going to run it from the start until the end, and then we’re going to go to actually building it step by step. So, let me execute the workflow. This will then bring me to the form right here. So, let me say I am targeting real estate agencies in the US. I’m going to press submit. What this will do is it will send it to the first AI to generate a URL which will then add or send to the scraper to then scrape the leads. Um, and by leads we mean LinkedIn URL. So we can see this is running right here because we’re using API. As you can see here, we’re starting to get results and we get the first name, last name, LinkedIn URLs in the ID as well. Then we send it to the next node in order to extract the details. Then we only send 20 um details of people. We just send 20 people through the first loop and then we dropped a hyperpersonalized connection message for that specific person based on their bio, based on who they are and so on before adding it to our Google sheet database which is where we store everything right here. So you can see we have the different first name, last name, the name as well, the LinkedIn URL, the title, the email status, the photo URL, and also the icebreaker that we can um generate based on their profile. And if I go here, I can see that we’re still running the system because we let 97 item through and then we’re sending 20 and 20 and 20 until it’s actually finished. If I go here, I can see that we have more and more leads that are being added. So, I’m going to stop the workflow right here cuz you got to see exactly what it is. By the way, these are just icebreaker. So, connection messages that you send to the lead when you want to connect with them. uh which increases drastically increases the likelihood of them connecting back and you being able to have a conversation with that person and a being actually personalized. So let’s start from scratch. Let me make a new workflow right here. Personal. There we go. Let me start from zero. But as always, as you guys know, we’re going to be mapping things out step by step into our Miro. So let’s dive in. All right. So here we can start mapping things out. Again, an automation has an input. Let me make this smaller. We can zoom in. And the output, right? And in this case, the input because we want to basically uh we want the thing to be dynamic. So it changes every single time. But the input in this case is who we are targeting. So target audience. And then we start thinking about how can we actually give it the input. Well, as you saw, we used end to end forms, but you could also use a telegram message or Gmail coming through or something else. So in this case it can be target audience from and it’s unformed. Okay. And then make this smaller and let’s put this like this. Cool. Then the next step is actually scraping the leads using Apify which is a software that allows us to scrape leads. And I’ll show you exactly what I mean. And then we want to be able to generate personalized connection message to that person and then we want to be able to send it. So add details to Google sheet database. Perfect. All right. So we have target audience from any form. Then we have scraping the leads using aify. Then we have generate personalized connection message um using the the details of course and then we want to add everything to our Google sheet database which is the one right here. So what I like to do when I make automations is I actually like to go step by step and show you exactly my thought process how I think through building automations um just so you can see everything you can see the whole scope. So the first step here is target audience. So we need a way for us to be able to give the input. So as you saw before I used nitin forms. This is where we go to end and we start actually building the automation. So I’m going to add the first step which is in this case called a trigger. A trigger is the thing that starts the automation and we can go to on form submission right here. And this is where you basically make a form. Now the form can in this case it can compile of the I guess describe your target audience or describe your audience that you want to target. So we can name this LinkedIn lead outreach trigger. Description can be insert an audience for your LinkedIn outreach campaigns here and then the form elements which is in this case what are we actually asking the user to input to then start the automation. We can add a field name called describe your audience in plain English. And we want to leave this as text. Yeah. text text area. I actually don’t know the difference between text and text area. I believe that this is uh wider text. So it can be uh long form rather than short text. Uh so leave this as it is. So we can leave this as is. And the placeholder can be company name, company types, sorry, location, etc. So this is the thing that they see before actually writing which gives them some ideas as to what input they can give. And let’s make this required. So now if I go to execute step, which means that I’m just testing the automation, it brings me to this page where I can see the title, the description, the um the first question, and then we can see that we have an area for us to actually make the text, which we can Oh, that’s why that’s cool. Um so let’s do again like we did before, real estate agencies in the US. I’m going to press submit. As you can see, this is a test version of your form. And here we can see that we got the results which is this right here. If you go to schema we can see that we have it in this way which is exactly what we need in order to go to the next step. All right. So once this is done uh this is good. Let me go here and make this green again cuz it’s all step by step. We want to be scraping the leads. So based on the input based on uh what is it right here? Real estate agencies in US. We want to be able to then send it to Apify which is apify.com which is the one right here. And I like to think of Apify as the Amazon for scrapers. So you go here, you basically choose your product. In this case, it’s a scraper. And for those of you who don’t know what a scraper is, it’s basically saying, let’s let’s say we do um Google map scraper. This basically extracts. So it goes to Google Maps, it extract the text, it extracts the location of businesses, the reviews, all the stuff that we want from that specific software. And then we can use it for whatever we want. And for us, for this automation, we want to be using Apollo. So, Apollo is another software that allows us to be able to scrape LinkedIn profiles based on a specific criteria. So, it can be um real estate agencies in the US, which is the one that we have right here, right? We want to put this in. And the output, we want a list of leads. So, for us to be able to do that, we have to make an account. And then you’ll be able to come to this page right here. You’ll have the API store. By the way, if you’re asking yourself, is this paid or is this free? Well, um the script that we’re going to be using today is free depending on how much you use it. So, the way that API works is that they give you $5 for free every single month. And the scraper that we’re going to use is about $1 for a,000 leads. Okay? So, if you use uh $5, that means you will have 5,000 leads for free every single month. But anything that you use above $5, that’s something that you’re going to have to pay. Um, okay. So, once we come to the API store, again, like an Amazon store, we just look for a product, and the product is Apollo Scraper. And then we have different options. So, how do you know which one to choose? Well, the first thing I do is actually look at how many people used it and the price. This right here is good. I know Curious Coder is a guy who makes a lot of Yeah, as you can see, he’s already here as well. But the one I used is actually this. I used it because of price, uh, but also because the amount of people that actually used it. And the way that this works is you pay this per event. So, you pay per event. What this means is that you pay per usage. And the price is right here. So, $1 per,000 leads. And you can do up to 50,000 leads, which is exactly what we like. Um, and this page right here, it might look intimidating. It’s actually quite easy to understand. The only thing you have to understand here is like what’s the input? What is the thing that I’m giving the scraper in order for us to get the data back? Well, in this case, the input is the Apollo URL. Now, the Apollo URL is a URL. So, let me show you here. Let me copy this. Let me paste it. It’s a URL that allows us to basically say, hey, we want this type of person. Look, person title, uh, contact email, exclude, catch all, all this stuff is a criteria for the person that we want to extract. And this will now make a list of leads that we can use for whatever we want. So, so the input here is the Apollo URL. That’s the only thing that we have to get in order to give the scraper the thing that it needs to use to then give us the leads. Well, in this case, one thing we didn’t add here is the AI that we use to make the URL because the URL changes based on who we’re targeting. So, in this case, it can be AI to make Apollo URL. That way when we put the target audience, we give it to AI. AI knows the framework of that URL and how it usually works. Um, and I’ll show you exactly what I mean here because it is a very specific thing. And then we have the URL which we can then feed into the scraper on API to then give us the leads back, give it to AI to make the personalized connection message. And then we can add all the details to the Google sheet. All right. Uh, let me go back here. And now we can use the next node which is an AI. So we can go AI. We’re not using an AI agent because we just want the AI step. Let’s use OpenAI. That’s fine. And we’re going to use message a model. And in order for us to be able to connect our OpenAI to uh NSN, we have to go to platform.opai.com. Make an account. Go to dashboard. Go to API keys on the top right. Create a new secret key. You can go here, name it whatever you want. And then test. You will then have this key right here, which you can copy and paste it back here. API key. And don’t worry about any of this, okay? Okay, the only thing you have to worry about is the API key. All right, once you connected your API key, let me take this off. Um, we can do text message model. The model that we want to use is uh let’s say GPT5. GPT5. Let’s see if we have that cuz it is something that we don’t want any errors on. Um, let’s see if we have GPD5 here. Yeah, let’s do chat latest, the latest GPD5 model. And for the prompt, I’m going to give it a system prompt, which is basically saying, hey, you are a identity. You are a helpful intelligent whatever it is. And then a user prompt. So system and I’m going to say you’re a helpful intelligent sales assistant. And for the user prompt, I’m going to paste the prompt that I had before so you guys can see it. Uh but again, you can grab the whole template at the end. I’ll show you exactly how to do it. As you can see here, it says, “Your task is to take as input a natural language description of a prospect audience and turn that into an Apollo search URL.” Now, here’s an example of an Apollo search URL. So, I gave it a few examples. Not not few, just an example right here. You can see it has United States. And this is in a very very specific order, which Apollo likes when we want to be able to script leads. Uh the URL describes a search for people that are located in the US, hold the title, owner, CEO, founder, and partner, have a keyword associated with creative agency. And these are the fields that you can change. organization location, keywords, person titles, and organization number of employee ranges. Do not add and change any fields. Use the above template. Return your response in JSON using this format. Search all. Search where all goes here. Okay. So that way we basically say, hey, this is what the structure is like. These are the things you can change. And as the last input, we’re going to give it another user prompt, which is the target audience. Okay. So I’m going to say here is the audience I am targeting. And by the way, I just dropped it in from the form. So this is a variable that I can pull in here and then start the automation. And that’s how automation fundamentally works cuz it’s all dynamic. It changes every single time cuz you see here it might look like code cuz it is code. Uh but it’s just a variable from here. And then lastly, we have to output the content as JSON because as you can see here, I I told it to return your response in JSON because I just want a variable. So what I’m going to do now is I’m going to execute the step which means I’m going to test this. And as you can see, I got the search URL which I will then be using to give to the scraper to then be able to scrape the leads. So now that this is done, um, perfect. Let me rename this to generate search URL. The next step is actually using API to be able to scrape the leads. So I’m going to go here, look at API. I’m going to run an actor because again those different things are actors. They’re scrapers. And then to connect your API, you have to go to create a new credential. You need an API key right here. I believe that you can get your API key on settings API and integrations and you can um copy this default API token and then you can paste it here. Have the connection and that’s it. Once you connected it, uh which one is it? Okay, I’m going to bet on this one. This one right here. Uh the actor is the thing that we’re using. The uh action is the run an actor and then actor source. This is fine. Uh very very important though, if you don’t see it here, if you don’t see it in the list, which I do, which is this one right here, you need to actually run this once because yours will say start and save. Once you start and save, it will run it once. That way you can actually save it to your account. So you’re able to see it here. And then the next thing it shows us is an input JSON. So if when you look at this, you’re like, “What the hell even is this?” Uh, well, if you go here to the input, there’s two different ways that we can run scrapers in Appify. We can either use the platform itself and just run it and then get the data, or we can use it automatically within our automations or Nitn or Makecom or Zapier, whatever it is, um, to be able to automatically do it. And so because we’re using Nitn as our automation software, we have to give a JSON. So this right here is an input JSON like the input that we give the scraper which we can find right here right we can just copy this and we can delete this and we can paste it here okay and the only thing that we have to change is this because right now it’s fixed if I run this it will always take this URL but we want to change the URL based on the URL that we have here so search URL which we can drop in here okay so copy this and put it here I think this always happens There we go. So now the green variable is this thing that changes every single time and all these other ones are the same apart from max search result which we can leave to 100 or actually yeah you can do 100. What this says is like hey scrape the leads. These are the maximum amount of leads that I want you to scrape. Okay. And we do this because as I mentioned this is paid. So you basically want to maximize or you want to limit sorry you want to limit the amount of leads that you want to scrape from that scraper. Okay, so now we have this. Then we want to wait for finish, which means that we send the data, we then wait until we get the data back. And then we can move to the next steps. So I’m going to execute the step right here. Let me actually pin this P and then P. I’m going to run this. So you can see now this is running. And if I go to here to runs, I can see that we have a new run running right here. And this is fundamentally how you test. You go to the API platform and then you go back to inn and so on. So now you can see that we got a list of leads and I mentioned the maximum amount of result that I put was 100. So we’re going to have to wait until we get 100 or we can just simply stop the automation and just test. That’s how I usually do it. Uh but let’s wait until we get 100 result to then be able to go through the next steps. All right. We can see here that we have 97 results. Uh close to 100. And if I go to NN at any second now, we should be able to get the run um or finish the results of the run. All right, we got 100. Let me go here and at any second now we should see the output that is generated. Cool. So as you can see this is what we get out of the scraper. But the one thing about Apify that most people get confused about is they start thinking where are the leads like where do they where do they come? Well there’s an additional step that we have to do before we actually get the leads because right here this is running the actor. Once we finish running the actor what we get is something called a default data set ID which you can find here. default data set ID. This is the ID that we then give to the next node which is let me pin this real quick so I don’t have to run this again. The API uh get data set items right here. [Music] Same connection data set get all items. And now we give the ID to this node which is the one below here to then be able to extract the details from that output. And I’m going to put the limit to 500. I’m going to execute the step. So you can see now we get 100 items which are the 100 leads which is first name, last name, name, LinkedIn URL, title, email status, photo URL, Twitter, we get employment history, we get a bunch of stuff, employment history, a bunch of employment history, we get street address, we get organization, we get a bunch of stuff. We get everything about the actual profile which is amazing. And once this is done, then we have to go to the next steps. So let me go here. Let me make this green. Let me make this green. The next step is actually generating a personalized connection message using AI. Now there’s only one thing in between this and the AI because when we think about this, if I just add an AI step, so AI open AI message model and so on, right? Let me just configure this later. This will basically send 100 items all at the same time to the AI. And if you wanted something more scalable, ideally you want to send maybe 20 at first and then loop back and do another 20 and another 20, another 20 until it’s finished because then you give it space. You give it time or room to breathe to then be able to actually generate a better output or for it not to fail. So in order for us to be able to send only 20 at a time and then it finishes the whole thing and then goes back and 20 at a time, we use something called loop over items. So if I go to loop over items right here, the only thing that this asks you is, hey, how many items do you want to send through at a time when in this case we want to send 20, right? Let me delete this. So you can go here, delete and delete. And now using the loop output, we’re going to go here and it’s basically saying, hey, okay, we have 100 atoms. If I run this, it should run or not. Oh, it shouldn’t run. Yeah, cuz this is just the the actual node. Or it should run. Then it shows us that out of 100 items, it only sent 20 items through. So that we have 20 items and then we use AI to generate the personal message. We then give it to the Google Sheets. Then we send it back here and get the next 20 items and do the whole thing again until it’s actually finished. And this works for any amount of items. Even if you have 5,000, it will always loop back, right? And this is a cheat code that I like to use whenever you want to make your automations more scalable over time. Because again, adding one more step, you’re not going to pay more because the Nitn you pay by workflow execution, not by step. Uh, which is exactly why I like to use this. So now we want to be able to generate connection message. Okay, by going here again, you already connected your OpenAI on this step. So you can use the same exact connection. Let’s just use GBT4. Yeah, you can use this 4.1 mini. I think it’s good. um and the user. So in this case, system prompt first because we always use a system prompt to give it an identity to make itself think that it actually is that thing and the equality of output would be better. Um is you are a helpful intelligent writing assistant. And this is always how you should structure your prompts. Always a system prompt first and then sorry about that. Um and then a user prompt and then you can do another user prompt or whatever it is you have to do. Now for the sake of time, I’m not going to be writing the prompts from scratch again. Um, I’m going to paste them here and then show you exactly why they’re there and how they work. All right, so I just pasted the prompt. Let’s go through one by one. We have a system prompt as I wrote before. Then we have the user prompt, the first one, which is your task is to take an input of a bunch of LinkedIn profiles and then you basically have to return an icebreaker. So the icebreaker is the connection message. Um, in order to ensure the icebreaker punching high quality, make them follow this template. So we give it a template that they can use. Um, and it can say hey name love seeing thing about them. So you can say something specific about them. I’m also into plausible tie-in, which is something more specific about them. Um, and then you can say four thing about them and plausible tie-in. Never use the extract information provided in LinkedIn field. Instead, always paraphrase. This makes it seem more human written and basically give it a few instructions that they can use. But this is essentially the structure that we use. Okay? And these variables are the thing that we change every single time that the AI is smart enough to change um when we give it the actual data from that person. The next prompt that we give it is another user prompt. So now this is where we start to get two examples. So this is where we start to use the assistant prompt. Uh the first thing is a user and then assistant. So in this case we’re giving it an example because we wanted to I guess have something in mind that it can come back to as expectations of what we expect the output to be. So we give it an example in this case LinkedIn fields Danielle um founder and CEO creative agency uh regional sales director previous experiences and then we actually give an assistant prompt which is the output that we should expect in JSON which is hey Danielle love seeing your creative agency journey I’m also building brands thought I connect something short and sweet very very uh personalized and very human right um which is what we want so we give it a user and assistant and then lastly we gave it the actual data that we want it to use uh to be able to then make the icebreaker. So, LinkedIn fields can be first name, the last name, which we get from here. So, first name, last name, LinkedIn URL, title, uh I believe that we have previous experience, so the company they work for, and there’s a bunch of fields here. Again, if you get the template, you can copy it like literally word for word and prompt by prompt. Um, so you don’t have to do this again, but we give it different fields as you can see here for it to use to then make the icebreaker. Okay. So, now let me pin this. Let me pin this. I think I can pin this. No, I can’t find this. Um, and let me execute the step. So, now I’m testing this. All right. So, the output uh was done. And as you can see here, I actually messed up because I forgot to turn this on. So, you can see here the content that we got was actual JSON. Well, we don’t want the actual JSON. We want this right here. Right? So, what we do to fix that is turn this on. And now if we execute the step again, what this should do now is it should actually output the icebreaker not in JSON but as an actual sentence. All right. So you can see here we have the icebreaker uh different from before because it’s not in JSON anymore. It’s an actual like something that we can actually use. And lastly, this is where we get to the Google sheet. So this right here, all good. And now we get to the Google sheet part. Let’s go here. I’m going press plus Google sheet. Uh append a row in a sheet. First of all, make your connection. Just sign in with Google or yeah, sign in with Google right here. It will take you to a page like this. You can choose your account and then it will come back say successful and everything’s good. Now, I already made the sheet, but I’m going to make it again um because I want to show you exactly what it looks like even making the sheet. Let’s go to sheets new. Quick hack to make a new Google sheet. And then, as you can see, we need different fields. So, if I go here, I can see that the different fields are ID, first name, last name, thank URL. So, ID, first name, last name. Let’s do LinkedIn URL because I noticed that this was just a name, the first name as well. Then we have title, email status. I don’t know if you need this cuz there’s no email that we’re getting. So, title, photo, URL, and icebreaker. Title, photo, URL, and then connection message. Let me make this um dark blue. Make this white. Let me make it look pretty. Perfect. Go here. And then quick hack view. This res up the ro. So if I go like this, I can still see it. All right. So now that we have this, I can do connection message LinkedIn and YouTube tutorial. really long name just so I know exactly what this is. If I go back here, I can see that now I can uh resource is the sheet within the document. Then we want to append a row. Append just means add and then the document that we want to use is the connection message, LinkedIn and then YouTube tutorial. There we go. Right here. And the sheet will be sheet one. We want to map each column manually. And now this is where we start adding the different fields. So I can go to ID. Yeah, this is the ID, I think. Yeah, this is ID. Let me go first name. First name right here. Last name. And again, you could like you could spend a few minutes like trying to figure out where everything is right here. I just like to put everything here. I mean, you could also do this, right? Or title a photo URL. Yeah, maybe I was just tripping. Maybe we should do this. Uh, it saves more time. And then the icebreaker is the thing that we use as the connection message. Nothing. That’s it. Right. Let’s rename this. Add leads to Google Sheets. Let me save this. U. And now you see this ends. This right here now needs to go back to loop of items behind. There we go. So that we loop 20 and then we go back here, get the next 20, the next 20, the next 20 until we get these many items. Okay. So we do everything. We spit basically we split it. We loop over items. That’s what this is. All right. So, let me execute the step. Let me test this thing right here. Um, I should be able to see different leads coming through. If I don’t, then something is wrong. We can fix it. Okay, this has to run first and then we can wait for everything to go to the Google sheet. Right now, it’s running. We can see that now we have the different leads. So, ID, first and last in LinkedIn URL. Let’s go here. There you go. Gino, what is up my man? Real estate agency. There you go. This is so good. I mean, you can actually just Oh, I can’t. Yeah, you can actually just connect to them. So, connect, add a note, and then literally just go here. Uh, no, here, copy this, go here, paste it, and then actually just send it. Let me actually just send it. There we go. Boom. And that’s it. And that’s how your campaigns can actually run. And you can do this for every single one. And the best thing is you saw me do it manually, but there’s so many softwares that can automate this. So you simply can have a machine running through in the back end that’s personalized, like hyperpersonalized to each person because again, you can only send 30 connections a day maximum. I mean, you can, but you you risk getting banned on LinkedIn. So if you have an automated platform, you can only send 30 a day. So 30 * 30 900. Like typically you’ only need 900 leads right here every single month. God, why do I keep going back to this? Um, you would only need 900 leads right here every single month that you can go through. And again, we can scrape 5,000 for free every single month. So, this is literally a no-brainer. Like, everyone should be using this if you want u to to I guess run a campaign or run something in the back end that can work because the alternative is just you doing it manually. Hey, in this video I’m going to build a full sales coach system inside of Eniden that takes a transcript of every single one of my calls. It sends it to a custom sales coach GPT that is trained on the best sales frameworks in the world and then delivers a full breakdown on Slack with everything that I could have done better. By the way, this is literally the exact system that we’ve sold to a business for 3K. So the first part of the automation is actually me ending the call which triggers a web hook means it sends the data to end saying hey we just finished the call review it right now obviously I can’t do that right now because I’m not on call but what I’ll do is I’ll send a request to this web hook so you can see what it actually looks like. So we finish the call then we send the data here. What it does then is it uses Fireflies which is the software that we’re using for meeting notes uh to extract the transcript. Then we’re sending it to a sales coach GPT which is on our platform the OpenAI um platform here which is trained on a document which is this one right here which has a bunch of frameworks and questions that you should ask uh for different parts of the call which analyzes the full call based on that framework and then sends us a message on Slack. Right here we can see that it broke down the start of the call and also the objections. Clarify objections. So you missed an opportunity to clarify the prospect’s objectives early on. A question like what specific outcomes are you hoping to achieve from this automation? Would I set clear expectations and direction? That’s pretty true. Instead you ask, can you run me through your company first? Which turn the focus away from the immediate needs. Now that’s pretty good uh framework. Of course that was this a few months back so I wasn’t the best closer. I was trying my best but there you go. So it took all the call and it analyzed it based on this exact framework, right? Which is a framework that we use in sales. I’m going to start from zero. So I’m going to go plus workflow personal and then start from zero. So you get to see what it actually looks like. And we can start. And as always, we never start here, but we start here, right? Because we want to map things out before we build it. So every automation that we build has an input and has an output, right? So the input in this case, let me make this unbold. By the way, if you’re wondering what platform I’m using, it’s Miro. Very good. Uh the input in this case will be the call recording or call transcript, right? This is a pretty easy system. I’m not going to lie, but it is one of the most ROI. And what you’ll find is that the easiest systems, not the easiest, but uh the ones that are easier to build that are not super complex with 50 AI agents, uh they’re typically the ones that give the business the most value. Okay? So, call transcript, which is a transcript of the call. And by transcript, we mean what’s everything that has been said. And we know this works because we have meeting note takers. So, for those of you who don’t know what meeting note takers are, let’s go to Fireflies, for example, right here. Fireflies, not this, but this is a noteaker, right? What this does is that it joins the calls when you’re on a call with a client. So you hop on a call with the client and you let it in and it’s sort of like a like a live noteaker. So it’s there, it doesn’t speak, of course, it just takes notes and it transcribes the call so you can then use it for whatever it is. I typically have uh the noteaker on every single call just because it’s great if you missed anything on the call that you want to look back or action items or things like these which are great. That’s what we would typically do. So call transcript, we would use fireflies. So, let me put here Fireflies. You also have Fathom. You have Sibu.ai. You have Loom. Uh there’s a ton of stuff that you that you have in the market. They’re all pretty good. So, call transcript. And then we want to basically send it to the GPT sales GPT. So, we’ll have to make a GPT on the open air platform, which is actually very easy. Don’t worry. Uh to to analyze call. They make this here. And then we have to send Slack message with breakdown with feedback. There we go. See, crazy system. $3,000 for something like this. Uh that took me about what, one to two hours cuz it was the first time. Uh but if I were to sell it to another person, I would take maybe 30 minutes. Um, it all really depends on what document you’re using to the GPT to actually compare the sales call. All right, so with that said, let’s start here. Uh, let’s start with the first step, which is call transcript. So, because we’re using Fireflies, what I’m going to do is I’m going to open up. And you’re going to have to make an account. I have the free account, so I’m not paying for this. And you can see here I have meetings. I have all the meetings with everyone that I’ve had. I believe that I’m above the rate, which is cuz they gave you like 600 minutes of free calls. But here’s all the meetings that I have. And so with every single meeting that I’ve had, we can transcribe it and use this exact automation, which is amazing. And especially because I’ve had days where I’ve had five calls. And so I wanted every single call transcribed and gave me feedback and so on. And it happens instantly cuz it’s right after the call. So where am I going with this? We have to go here to the settings. And then we go to developer settings here. And we can see that we have two different things. So we’re just going to play around with these two different things. So the first thing is the API key, which is sort of like a password. If you use chatbt in your automations or claude or gemini or grock or open router, you always need an API key which is a password and then we have a web hook. And this is really why we’re able to make this automation happen is because we can transcribe it triggered when transcription is completed. What this means is that you go on a call with the client, it finishes, it then finishes transcribing the call which takes about 3 five seconds and then it sends a signal to the automation saying hey this is the meeting recording or this is the meeting ID and then we send it to the next step to take the meeting ID and then take the transcript from the call. Okay, it will make much more sense once I actually build it. Uh but bear in mind that we are able to send the notification to the automation once a meeting is finished. So the first step is actually adding the web hook. If I go to end right here, I can add a first step which is the trigger which is what is the thing that starts the automation. And here we have on web hook call. So again web hook is just a URL that people use or the servers use to send signals back and forth. Right? So the web hook is made right here. You don’t have to do anything. Just get this just press on it. You copy it and then if you go back to Fireflies you can paste it here and you press save. Now a very important thing that we currently have a test webbook right if you want to go in production. So if you want to make this live activate this you have to change this to a production URL. The only difference is is that this has this in production doesn’t right that’s it. So in theory now if you have a call with a client and you bring in fireflies then once a call is finished it will send a signal to this web hook. So, as I mentioned, I’m not able to be on a call right now, but I have the request that we typically get from the call recording. Right now, in order for us to send a example request, we’re going to go to Postman API, which is a new thing that I haven’t introduced before. Uh, but it actually is a really, really good software. It’s actually very easy to use. It looks a bit fancy and techy as well. Um, but we use this when we are testing web hooks, right? Because something like this to test it, you would have to go on a call. You had to finish the call. You need to say something on the call and it would take too much time for it to test. So what we do here is we set up a sample request, example request. The first thing we need is to um to add a URL, which is this right here. So copy this and paste it here. And we want to make sure that this is post because get is getting information. Post is sending information. So in this case, we’re sending information to the web hook. And because that is post, we also have to change this to post. There you go. And then we need the body raw. So this is a JSON. JSON is just a language that we communicate software to software. And we have to set up the requests. So we have to set up the actual variables that go into the web hook for it to start the automation, which are the ones right here. So we get a meeting ID and event type. So right here, if I listen for test events, I can press send, and this will send the information here. So again, if this looks a bit complicated, just understand that we’re not able to test this. Okay, I have to be on a call. So we’re using Postman API to send a sample request here. And this is exactly what we would get every single time when the call finishes. So it’s purely just for testing. As in when we go live, we don’t use Postman API. We just use the web hook from the Fireflies. Now that we have the meeting ID and we don’t have the transcript, we now have to figure out how to take this transcript from this meeting ID. So a meeting ID is like a unique identifier for every single call that you have. And so if I go to Fireflies meetings and I go to like a random one, say on here, this one right here, the URL on the top, if I go here, I can see that this is the meeting ID. So the URL is pretty standard and the only thing that changes is the meeting ID and the meeting name. So going back here, we have to take the meeting ID, which I can pin now. I don’t have to use Postman API anymore. Uh, and then we can um look for Fireflies right here. Fireflies. You would have to install the thing. It takes like 5 seconds. It’s fine. And now we want to get the transcript. Get transcript. So as you can see to get the transcript, we just have to put the transcript ID. Now the first thing you have to do is go here, create a new credential. You have to get the API key which you can get here. Uh what was it? Settings, developer settings and API key. Just copy this and paste it here to connect your account. Choose the right account. And now the resource which is what is the thing that we are changing or in general what are we doing? In this case, it’ll be transcript the operation which is what is the action that we’re doing and you can do a bunch of stuff and the transcript ID which we get from here meaning ID. By the way, most of these variables you don’t actually have to know anything. You just have to know the body which is the actual variables that we get which is a meeting ID and event type. And that’s it. So now that we have the transcript ID, we can press execute step. This will now I believe take the transcript. Yep. And the problem is that we have an array. So, it didn’t give us the transcript altogether. It gave us different bits of the transcript. So, sentence one, sentence two, and this well being a two-hour call is really, really long. See, we have about 444 sentences. It breaks up the transcript into sentences. So, naturally, the thing you want to do here is take the sentences and put them all together. So, the next step is to do that. So, we have to pin this. And then, and by the way, I’m pinning this so I don’t have to rerun it again. I can go to edit fields which is basically taking a sort of variable and changing it manipulating data right and we’re trying to get the sentences which are all the way here really really long and put them all together to do that we can just call this transcript so I’m setting a variable and now if I go full screen I can sentences because this is the array again an array is this whole thing full of all the variables together and we just want to extract the raw text and to do that you have to go Here I believe that is map. Yeah, map. Cuz we’re mapping. We’re saying, hey, inside this I want raw text. So be item equals item dot uh raw text. There you go. You see how we have all the sentences here right now? All the sentences. And the last thing is to actually join them. So join which is basically taking out all the quote marks and we just have a full transcript of a call instead of this right sentences with a bunch of variables that are so so long cuz we could theoretically feed this to AI but it would just be way too large it would break definitely break so we just have the transcript that we need okay so what do we do we took the sentences cuz it’s 450 sentences or more but you scroll all the way down and we’re taking the raw text which is the actual text from that sentence So we just have all the sentences together and this is the formula we use map item item dot the actual name of the item which is raw text plus join so join which is joining everything together and that’s it. So now that we have the transcript going to execute step and the JSON will just be the whole transcript. So I’m going to rename this to clean transcript and the next step is actually the the sauce of the whole system. So this is done. So the next step here is to make a GBT. And by the way, a GBT is just a thing like an AI assistant you could say uh that is just trained on a specific thing, right? That allows us to be able to analyze to talk to to do XYZ. And why is it better than just a normal one is because we give it examples. So for example, Mosy GPT is trained on 200 hours of content and two of his books, right? All right. So, you ideally want to use this instead of using the general chatgbt uh search bar because this is trained on these documents. This is more specific. And so, in this case, we’re not going to use a GBT here, but we’re going to go to platform.openai.com, which is the API platform, right? Where we actually use automations back and forth. By the way, I made a full video showing you how you can build with agent kit video up here. But the thing that we want to do is to be able to create a project. So, if you just logged into platform.opai.com, you most likely don’t have a project. So, create one. Let’s name it uh in it and test create. Go to dashboard. Go to assistants because these are the assistants that we make. And by the way, if I go to my previous project, you can see that I already have assistance. You can press create an assistant. Create. And now this is where we make the GPT. Okay. The thing that actually uh is going to be able to analyze our calls. So I’m going to name this sales coach. And the instructions is the prompt. So let’s say I want an AI assistant to just give me feedback on my sales calls. I am taking sales calls every day for and I have an AI automation agency that helps clients to automate their processes and be more efficient in the business. And the founder is Mikuel M I C H E. And I’m the one who’s hopping on the calls and I’m also the sales rep. I’m doing everything. Um so there you go. Press create. And I’m using AI because typically that’s what you guys would do. But I’ll show you exactly if this is a good prompt or not good prompt. And this right here wasn’t here. I believe a few months ago. I think it’s almost recent. And it gave us a full um prompt. It’s actually not bad. So the founder is Mikuel. You don’t have to spell it step. I just didn’t want it to say Michelle. That’s cool. Uh providing actionable feedback on sales calls for any automation agency founded by the user. Let’s write in markdown formatting. So overview this just means heading one. So it just hierarchy of like text just as you would for a normal essay. And then here it would be objective. Your objective is to analyze each submitted sales call. Identify strength. That is pretty decent. Um I’m not going to give it any examples. And one thing we need to add here is the document that the GPT will use to actually give feedback on a call. So, I’m going to put file and I’m going to drop in the file that we’re going to use to be able to um to transcribe or not transcribe to give feedback on the call and it’s this file. So, this is the file that I’m going to using. So, it’s a PDF that has 10 steps framework has introduction. So, hey John, how’s everything going? Uh agenda. What I like to do in this call is really just to ask you a few questions, get to know a little bit more about you and really see if and how I could actually help. That’s not fair. It’s crazy. I used to because I used to be in sales. So well I can’t call me a closer but I was I was a setter um vision based questions challenge based questions and these are considered good right and this is a course program that I was in and they gave us this framework so I’m going to use this to be able to compare it to our call and yeah that’s it so with that said we have the framework PDF I can attach it and what this will now do is it will turn this into a vector store and what that means is that it’s taking the PDF in this is text. It’s transforming it into embeddings and then it’s vectorizing the data. That’s why it’s called a uh let me go here. It’s called a vector vector store. And then we’re adding it to a vector database, right? Database. So you hear vector database. It just means that it’s full of like information whether it’s an image, audio, video, and text. In this case, it’s just a PDF that is turned into a number. So that we then context, hey, can you pull information from XYZ? which will then vectorize my question which means it will take my question turn that into 0 1 0 0 0 1 it will then check it against the vector store that we have which are all different vectors lines and stuff with all numbers it will match the numbers and then give us the answer okay which is much more efficient than anything else that’s why rack systems are very very good um I need to turn this on but it’s telling me that the file search is not enabled for this model let’s try GBT5 or GBT41 yeah there you go so not all models uh can retrieve data in this case we can use for one file search and now we can say what is it that is called millionaire closers framework okay so when it’s giving feedback I wanted to give feedback from like taking information from the millionaire closers framework PDF that I uploaded in the file search um and just give feedback based on that. So now it’s doing its thing and we also have a few settings that we can change down below which I’ll explain in just a second. All right. So, I just finished this and then full screen. Let me change this again. It keeps changing it to the other one. Overview. Uh, you’re assistant closers PDF. So, we’re saying hey, you are a assistant specializing in providing actionable feedback. So, the reason why most of the prompts that you see out there start with you are an AI system uh AI assistant is because we are giving it a system prompt. A system prompt is a prompt that we give an AI in general with an identity. So if you tell an AI you are this type of person, it will psych itself to think that it actually is that thing is that identity. So then the output will be better, right? It will be better in every single way possible. So for this example right here, imagine you had a sales call come through. You have to analyze the sales call and you have to use AI to do it. If one AI was given the hey a you were a helpful intelligent sales assistant that’s done this for 10 years versus another one that doesn’t have it this will be higher quality because it’s now given an identity that’s it analyze each submitted use sales call referencing only the mill closer framework yeah I’m just taking off the apostrophes because that’s not what the the actual thing has and now it’s really just about testing right so I’m going to press save and we can test it right here but before that I also have these model configurations so the response format will be X that’s fine then we have temperature and the higher the temperature the more random the model will be the lower the temperature the more strict the AI is with the rules that we give it okay then we have top which is the higher the top the more it will use different words the lower top the more it will use the same words right so it’ll start using actually the same words all so I’m going to test this I’m just going to drop in a transcript which I can get right here let me just copy Copy selection. I can paste this. Yeah, that’s good. That’s good. Paste this here. I can run. And you’re basically running this actual like agent GPT. You don’t have to run it through the automation. You can just run it here. So, reasoning, frame, control, and agenda. The prospect will inter extensive details about the business. The rep asked several questions. I don’t know if I like this too much. I’m not going to lie, cuz it also gives us null, which is a bit mad. Yeah, I don’t want any of this. Like, this is this is pretty pretty So, it’s not that good. Um, plus it took a lot of tokens to do it. So, I’m actually going to paste the prompt that I had before, just right here, uh, which is much shorter. And I said, you’re a sales closer expert. I’m going to do overview. with over 30 years of experience in teaching sales, you know the exact framework that will get a prospect to buy and are expert in reviewing people’s calls and so on. Then I give it my context and then rules and guidelines. Now the important thing here and the actual use case is that the this will not be the CEO but most likely right it will be his sales team that does calls and then you review the calls using a GBT here and then you give feedback on the calls so they can actually get better and that’s literally it. So let me paste this again the the actual call. Let me go back to I can copy this. Copy selection. Paste this here. Run. And now it should give us a shorter answer. Opportunities null. Okay. Let’s just see how it looks like on the actual automation. I’m not going to judge here. So, let’s just see what it looks like. But I like this more cuz it’s it’s uh it’s shorter. And it also seems like it’s a bit more random. So, let me turn this down a little bit. Let’s do uh eight. Let me try this again. And this is all about testing, right? So theoretically, you won’t have the actual answer like in your head. We just have to test. So by putting it lower, I’m saying, hey, you can’t don’t be so creative, right? Like just follow the framework, follow the prompt that we give it, and it’s actually better. Well, I don’t know if it’s better, but it’s giving us Yeah, it’s giving us a better answer to be honest. We’ll just put it to test in the automation. We’ll see how how it does. Cool. I like the I like this one right here. Sample script experts from the next call. All right. Now that we have this, we can now connect this to our N10 workflow. So all we have to do is go to plus look for open AAI and then usually you actually message a model but in this case you want to assistant to create an message an assistant. There you go. To connect your OpenAI you have to go to get the API key which you can get from platform.opai.com. Go to dashboard. Go to API keys. Press create a new secret key. So any test create a key. And then you can copy this and bring it back here and put m 19th of October. Save. Now you have the connection to your account saved. And now the resource will be assistant. The action that we’re taking is messaging and assistant. So we’re doing the same thing that we did before here. We’re just doing it automatically. And now from the list, we want to uh get the sales coach. That’s it. Bear in mind that when you make an assistant on this project and then you make an API key on this project, you will not be able to see this assistant here. So make sure that you make the assistant on the project where you also get the API key in. Right? That’s important. So you can see here I got the API key from this project and intent test. Then we have to add the user message. So the user message will be uh not chatter node it will be defined below because we’re defining the user message. If I make this bigger expression make this bigger I can copy the prompt and I can say your task is to give feedback on this call by looking at the transcript. Uh rules make the feedback concise and very tactical pointing out exactly what I could have done better on the call. Provide specific quotes in the call when given feedback and remove this right here which is typically what it gives us um when it sources the actual data or the the text. That’s it. And then don’t use markdown formatting because the next step is Slack and Slack doesn’t have marked on formatting. Uh if you don’t know what markdown formatting is, it’s litally this heading one is this. Then we have heading two. But it doesn’t actually this is great if you have like some softwares that read markdown formatting. So it wouldn’t actually output this. It would just output the heading two in the format of heading two. But in this case, we don’t have it with Slack. So it’s fine. And now this is finished. So make this green. And the last thing is send a Slack message with feedback. Want to go here first. Rename this to sales coach. Let me actually run this so I can see how it works. This is now theoretically talking to this agent, not agent GPT and getting the answer. As you can see here, we have the output which is sales call feedback mill and closer framework opening report strength. Okay, cool. And now let me pin this. We can add Slack just the last uh node and we can message a channel send a message. To connect our Slack just go here to create your credential. You can connect your account and just log in. Literally just choose your organization that you have. For me it’s JM solutions and then you can allow connection successful. Go back to NN. You can put JM solutions. As you can see I already done it before right here. Have another one. Now the thing that we’re changing is a message or manipulating. The action that we’re taking is sending send a message to channel. If I go to Slack, I can see that all the channels I have are these ones which are all for testing. So when you make a Slack account, this is a free account as well. So you will have the free account. Just literally make a channel. So you can create a channel and you can name it call reviews or whatever it is. And this will be the channel that we use. Now bear in mind that the channel ID is also here. I believe it’s either this or this. I think it’s this. Um but we don’t have to use the ID. We can just simply select from the options because it will be call reviews and then it will be send a simple text message and the message text will be the output which is a feedback of the call. So if I press execute step we should now see that we have a um feedback. This is way too long. If I had to read this for every single call that I have, I probably wouldn’t want to take calls anymore. Um so we definitely need to say make it shorter. Yeah, I think it will have to be here. Um, rules. Make a concise without writing massive paragraphs. Not the best prompt, not going to lie. Um, so let me execute this step again. No, let me execute this step. Unpin. Let me execute the step. Now I’m running this. We have the output. Let me pin this. And let me test this again. Let me run this. If I go here, I can see that I have the Okay, that’s much better. You see how changing prompt can just change everything here. We control an agenda setting. Early in the call, you like the prospect, take the lead. I’m quite direct and I can just go cut straight to the chase. It’s true. Um, yeah. Cool. I I love the fact that they’re pulling in quotes. Like the code stuff is really really good cuz it tells you exactly what you said and what you could have said better. So, for example, says here when she said, “I just probably wouldn’t have the time to do it.” basically and you moved on to technical detail. Instead, drill down the tell me more about what not having the time is costing the business. Where have things broken down or gone wrong because of this? Not bad. Not bad. Um, okay. So, we have the full exact framework that we want. Ideally, I want to see the name of the call at the top. So what I can do here in Slack is I can go down to get a transcript and I should be able to see the name of the call right here title and then you can say breakdown feedback. And now if I execute the step I can now see that I have basically the same thing which you can now use and we have the full breakdown. Hey, in this video I’m going to show you step by step how I built a lead generation system inside of Naden that allows us to scrape thousands of leads using Google Maps. Then we extract the URLs of the websites. Then we look for the emails inside the websites before adding it to our Google sheet database which allows us to then reach out to them and get business. All right, so this right here is a system. I’m going to run it from scratch. We’re going to walk through how it works. The first part is scraping a URL which is a link of Google Maps. Now, that’s a link that you typically go to Google Maps for in case you want to cold call or cold email. And what this will now do is it will extract the URLs, which is the the websites that are in here. It will remove any duplicates. It will filter the ones that actually have a URL, like a real one. And then it goes here to scraping the website, finding the emails of each website, and then at the end, after having scraped every single one that’s in the Google Maps URL, it will add it to our Google Sheet database. And then once it’s scraped every single URL and emails inside the URLs, then it adds them all to our Google Sheet database. Or we can see here that we have 25 emails, right, out of 32 websites that we scraped. And so these right here are all the emails that we can now use to run our cold outreach. Now, cold outreach just stands for reaching out to people who are cold, who have no idea who we are. So what I would do after this is hook them up to an email sequence uh software which means that there’s some software that allow you to write emails automatically to each person and so that you just run an email campaign automatically and you can use the system every other day uh to scrape new leads to scrape new emails and then reach out to them. All right, so let’s go through the whole system step by step and show you how it works. The first part is the Google maps data extraction. So if I go here, we’re running this manually right now, but it would typically be a what would it be on on schedule because ideally we don’t want to go to any to have to run this manually every single time. So we use something like this which allows us to be able to run the system every day or every second, minute, hour, days, weeks, months. It has very custom formulas. So we can put this as an automatic first step. But in this case, we have this manually. Now the real first step to why this is possible. So, if I go in here, we’re using a HTTP request. Now, HTTP stands for hypertext transfer protocol. Yeah, there you go. Hypertext transfer protocol, which is a very fancy word to say, hey, we’re taking a URL like this. So, let me just copy this and paste it in Google, which is literally us going to Google Maps and putting agencies in New York, which are all the agencies in New York right here. And we are scraping this, this, this, all the websites that are here, all of them, right? We’re going to each one so you don’t have to essentially. And so the HTTP request allows us to be able to get the method is just what are we doing in this case? We’re getting information all of this, right? And if I go here and show you exactly how this actually works to inspect on the right hand side, this is what it’s scraping the HTML behind the page network. There’s a ton of stuff, a ton of different little codes and language here that allows the HTTP request to be able to extract the whole information out of this page which then is useful for us for the next steps. And as you can see here, the data which is the output like what is the thing that this the system is giving us to start with is just this right doc type HTML and there’s a ton of stuff here. So I go to JSON which is the way that you can also represent this. It’s a long long JSON string which again is the JSON not JSON but is the HTML behind the actual website right which you can then use. And by the way, if this is the first time that you see this node right here, HTTP or maybe you never used it before, then check out this video up here where I show you the fundamentals of how it works. All right, now that we have this, let me pin this because now the output is just this, right? HTML. We use a code node, right? Again, we’re coding now, but we’re using a JavaScript code to be able to turn this long, long HTML into this, right? Which are all websites. If I go to schema, I can see that we have 229 items, which means that it found 229 websites. For example, we have schema.org. And we have a ton more, right? Let’s let’s go https fontsgatic.com. This is a invalid URL, right? For example, and so what this does, let me paste into chatgvt. That’s usually what I would do if I didn’t know what the code did and say, “Can you break this down into one sentence explain what this does?” Typically, the input is the HTML, which is the long string of HTML text that we get and we take the first input JSON. We find all the website URLs using regular expression. So, we call this regex. is just a a fancy way to say that we let’s say we have a long text and it finds things that are like prominent right so for example every website that we know has https semicolon slash so it finds all the websites that are within that reoccurring sort of text right and then it extracts all of them and then it returns them as a list of separate JSON objects and that’s essentially what it does because again here we have these right so it extracts these which it finds it knows because well sort of every website has https And then it has com orit or whatever depending on what country and it leaves these alone which are not websites. We want to make this run once for all items and we want to use JSON which is JavaScript object notation and then we’re just giving it this data right which is this first.json ddata and we get this. Now once we have this we now have a list of 229 websites that we can now use to be able to scrape. Right now, as you can see here, 229 websites entered this new node, but 34 only went out. It’s because we have a filter here. We filter by the URLs that schema.org, right? Which is not a real website or Google websites or GG websites or Gstatic websites. These are not websites that we can scrape that have emails in them. And so what we do here is we say the website does not contain, right? which is a string does not contain because string is just saying hey it does not contain within the text schema and it does not contain Google and it does not contain gg and gstatic because these are the signs that it’s not an actual website for example so you can see here we have all the ones that are invalid I go here https gstatic these are all invalid websites and so we don’t want to script those websites we only want to script the ones that are actual websites for example this right here go here and I can see that this is an actual business and that’s the ones that we use for the next steps. So we have this filter step right here and then once we have 34 websites that are actual websites that we can scrape we are removing duplicates which means that we are taking a list of 20 for example like these and we’re looking hey is there any duplicates in the actual list. Well, as you can see here, yes, we have this, this, that, that duplicate, and these three so on. And so we just take them. We say, hey, remove items repeated within the current input, which is this. And we want to compare all fields. And this is the output that we get. We get a list of websites that are actual websites that are not repeated that we can use to then extract the emails from. There we go. Going to pin this. I’ll pin this as well. Now, this step up here actually doesn’t have to be here. It’s just for production, uh, sorry, for testing because we’re limiting the amount of items, the amount of websites that we’re sending through just to test. But you could delete this and have this pass through all the items from remove duplicates. But here we have the um, we’re basically saying, hey, only let 10,000 websites through as a limit. And now, this is where we start the scraping. Now, so far, these are nodes that you’ve probably never seen before in an actual automation together, right? The HTTP code, uh, filter, remove duplicates, and limit. And we also have the loop over items again. So we script the websites. We extract the URLs of the websites. Then we go here and we filter and we say hey is this a Google website or is this an actual website. If it’s an actual one then we send it to the next step which basically takes the whole list. It removes all the duplicates and then we do here is now we go into the process of scraping. Now scraping just means that you go inside. So let’s say I go to uh let me go let me take an example here. custom staffing. There we go. This one right here. And what we’re doing here is we are extracting all the text which you can find here. So every single website that you see in the internet has HTML. It’s consisted of HTML which is why we’re able to put these buttons, make this orange, make this white, make this blue, right? We’re able to make websites not just a Google document, right? Make them look pretty. It’s all HTML. So what the server does it just goes here and extracts that to be able for us to go through the next step which is again going down the loop way which is just looping so going through each website over and over again and we’re only sending one item so one website through at the same time. So we send one item which is what I said we then script the website using just a simple HTTP again get request. So we’re getting the whole HTML of the website here. We just drag this across. So this is all the code that we spoke about. And one thing that I also added here is the ability for the workflow to continue even though there’s an error. Why? Well, is because some websites when you scrape them, they don’t allow you to scrape the website. As in there’s a there’s an encryption that that says, “Hey, this is private. You need a password or you need some sort of authentication to get inside. And if that happens, this will error out. It’ll be an error.” So what we’re saying, hey, you can still continue the automation even though it might fail at the same time. And so what we do for the next step after we extracted all the language behind the website is we wait. Now the reason why we wait about yeah 1 second is because of the fact that we don’t want to run into any rate limits. And rate limits usually happens when you script websites over and over and over again really really fast. So you want to give it some room to breathe. 1 second is enough. Um you can put two so you’re able to make sure that you are actually able to script all these websites. And then what we do here is we go to a similar sort of node right here. Well, it’s the same node, right? But it’s a similar function. And we extract the emails. So the input is this, which is the data here. So this right here, this this this whole thing that you see that you probably get confused about. This just says, hey, this is the typical way that people write emails. Okay? And the email is usually text here, right, before the app and then gmail.com and then something.com or something. And so what we’re seeing here is this. We’re saying, hey, we’re basically looking at patterns. So every email usually has these characters before the ad, these characters after the ad, and then some sort of text. And so that’s what we extract from the website to then get the emails. And sometimes it cannot read properties of undefined reading match, which means that it didn’t find it. But if I go here to say 21 so on, you can see that it found a ton of emails from the same company that it uses. And so again, we’re using code to be able to extract all the emails from the script of the website. So from the HTML, from the language behind the website that we can then do for every single website that we have. And when this is finished, we then send it up here to wait again. We give it 5 seconds just to give it some room to breathe. And then we have to filter out the websites that don’t have any emails. So we’re saying, hey, this is a JSON email right here. If this exists, then send it through. If it doesn’t exist, then don’t send it through. In this case, you see that we had uh these emails come up and the emails that didn’t come up were these ones because we couldn’t find them or it was just yeah, null just means that there’s nothing there. This just means that it was an error that we can’t read the property and we’re only keeping the ones that we can’t find right here. Before taking these emails which are in an array, array just means that it’s in a way where we have different information inside the information and we’re taking this block and we’re splitting it out. Right? So what this means is that we’re taking all these emails and we’re processing each one individually. Okay, that’s what an array is. Array is just something that has this inside is that you go to the grocery store and the groceries is banana, strawberries, fruits, xyz. These is the different items within the grocery list. We’re splitting it out into each one. So you can see now we have 110 emails, different pages, right? they can then send to another remove duplicate because as you can see here there are some duplicates as well within the emails and so we want to remove those and so out of 110 emails we only kept 25 which I go in here I can see that it’s the same exact setting remove items repeated within the current input with the input is this and this is the output list of emails which you can now use to be able to add to our Google sheet database right here which you can then use for email campaigns. Now, can you use Apify to do all of this? Yes, but Apify isn’t free, as in you still have to pay for it. Um, I guess it is more reliable in a sense, as in Apify has their own scrapers. You can add more stuff there. But just the fact that we’re able to put a URL right here and we can change this to agencies in I don’t know, Canada, right here. agencies is in Ontario. That didn’t come up. Agencies, let’s do agencies. Again, you can do agencies in a specific location. And then these are all the agencies that it will use that it will extract the information from. In this case, we’re in New York, the one and only. Um, and this will be the thing that it will extract to then be able to then get all the emails. Now, one thing that we could do actually is this. We could instead of running this on a daily basis because it would extract the same exact websites. Now that I thought of it, you can have another page here and a page would be websites or businesses to scrape and you can have I don’t know like agencies in New York, agencies in Canada or whatever like flooring businesses. You can have a ton of businesses here that you can use and then you can hook this up. So if I go here, I can press plus. I can then look for sheets, get rows, look for our Google sheet, which is a emails. It’ll be sheet one, I believe. No, sheet two. Let’s call this businesses so we know we can keep track. Okay, be two. And now we can run this. So if I run this here, I can now get these agencies in New York, right? And so what will happen here is that we have to hook this up to the Google sheet to the actual Google maps. And we know that everything that goes after the search is something that changes, right? Because Google Maps search everything behind here because everything before here is just static, which means it’s the exact same for every single URL. But here something that we can change and so what we can do pretty high level but we can take this we can put it here right and watch this we can go inside I don’t think I’ve done this before but uh we can press plus and then replace all um space spaces with plus why did I do that is because apify or not aify http request don’t allow you to have spaces and so as you can see here we had so agencies in New York we had agencies plus in plus new plus York and so that’s what we’re doing here we’re taking this we’re saying okay make it so that in the spaces we only have plus and now if I run this let me go here okay I need to unpin this though if I run this now this should work from the Google sheet three went through all three each one individually that we can then use to go through the whole system. So where was I going with this? Well, I was going to say that you can have a list of businesses to scrape here and then at the end of the the actual thing you can have a update a row which is updating here and saying added and you can put yes and then now here you can also put a filter and says hey don’t send the ones that have yes in here. So you always send the ones that are new that you haven’t scripted before. You can have a whole list right here. Congrats on finishing the ultimate course on Nitn which took you from a real beginner in automations in general and Nitn to someone who’s actually able to build automations for themselves and for other businesses. We answered the question of what is automation and then going diving deep into the exact tool which is Nitn which allows us to build automations step by step. Then we looked at more of the theoretical standpoint to automations and understanding how softwares speak to softwares along with actually building AI agents, building workflows, and then putting them into practice by building tangible systems that you can implement into businesses. And I hope that now gave you a lot of use cases that you can think of when going out to businesses or even for yourself to implement. With that said, I really hope that you enjoyed this Nitan course and I recommend that you keep this unnecessarily long course of Nitan and automations in a back pocket whenever you want to go back to it. With that being said, I hope you found value from this video and I’ll see you in the next ).
(The AI MUST replace ‘$X,XXX’ with a high, specific, and credible dollar amount (e.g., $1,500, $3,000, $5,000) and ‘Y Days’ with a short timeframe (e.g., 7 Days, 10 Days, 30 Days) that best suits the monetization potential of the transcript topic.)
Topic : Welcome to the most comprehensive NATO course where I take you from a real beginner in AI automation to someone who’s actually able to build automations and AI agents for themselves or for other businesses. And in case we haven’t met, my name is Mikuel and over the past 12 months, we’ve helped over 40 businesses implement AI and automations and taught over 20,000 people in the process. All starting with zero technical knowledge. So, we’re going to go through everything from understanding what is AI automation to setting up your own end to end account, understanding how to build stronger and faster, more scalable AI automations and AI agents, and finally actually building systems step by step. By the end, you’ll be an AI automations and AI agents expert and you know exactly how to build systems that drive real business value. So, the course itself is split into six different modules. Module one is getting started with NAT foundations. We’ll go through exactly what automation even is to understanding how you can set up everything within Nitn and build your first automation. Module two is core niten foundations using automation logic and APIs and walking you through exactly how automation really works in the back end. Module three is AI agent fundamentals and really understanding how AI agents work. Module four is building smarter AI systems using frameworks and prompts which allow our automations and AI agents to make sure that everything that we build is actually scalable, tangible and can actually be implemented into a business. Module five is real world AI agent projects end to end builds showing you exactly different use cases within a business that you can implement AI agents and showing you how I build it step by step. And module six is real world AI workflow projects end to end builds where I show you exactly how we now not only just use AI agents but use entire workflows to be able to implement into a business and showing you how I build different use cases step by step. By the way, if you want access to all the resources that we’re going to be talking about in this video, plus being part of a community of over 3,000 people who are actually building automations every single day and growing their own businesses. Check the second link down below. I’m going to leave all the timestamps down below in case you want to skip through some modules or go to the direct part or even come back to this video. Uh because I know it’s really long. Um so without further ado, let’s dive in. All right, before we jump into Nit, let’s talk about what is automation. Automation is the process of using technology to do tasks without you. Whether it’s AI agents, whether it’s workflows, whether it’s all these stuff, that’s exactly what it is. It’s using softwares to be able to do things without you. Now, every day we all perform many regular ad hoc tasks. Ad hoc just means it is repetitive. Whether you are a working professional, whether you are a business owner, whether that’s in sales, marketing, operations, finance, or business management, we all have different parts of the business that we have to do because that’s what drives the business forward. But the problem is these tasks are repetitive, so they happen every single time. They’re notori. They’re low value addition. So you do them but they don’t add that much value into your day and most importantly they’re effort and timeconuming. So you do them they take a ton of time. You don’t want to do them. They are repetitive. They’re very easy. And so the solution is automation. Now you might not be fully conscious of it. But automation actually plays a big role in our everyday lives. For example, when we have a meeting in our school community, so we have two weekly calls. One is a weekly huddle, the other one is a bip coding session. when the meeting is 1 hour away then it sends a notification over email to my school members or Netflix when you watch a certain type of movie then Netflix recognizes that. So it says hey he watched this movie that means he must like something else right and it gives you a recommendation that is automation because it automates the process of you having to find a movie that you like yourself or a coffee machine and you might be asking yourself how does a coffee machine even play a role in this? Well just hear me out. Whenever a coffee machine finishes making the coffee then the timer finishes and lastly chbt right because when you give a prompt to chbttt then it gives you the output right now chbt is a bit different just because it’s non-deterministic so nondeterministic that means that one series of input so you can say hey can you do this for me and it does something else you can say the exact same thing and it might do it differently next time right because you can determine the output that you get but at the end of the day everything is automation now I don’t know if you noticed the way that I was actually explaining these concepts but we actually use a very simple principle which is if this then that. So if we have X then it goes to either A and B. If it’s B it go it goes to either E and F. If it’s A then it goes to either C and D. And that is exactly how automation works. Everything and everything is built on logic right whether you’re building code whether you’re using automations whether you’re using niten make.com zaper power automate all these tools they’re all built on logic. If this happens or when this happens then you do this. And the question then becomes, what can automation do for you? Well, as a business owner or an individual, it increases productivity and efficiency, which means that you can do more with less, more leverage. You save time to do other things, right? Because automation for a business means that they can now focus on other areas of the business. Has an increase of availability because automation doesn’t need holidays. They don’t need any emotional support. They’re always there working 24/7. You can scale with less resources. And by the way, we’ve come to a point where automation allows us to be able to build a oneperson company as you might have heard. Uh but it’s all because of the softwares and technology that is out there all because of automation. And it’s more robust and less errors. Especially when it comes to the repetitive tasks that you have to do every single time. Because if you are anything like me, when I do something over and over again, I get tired and my quality of output goes down, right? And so with automation, it’s consistent. And with that said, let’s jump into N8N. All right, so this right here is N8N. Now, all you have to do to get to this page is go to nitn.io and you’ll have this dashboard. Now, as you can see here, is a flexible AI workflow automation for technical teams that allows us to be able to build automations without needing to know how to code. Now, the automation can vary, right, depending on what you’re using it. IT, security, dev, sales, you can do a bunch of stuff within this exact platform. And it allows us to have so much flexibility around what we build as well as plugging it to over 500 integrations, which is a bit lower than other platforms, but it still allows us to be able to speak to different softwares altogether. And also, it has the ability for us to code when you need it, the UI when you don’t, which means that you can go either way, which is why I mentioned that it’s flexible in what we do because it’s great for two kinds of people. All right. So, if I go to pricing right here, I can see how much we actually have to spend to be using any. Now, N10 does not have a free plan on the cloud version, right? Cloud version. Now, if you’re a beginner to N10, you have probably heard about self-hosting versus cloud hosting. Cloud hosting just means that you just use N10 within the cloud. Literally just here on Chrome, on Safari, whatever it is. But we do have the option to self-host, which means that we create our own server and we self-hosted in our own server. So, we don’t have to pay. Now, don’t worry. I’m going to show you exactly how to self-host as well in the next few videos. So, you’ll have that, too. Now, for the cloud hosting version, which is the one that most people use. We don’t have a free plan, uh, but we have a starter plan, pro, business, and enterprise. Now, most people use the 24 plan, which is, I believe, about 30 bucks. And the way that Niten actually prices us is through work for executions, which I’ll speak about in just a second. But we do have the ability for us to start a free trial with no credit card required which allows us to test any for about 14 days before we have to upgrade to a paid plan. And here we have one shared project, five concurrent executions, unlimited users, 50 AI workflow build credits, and forum support, which is more than enough for what we need. Now, if you are building Nitan for a bigger company and you want more workflow executions, then you’re most likely going to be using the pro plan, which is €60 a month. Now, honestly, this is not super cheap, but when you think about the concept of how they actually price their automations, it is much better than any other platform that I’ve seen before. And same thing here, but it has a bit more stuff when it comes to the actual plan. All right, so for you, just press start a free trial right here. Then you can start filling out the form and then you can press start a free 14-day trial. Go through the onboarding questionnaire right here where they ask you a few questions just so they get to know you a little bit more. Okay. podcast submit. And you can also invite members into your workspace. Let’s just press skip. And now our workspace is starting up. Now, I do really like the onboarding um sequence that Enit has. Is really, really quick and is really, really easy to follow. Now, because you’re watching this video, there’s no need to press this video right here cuz I’ll show you everything that you have to know. Uh but it is a pretty good starting video as well. And this guy is a legend. All right. All right, once the workspace is ready, just press start automating, which will take you to a dashboard that looks like this. So, welcome to Nintend. Now, on the top, you get to see that you have 14 days left of your free trial, and you have a,000 executions, which is again the way that N10 charges you. And then on the top, you have upgrade now, which is a button to upgrade. I’m going to press X, and now we have this page. All right, so on the top right here, we have a dashboard that allows us to visualize the numbers. So, I can actually press inside each one and be able to see the different graphs. Now, production executions just mean that hey, how many executions? So, how many times did our automation run every single uh 7 days? How many times did the automation run but it didn’t work? Then out of all the executions that didn’t run in the past 7 days, how many of them did not work, which is this percentage right here. And then how much time did you save or how much time did the workspace save with these automations in place which is good to have but at the same time it isn’t super accurate because to understand how much time you saved for a company or for yourself any needs to know how much time did you take in the first place to do it right because then you’re saving them that much time and lastly runtime. So for how long are the automation running now right here and on the top as well you have the ability to create a workflow and this is how you start from scratch. This is how you start building. Now before we get to that we have workflows here. Then we have credentials right here, which is the ability for us to be able to add credentials for the different software APIs. Now, if you have no clue what APIs are, it’s how automations are basically happening, how they’re existent. I’m going to go through APIs in much more detail in the later stages of the video, so don’t worry. But here, we’re basically adding the username and password for each software. So, we always have it here. We don’t have to re-upload it again. It’s always a repository of passwords. Then, we have executions. So we can see all the executions which is hey this automation just ran it logs it so you have everything logged and uh secured here which is great. And lastly it’s data tables. Now I’m going to dive into data tables in this module I believe or next module um where I show you exactly how you can use data tables how they’re powerful how they’re better than using tools like Google Sheets or Air Table or Notion. So we’ll dive into that. Now without further ado let’s press start from scratch or you can press create a workflow. All right. And once you get to this dashboard you’ll be introduced with two different options. The first one is adding a first step which is adding a first step manually right here trigger which is the first step of the actual workflow automation or you can start using build with AI. Now build with AI is only something that depending on when you’re watching this video it only came out about a month ago. But when I press this button right here it takes me to this right page right here. Now the good thing about any is that it has two different types of support. It has the support where you can ask any questions about anything and you can simply type any message here and it will give you an answer sort of like an annot coach that helps you when you’re building your AI agents or automations. And then we have the feature which is build. Now build again is something that recently came out but it allows us to actually give it a prompt. So we can tell it hey what would you like to automate? And it actually builds a thing. I’m going to just do this real quick so you get to see exactly how it looks. I’m going to say AI agent that drops my emails and we have only 20 credits a month to use. I want to press go. As you can see now, this is thinking it’s searching through the nodes. I’ll explain exactly what a node is. Essentially is a step in an automation. It’s getting the node details. So, it’s understanding exactly automations in any understanding which steps to put together and what. On the left hand side, you get to see that this is working. Now, you get to see that it’s adding the different steps of the automation. And the best way to describe this is that it’s searching through a puzzle. It’s understanding exactly what pieces do I need for the puzzle and then it’s getting the pieces and then it’s putting the pieces together right here and then it’s connecting making connections inside those pieces which we have right here. And now we can start using the automation. Now I’m going to delete this and start from scratch because I want to show you exactly what it looks like without the build with AI. As you can see now we have no option to build with AI. We just have the first step. So when I press this I can see that on the right hand side it asks us what triggers this workflow. Now a trigger like I mentioned before is the first thing that starts the automation. Now in N10 we have the ability to trigger manually. So we can manually trigger this. We just press this button right here which is execute workflow which means that we’re starting the automation and it executes manually. We’re able to trigger from an app event. So something happens within any of these apps we can get notified and then it starts the automation. And there’s about 500 apps here. a bit lower than other platforms but N10 is constantly adding it here which is great. We have on a schedule. This is in case you want to start your automations maybe once a day or you want to run it once a week or every other Tuesday on a July. You can do this. You can do on web hook call. Now a web hook is something that I’m going to explain in a later stage of the video but it’s something that we use when we want to get notified when something happens. We have on form submission which is for us to be able to use forms inside of any end so that when someone submits the form it then sends us the information inside the form and then we can start the automation. Then we can do when executed by another workflow. So we can actually have a workflow that calls another automation right. So workflow calls another workflow and then brings the data back. Then we have on chat message in case we want to create a chatbot within any then we have when running evaluation. So this is in case you want to test the performance of your workflow or of your AI agent and then you can do other ways as well which in this case it’s using other different service. Now I will cover this in the later stages of the video but understand that a trigger is just the first step of the automation because let’s say we do it manually. Now we have the ability to then add the next steps. And so when we have the first step here the way that this works is that we have this connected to another step right here and I can choose the next step. In this case we have the ability to use AI in our workflows. We have the ability to use any applications, so any softwares, the ability to transform any data right here. The ability for us to have some sort of routting, which means that if we send the automation one way, if this happens, the other way if something happens and again all these things might look complex because you’re new to Nit, but trust me, they’re much easier when you actually put them into practice. We have core which is using code HTTP web hooks a bunch of stuff that you shouldn’t worry about now and human in the loop which is another feature that I’ll be explaining. So we have the first step then we have the next step. So let’s say I want to talk to notion or Google sheets. Let’s say Google sheets. Now we are introduced with Google sheets and these are all the actions that we can do within that software. Right? So with every software that we have, let’s say even Gmail, if I press on the actual software, I can see all the actions that I can do within that software. I can add a label to message, delete a message, get a message, get many messages. I can do a bunch of stuff within each software, which is where automation truly shines because it does the things that we don’t want to do or that we don’t have to do. And so let’s say I wanted to go back to Google Sheets. I can just press Google Sheets here. Action and app, which you find again right here, action and app. So in I can go Google Sheets I can choose the action that we want to take which is append the row and now we’re introduced to this page right here now every node has an input then has in the middle the configuration which is how do we actually set the thing up and then the output which is okay using the configuration here what was the output all right so I just made a Google sheet here that has name email phone number company row and address let me name this contacts now here if I go back to any the first step to building any kind of automation with different steps in the flow is connecting our accounts to these softwares. So we’re able to access them without us having to go to the actual software to do it. So right here you get to see on the top that we have credential to connect with which is just press here. You can create a new credential which means that you’re connecting your account and you’re introduced to this page. Now if you see ooth 2 service accounts allowed HTTP and you get overwhelmed don’t worry just sign in with Google. It’s just a simple login verification and you’re all good. I’m going to press the account that I want to connect to. You can press select all. So you’re basically saying, hey, I trust Nitn to have access to my Google Drive and my Google Sheets. You will get to this page which is connection successful. And you’ll be redirected here to Niten. I can make a name. So I can say Mikuel system account. So on press save. And usually what we have is also the date. And the reason why we add the name is because when you connect 20 to 30 accounts here, you want to know exactly what the account was. And so the only way for us to know exactly what the connection is is to name the actual connection. Once you have this here, now the resource is usually what is the thing that we’re manipulating. What is the thing that we’re taking and doing something with? In this case, it will be a Google sheet. The operation is always the action that we’re taking. So as you can see here, you have different options. We have create, delete, delete rows, get rows, update a row. You can do a bunch of stuff and in this case you have append a row which is create a new row in a sheet right here. The document is choosing the actual Google sheet which in this case is contacts right here. See how I just here and also what you could do is actually go to the ID or the URL of the Google sheet which I can find if I go here I can find in the URL here and the ID is usually right here and then the sheet which is a sheet within the Google sheet which in this case is sheet one. That’s a lot of sheet right there. Um, and finally, you have this right here. And so, this is where you start to map columns. So, again, what we’re doing here is we’re adding a row inside here. So, we’re adding a row into name, email, phone number, company name, role, and address. Which is why when I go back here, I can see that it’s asking us, hey, what are the different values that you want to send? In this case, for name, let’s just put James Arthur. Let’s do email. My email here, my phone number, my company, the role, and the address, so on. And now leave everything else as is. These are just other options that you can um sort of play around with, but there’s no need for that. And all we have to do now to actually run the automation is to be able to connect this to here. So this is saying, hey, the first step now is connect it to the next step. And so if I press here execute workflow, this should now start the automation and do the action append the row like we mentioned and adding these details in a new row. So let’s try it out. Let’s say I go to execute workflow. I can see that the first step executed. And we know this because it was all green check mark. And the second step as well. And if I go to my Google sheet, I can see now that James Arthur with his email, phone number, gem solutions, CEO in Spain was added to our database. And that right there was a full execution from the start until the end. Workflow executions from the first step until the last step. Now we can add another step which let’s say is Gmail. So I just type Gmail. I can choose a software here. And now I can choose the action. So in this case it can be send a message. And now we’re introduced to this page right here which is very very similar to the one that we had on Google Sheets. But the only difference now is that we have access to the previous we call them variables right because there are different variables here. And now we can use these variables in the automation. And that’s why we don’t call them variables but we call them dynamic variables because they change every single time. Because when I put name somewhere here and I run the automation again later if the name changes this automatically changes the name. So all I have to do here is do the same thing. So I can send a message which in this case is send an email. I can sign in with Google. I can choose my account. Select all. Connection successful. And now I can name this. Press save. X. And now we have connected our account to any. So now N10 is able to use our Gmail. The resource which is what is the thing that we’re manipulating again changing is a message which in this case is an email. And you can use draft thread label. You can do whatever. Operation which is what is the action that we’re taking. In this case, it’s sending, but we can do a bunch more stuff here depending on what you want to do. And then it’s asking us who do we want to send the email to? What is the subject line of the email and what is the message of the email, which is the email body. So now, as you can see here, when I pressed on two, it gave me the ability to drag an input field from the left to use it here. So now I can take the field from the previous step, drag this across over here, email, and have this be the variable that we use every single time instead of putting the email here, right? Instead of putting the email manually cut to5gmail.com, because if you do it this way, it’s going to be fixed. But if you take the variable from the previous step and I drag this across here, then only are we able to change the variable dynamically without us having to go here and change it manually ourselves. And so what we’re doing now is that we’ve just pulled in the variable here. We can do name. So pull this name here and say welcome to the team. And also one more thing that you start to see is JSON code. Right now, this looks very intimidating for someone looking to get started with automations and going into Nitn. But trust me, it’s actually quite easy because this code right here is literally just the variable here that we just pulled across. So, you don’t really have to know exactly what this is. But in case you’re wondering, we can actually hardcode it. So, we can do curly bracket curly bracket. This opens this up. You can do JSON dot the actual step from the previous step. So, you can go to let’s say email. And when you press email, it automatically takes us back in the same place as if I were just to drag this across. And this is great for us in case we want to reference any variables from the previous steps. And there’s a ton of variables and we just want to reference them really really quickly. We just manually hardcode it. But most of the times you’re just going to drag and drop. And then we’re going to ask the email type. So in this case, let’s just do text. HTML is just the way that you make your emails look pretty. We can say hey brother happy to work with and let’s do company right here. So now we’re saying hey brother happy to work with JSON variable which is company which is this name right here. We just don’t see JM solutions because it’s a variable right here. Now the good thing about N10 is that we can actually see the output. So we can see the actual variable before we run it which is amazing because now this gives us the ability to visualize whether it’s correct or not. So, James Arthur, welcome to the team. Hey, brother. Happy to work with JM Solutions, which is great. Now, what I can do is go back. I can go back here. I can change the email. So, let’s say this one here that I have, make [email protected]. And now, all I have to do is execute the workflow again from the start until the end right here. This now goes into Google Sheets and goes here. I can see now that I have the name, the email, and I guess the email changed, right? because we changed them manually in N10. The phone number JM solutions CEO in Spain. And as I showed you, it also sent the email. So if I go to my email here, I can see that we had a new email called James Arthur, welcome to the team. Hey brother, happy to work with JM Solutions, which is the exact same email that we added into our Nintend. And so now that we built this, I can explain exactly how the pricing works. So from the start until the end, right? When you are testing. So when we’re pressing this button and we are executing this, we’re not paying for it from the time that we want to set this live. So we don’t have to manually do it every single time. We can turn this on by pressing this button. So right now the workflow or the actual automation is inactive, which means that the automation is only running when we manually run it. When we go inside the platform, when we manually press this button and it goes here. But in the case for clients that you want to set this live, it’s sort of like this is just for testing. When you’re building automations, you’re testing here and there. And the lives when you want to actually set this live, it goes live. Now it works by itself and it runs through this at whatever interval you want. And the good thing about this is that we’re not paying for it when we’re testing, which is great because it allows us to be able to spam the testing as much as we we can because the way that they actually charge you is by word for executions, which is from here to here. As you can see, we have the green check marks which tell us that everything went good, which is awesome. Now, let’s say something went wrong, right? So, if I go here and I just create a new credential and I just save it. So, I just put a fake credential. Close Gmail account. This shouldn’t work. So, now if I execute the workflow, I can also execute it here instead of going here. I can see that now in the bottom, you can’t see it because my face is there. But if I just move myself here, I can see that I have problem in node here, right? Which allows us to see that we have a problem in our automation. And so this node right here, again, a node is just a square within any is a step in our automation. We can see that we have an issue. And it tells us the actual issue unable to sign in without access token, which means that the authorization, the actual account was invalid. And on the right hand side, you can also see if something went wrong, what is it that went wrong? And you can also ask AI, which is amazing because this AI is actually good. It’s not some sloppy thing that they just added into the software. It actually works and it’s pretty good. With that said, make sure that when you build automations, you always save right here on the top. And up here, you have the ability to edit. So, this is where we edit our workflows. Executions is where we get to see all the times that this executed that this ran, right? The first time it ran, the second time when we had more steps, the third time when we had even more steps, right? So we get to see exactly the previous times that are run. And then we have evaluations in case you’re running some more advanced evaluations. You’re testing your your actual workflow. If you’re building this for clients, you’re most likely going to use this, but it is not necessary to start. Going back to editor right here on the top right here, I have the ability for me to duplicate the actual workflow. So if I duplicate this, I have to rename this. And I can press duplicate. And this will now make the exact same workflow here. And then I have the ability to download. So if I download it now, I get a JSON file. And so the good thing about that is that this in the back end is all JSON, which is is all code. And so I can simply just press download like I showed you. And then you can press import from file, which allows you to import the automation into your own workspace. So if I go to a blank workflow, I can simply press this button right here. I can import from file. And now I can put the actual file that I need. And suddenly I have the actual automation which is imported into your my own account. And then finally, we have change the owner. So you can change the owner of the actual automation. You can rename the automation like this right here. And you can import from URL. So in case you turn the file into a URL, you can simply import it there. On the right hand side here, like we mentioned, we have the ability for us to add steps. We have the research. So we can command bars. We can actually search through the different notes that we have here. We have notes, which is a big part of Beniten because we can actually start documenting our automations. So I can go in here and I can say first step is manual and I can delete all this and I can put this over the automation which is great because when I want to give the automation to someone right I can actually give them an explanation of exactly how it’s working. If I go here I can also say this step allows us to be able to manually trigger the automation. Right? And so we have the text here and you can start to see how bigger automations and bigger workflows use this and it’s something that I use all the time when I have to give workflows in AI agents to my community members who are looking to get them and then start using them right away and now they have an explanation of what it is. Then we have right here focus panel in case you’re doing some note stuff here. We don’t really use this that much so don’t worry. Uh and finally we have AI which I mentioned is able to build the actual workflow. Let me turn this off. Which is able to build the actual workflow for us or is able to assist us whenever we have any questions about automations. Now, you probably might be asking yourself this question, right? Which is if we can build with AI, why are we learning this at all? It’s because AI only gets you so far. When something doesn’t work, how do you know if it doesn’t work? How do you know if it’s not good enough? How do you know if it’s not efficient? Which is where understanding the fundamentals is very, very important rather than relying on AI for everything. All right. So now that you understand exactly what automation is, how you can set up your own niten account, howen actually looks visually, plus building your first automation inside of niten. Now it’s time to go a level deeper because in the next module we’ll dive into actually understanding how automations really work. We’ll dive into APIs, web hooks, and how data flows within automations. We will look at credentials. We will look at transforming data and also understanding error handling. So if something goes wrong, what do we do about it? And lastly, understanding the core 17 notes that you need to know when you want to master N10. So by the end of this section, you’ll not only use any 10, but you’ll actually understand it. If I had to learn just one skill for AI automation, it would be understanding how APIs work because fundamentally they are the things that allow softwares to speak with other softwares. And so once you understand really understand how APIs work, you’ll be able to use nitend zapermake.com Power Automate all with no problems without getting stuck and without any limitations. And the problem is most people skip this. They go straight to the platforms to build automation step by step. And when something breaks, they have no clue why. So in this video, I’m going to break down exactly how APIs actually work, how to read an API documentation without freaking out, and how to build your first real API request inside of Venet. Let’s dive in. All right. So, API stands for application programming interface. Very fancy term that nobody even knows the meaning to. Uh, but what it means is the ability for softwares to speak with other softwares. Now, think of a waiter in a restaurant, right? This waiter has the chef and he has the customers. And between the chef and the customers, there’s a series of actions that happen, right? So, take the order, bring the order from the kitchen, they deliver the order, make the order. There’s a whole repetitive loop that happens over and over again. And so that is the exact same when it comes to APIs for softwares where we have one software here, one software here and these two softwares communicate to each other through a series of requests and responses. So request in this case would be to make the order. The response would be the actual order being delivered to their table. And that is the exact same when it comes to the softwares. And so fundamentally the waiter in this case is the API and the chef is one software and the customers are other softwares. And this right here is the thing that allows the softwares in make.com and it end to speak to each other to be able to have a sequential order. So we send data to a place and get something back. And that’s how automations and AI agents are built. Now what can APIs do with software? There’s a few things that APIs can do. We call them requests. So requests are just a way for the server, the API server to send information to the actual software itself to then create an action. Now the first thing it can do is post. So this is when any type of new record is created in a software. So this is like making a Google sheet row. It’s creating a contact on ClickUp, a contact in Hopspot, it’s um you know sending information to OpenAI to make a LinkedIn post. This is a post request which is sending information from one place to another. Then we have get. So get is extracting any details from any record from the software. So let’s say someone filled out a form on your website. You wanted to get the information from that form and then use it for whatever you want. Right now you’re getting information because the information is going from somewhere else to us. That’s getting information. Then we have putter patch which is updating records uh in a software. So let’s say John’s name is not John anymore. it’s James then you use a put a patch request right so updating information and then we have deleting so you can’t see this fully but it’s deleting a record from a software so let’s say we had a Google sheet or maybe a contact we just want to delete the row or delete the Google sheet or we just wanted to delete the contact that is a delete request so again post is to send information get is to get information then putter patch is to update information and then delete is to delete information from somewhere now I’ll share a story here so I was on a call with a client a while back and she asked to automate different parts of her onboarding process. And she used Zoho CRM as the CRM, which by the way is just a place for companies to store information uh to be able to send information to Zoho to make a new contact whenever someone filled out a form. Now, the problem is I had never used Zoho CRM. So, I had never used it. I didn’t know exactly what you can and cannot automate with Zoho CRM, which is why we get to the next part, which is finding the information of what you can automate and cannot automate within a software. So all I did is a simple Google search and I searched up the software name. So in this case it can be Zoho CRM Monday, it can be openi, it can be whatever it is API documentation. And this is where we get to the fundamental concept of an API documentation which allows us to be able to see exactly what you can automate within a software and how to set everything up. Now here’s an example of an API documentation. This is Apollo’s API documentation. And at first you think this is way too complex. But the reality is if you understand how this looks, all the others will be very very easy because they all follow a very similar structure. So the way that an API documentation works is that on the left hand side right here, you get to see all the types of requests. So this is enriching people, it’s searching people, searching organizations, creating an account. There’s different things that you can do within Apollo’s API, which means automatically without having to go to Apollo, right? And so each action right here, so each thing that we can do has a corresponding type of request that follows through. So people enrichment in this case would be a post request because we are sending information to the server and then it’s enriching the person. Then we have let’s say organization enrichment which is a get request or update account which is a put request right so we have different types of request and different actions that we can do using Apollo automatically within our automations and the only way to know is actually just looking here. Now let’s say we go to people enrichment. So this will now look at what you can do within that specific request which in this case is enriching people. And this request right here has the type of request and then has a URL. Now the URL is something that is very very important in our API requests because they are the thing that allows us to be able to send the information the right way. It’s sort of like going to google.com, right? The server knows that you want to go to google.com because because of the request, because of the URL. And so this is the exact same because this allows the server to know, hey, he wants to use Apollo and he wants to enrich people. Then in the middle here, it gives us a summary as to what it is, how it works and so on. So these down here are basically saying, hey, this is the type of request. So right here, this is the information you have to send to the server to call the request to make it happen. In this case, it’s enriching people and you have to send the first name and the last name, right? And those are the details that you have to look into understanding exactly what to send to the server. And on the right hand side, you get to see the um the actual setup. So how can we set this up in our automation platforms? And quick side note, the reason why we look at the API documentation is because here if I go to Apollo, I can’t find it. Which means that now we have to set up the API request using the documentation. And so the left hand side is the type of request. The middle is to show you the exact request and sort of to give you a summary of what it is and what it looks like. In the right hand side is saying, okay, we have the request, we have the summary. Here’s how you can set it up. Now, the main thing that we have to look at when we have to set up an API request through an API documentation is the curl. Now, the curl is the thing right here that you see which basically gives us a heads up or an understanding of how the request actually works. And if I go to any time right here and I go to HTTP request, which is the thing that we use to make the actual request, we can see that we have a button right here, which is import curl. And this will be the place where we import the curl, which is the one that we saw on the API documentation. And then this basically makes the whole request for us, which I’ll show you in just a second. Now, this will make much more sense once we actually build the API request, which is super damn easy. So, don’t worry. Uh, we’ll go through it step by step. But now you got to see what a structure of an API documentation looks like. And this is for a software called Apollo. Now if I go to the second API documentation, this right here is for a software called Instantly, which is a cold email software. As you can see, it follows the exact same structure. On the left hand side, we get to see all the actions that we can take. On the middle, it tells us this is the summary or this is what it is. And these are the different variables that we have to send to the server in order to make the action happen. And on the right hand side, this is the way that we set it up through a curl, which is in code, right? But again, we don’t have to know how to code. It’s just telling us the way that we have to set things up. And usually the curl in this case has a URL, which is the action that we’re taking, telling the server, hey, we want to enrich leads. We want to send this information somewhere else. And then we have the headers, which usually are a way for the actual server to authorize that this is your account. And the way it does that is through something called an API key, which we use for tons of things. OpenAI API key. We use claw API keys. Perplexity API keys. It’s just sort of a way for the server to know like a password to say, hey, this key is only for me for my account. So you can take action on my account and you know it’s my account if it’s this key. And then we have content type application.json. Sometimes it’s there, sometimes it’s not. It’s just a way for us to tell it to format the information in the right way. And then D, which is the body, which are these parameters. So these variables which we sent through to the actual server to make things happen. And if that confused you even more then just wait until we build the API request cuz it will be very very easy. And then the last API documentation will be ClickUp. As you can see I’m just showing you the example. So you get to see the reoccurrence in the structure of an API documentation which is the one right here. On the left hand side we have the types of requests. In the middle we have the summary, the URL, the type of request which is post uh the title and then here will be the parameters that we have to send through to the server to say hey here’s what you have to do here’s how to do it and so on and on the right hand side this is the way that we set it up which is the exact same and as you can see the thing that we really care about is the curl request because this is the right hand side part of these API documentations which allow us to be able to know exactly how we set things up and if you read API docu documentations. A lot of the times or most of the times you will see something that looks like these. These are three random API documentations and they all follow the same exact structure. So let’s set up the API request. Uh let me give you a use case. Let’s say we want to get the weather of a country or a location. Right? If you go here to weather, we can do the open weather map. But there’s actually this other software which is called the weather API. So if I go here to weather API, there’s this software right here, free weather API, which isn’t listed here, right? And this is when we start using the HTTP request. Okay, so HTTP request again like I mentioned before is on the case where we can find the exact software for the specific action that we’re taking. So we actually make our sort of custom API call which is saying, hey, even though we might not have an end, it doesn’t mean it’s impossible, right? we can still make the actual request which is where the HTTP request comes in. So all I have to do is go here put HTTP and then we get to this page. The first thing is the type of request whether it’s a get, delete, head, options, pat, post, put, which we went through just now and we have options head which I have never used so probably not something that you should know about. Uh then we have the URL which is the action that we’re taking uh which we get from the API documentation. Then we have the authentication which we’ll go through in just a second. And then we have the parameters which I mentioned will be here. And then also the body which is this right here right or you can also use JSON uh which we get from the API documentation. Now we’ll have to set one up so you understand. And let’s go to the free weatherapi.com. We get here and now I’m saying hey I don’t have it within any so I really have to go to the docs. And usually you find this here. So docs. All right. So this right here is the API documentation. And so all we have to go is to the request, right? So we have the getting started, we have the authentication, we have the request URL, we have a bunch of things, but the thing that we really care about is the bulk request, which is the request, which will be up down here, I believe. Yeah, down here, which will be the request that we will use as an example for the actual uh API request that we do within N10. So all we have to do is copy this, go here and set up an HTTP request, import curl, just paste it here. Now we can see that everything was done for us. We have the post, we have the URL, we have the fields, the key, the Q, which in this case would be um we can see here we can see that we can do the city name, we can do the US zip code, UK postcode and so on. Um which is required. And then we have the API key which is the one right here which is sort of a password that says hey this is my account this is um related to me just use mine and the body in this case we actually don’t need this because this is just an example so I can delete this and we can just work with this. So type a request which is post URL which is the URL that we do. So what is the action that we’re taking and then we have the key which is the API key which we find on my account. So when you make a free account, you can go here to the dashboard and up here you will copy the API key and paste it back here and then the Q will be the city name. So we can do London or whatever it is and I press execute step which will now execute the step. So as you can see here it successfully uh ran this and I get the weather. So the current weather, the temperature of that specific place which we can then use for whatever it is. Right? All right. So now you got to see exactly what it’s like to build an API request, an API call, uh, which we call and this is exactly what you can then use in between your automation steps. So let’s say we had a next node which would be let’s do an edit fields and we wanted to get the temperature. So temp temperature in Celsius 9.3. Yeah, thank god I’m not in London. uh I can execute the step and this will now call the server bring the data back and then here you can see that the temperature was 9.3 because this is a variable that we found here but again the reason why we using HTTP is because if I go here to free weather API it’s not listed here it’s not here right and any only has about 4 to 500 it has the main softwares but sometimes softwares that we want here are not here which is exactly why we have to then go to the API documentation and find or understand how we can set up the API request test. In this video, I’m going to show you how you can master and attend just by learning 17 notes. And these are the exact same ones that we use pretty much 80% of the time when building automations for clients. And honestly, these are probably the only ones that you’ll ever need. So, the first one is the trigger. Now, the trigger is essentially the first step of the automation. Like, what is that thing that starts the automation for us to then do the next steps? In any we have different types of triggers. Uh, the first one is a manual trigger. So we can just execute the workflow manually. Now this right here is something that we use most of the times just for testing, right? Because we want to test something. So there has to be a first step and that’s where we add a manual trigger. Now the second one is a schedule trigger. So this trigger right here is primarily used when you want to run the automation let’s say once a week, once a month or at certain interval of time. So if I go in here, I can see that I can run it um in seconds, minutes, hours, days, weeks, months, and even custom. So this is cron which you can put your maybe every 2 p.m. on a Tuesday or every 3 p.m. on a Friday of every month and you have different settings that you can put so that you’re able to um to run the automation at a very specific time of the month of the year of the week of the day right so to give you a use case let’s say we had a content system let’s say we wanted to generate content automatically every single day what we would do here is we would go to trigger interval which is days 1 midnight and trigger minute zero and this is where we put this as the first step of the automation so that it runs every one day at midnight of the week right so we’re able to run the autom information without us having to manually trigger it. And this is for the time trigger. And then we have the type form trigger. Now, this is just to show you an example of a trigger that is not native to N10. These two are native to N10, which means that N10 owns those nodes. But in this case, type form is not any. It’s a different platform. And so, Type Form itself is a platform that generates forms. So, we can generate forms. And this trigger right here starts whenever someone fills out the hiring form in this case. So I have the form pulled out here which is a form that is connected to this type from trigger and what happens is that whenever someone fills out the form this sends a signal to this node because it’s an onapp trigger. Uh that will allow us to then be notified and start the automation. So I’m going to press exit workflow. As you can see now this is waiting for you to create an event in type form which is waiting for me to fill out the form. I’m going to press submit and as you can see here this is now triggered and we got the data the name the email the phone number and location as well. Right? So this essentially is an on-app trigger which means that it triggers whenever an single app starts something or whenever something happens within an app that we can all find right here. Add another trigger. We have all these triggers and the on app event is the one that you can use for whatever it is. So these are all different softwares that can be the first step of the automation that triggers whenever something happens within that software. Now the next part of the nodes are going to be storage solutions. Now, storage solutions is just a fancy way to say we use nodes that allow us to store information in them, right? And so, typically we use Google Sheets, we can use Air Table, we can use notion, we can use any new native data tables which only came out a few days ago in order to store information. This could be a simple Google sheet that looks like this, which has full name, email address, location, and phone. But could also mean a data table within N10, which has name, email, phone number, and location, which is the exact same. The only difference is that one is stored in Nitn and the other one is stored in Google Sheets. So let me show you exactly what I mean here. Let me put the um manual execution here and I can see that inside I am adding a row. So append row means I’m adding a row in the N10 17 nodes which is the name of the Google sheet right here and I’m putting the first name or the full name as Melatory the email is this and the location is this. I can press execute workflow which will now run the step right here and it will add the row into the Google sheet which will be mik email and uh location as well and I can also add the phone which you can also add by refreshing and let me add let’s do 1 555 1 2 3 4 5 6 7 and if I execute the step again I can now see that I will have a new row that will be added here with email location and this as well. Now the reason why it gave us an error is because Google sheet doesn’t like when you put plus signs or equal signs and so on because these are native equations within Google Sheets. Uh but you get the gist here. You just store information into Google sheet. The second one is within the Nitn data tables. So let me connect this. And in this case we do the exact same thing. It will be new people because that is the name of the database. And we’re adding the first name or the name as Mikell authority my email my phone number and location as well. And if I press execute step, I can see that now it was successful. And if I go here and I refresh, I can now see that the data was added here. Full name, email, phone number, and location as well. Now, the amazing thing is that once you master Google Sheets and Nintend’s native data tables, you can pretty much use Air Table, you can use notion, you can use Asana, ClickUp, all these places where you store information, they’re all very, very similar, right? So, if you understand one, the setup will be very, very similar for the other ones. All right? So now we get to the universal data processing. So here is where we manipulate data, right? Manipulate data just means that we take some sort of data that comes in and then we structure it in a way where it makes sense for us to structure it in. Now in this case I want to take the um manual execution here. I’m going to attach it here. And I can see that inside the edit node if I execute the step I can see that I have an array which is basically a list of people’s uh information. So we have name, email, phone number and location. David Smith, David Smith, Emily Chan, Carlos Ramirez, and Asia Khan. And these are basically giving me the different pieces of information. Now, the only problem with this is that let’s say we want to add this to our Google sheet. We can’t because this is an array, which means that it’s inside this right here. So, this is where the split out comes in. So, what this means is that if you want to process each name individually, right? If you want to process this right here individually, then this right here, then this right here, and this right here, and this right here as well, then we have to split them out. We have to take them, as you can see by the diagram here, it’s taking them, which is a singular thing, and then it’s splitting them out based on the amount of items that are in the array. So, let me just show you. Let me just run this right here. And let me show you that now we have five items. So, as you can see here, it went from one item, which is the array, to five items. And so what we’re doing here is we’re processing each person’s details individually through the automation in the next steps. And this is splitting out. So this is when you have an array and you want to split out each item of that array. Now aggregate right here is the exact opposite. As you can see the diagrams are opposites. And so what we do here is just bring it back to the way it was before. Right? And if I press execute step, I can see that now I have the array that is back there which is one item. So you can see we have one item, five items and one item as well. Now, typically you would use split out whenever you have because a lot of the times we get data all within the same array. We get a bunch of details, contacts and so on all within one singular item. And so what we want to do is go inside that item and take them out of each one and process them individually in case you want to add them individually to let’s say a native data table or even a Google sheet, right? You have to process each one individually for it to actually make sense to add them to a database or whatever it is that you want to do. Whilst this node right here basically when we have a lot of information that is a lot of items and we want to put them all together smash them all together to then send them through to the next steps right so it’s aggregating data so it’s not everywhere it’s not in different places it’s all within one place then we get on to the logic which is if so this is saying if this equals to this then it’s true if not it’s false so if I say in this case let me just uh take this out there we go right here so let me say if the name contains um contains Sarah which should only be one name then we send it through the true route right so if I go here I can now see that only one went through here and the other ones went through here now this is great because automation again is logic so if you want to send the automation in different ways based on whether something is true or false then you can use the if node right here now the switch node is a bit different because it gives you more flexibility right let me I show you exactly what I mean. Let me say right here inside I have options to basically route the automation. So I can say if the name equals to Sarah Johnson if the name equals David Smith then we can rename the output to Sarah rename the output to David. And what this will do is that it will run through every single one and the ones that are Sarah or Sarah Smith in this case. Sarah Smith, Sarah Johnson, it will send them through Sarah. And if it’s David Smith, then it will send them through David. So if I run this, I can see that we only have one item and one item here because those are the only ones that applied to the logic. And so how is this different from if? Well, if only gives you the opportunity to add conditions, but don’t add more than true or false options. While here, you can put as many options as you want. And this is great because you could have a use case where you have emails. You categorize the emails based on whether they’re FAQ, whether they are uh promotional, whether they are just normal, whether they are something else. And an AI categorizes it. And then you can use a switch node to then say if the email is FAQ, then you send it this way. If it’s something else, then you send it this way. If it’s something else as well, because you can keep adding root rules. You can say if this equals to whatever, just hello. You can rename it to FAQ. And this will be another option, right? And you can do as many options as you want which is amazing because that allows us to be able to route the automation based on the type of input or the output that we get in the previous step. All right. Then we have the code node. Now the code node is amazing uh because it allows us to be able to do a lot of things at once and code is one of the things that again a lot of no code platforms don’t have because in the name no code. Uh but the fact that Enit added the code option here made it so much easier for us to be able to to transform information from unstructured to structured in the easiest way possible and it’s very very fast. Yeah. So let’s say we have the array here which is the exact same as we had before which are just a bunch of names that are all uh within the same array and we can process each one individually. Now what we can do with the code node using code and by the way if you’re asking how did you write the code? I just said split out the items from the array and the array is this. And then if I run this, I can see that now really quick it uh split out the items in five different um separately. So now we can go through five items individually. Now this did the same function as this. So this wouldn’t make a lot of sense. But if you have something a lot more complex and you need the data to be transformed in a way where it would take you seven or eight different nodes, then you can do it all within the code node. Now I’m not going to get into detail about this because again, we’re all here to not write code, right? Uh, but just know that you have this option to be able to write code with Nitn and it makes it a lot easier to do more complex stuff. You won’t really need them for most of the time, but just knowing that you have the option there to use gives us a lot more flexibility when we’re building automations. And then we have the merge node. So, let me actually set this up. All right. So, for the merge node, what I did is I put two different fields. One is hello yo and then the other one is hello ciao. And when I run this automation, it will run this one first and then it will run this one. And let’s say I put a wait node here where I can put two two seconds just for it to wait two seconds. I can show you that this right here will run first and then it will run this one. Right now let’s say that we had an automation where we had to run this and then we wanted to run this and then we wanted to go right without us having to go through here first and run the whole automation and then run through here first. Now let’s say that we had an automation that we start here and it goes two different ways but then we want to aggregate the data. We want to send the data in the same way as two different inputs, input one and input two to then be able to take both pieces of information to then be able to go to the next steps. So that’s exactly what the merge node does. If I go here, I can see also I can add more inputs. So if I press four, it basically uh it can it can intake more inputs at the same time. In this case, I can do two. I can execute the step. And now we can see that we got two items. One is yo and one is chao. So what it’s doing here it’s it’s aggregating both of them together. Now there are other options as well um to combine to then SQL query. So we can query different things or different data points and then we can also choose a branch. Now honestly the one they’re mostly going to use is going to be combine and it’s going to be append. Now append in this case will be output each item individually and combine is taking these two and just putting them all in the same sort of array that you can use for the next steps. Now, here’s a system that I built that uses the merge nodes, three different ones. Uh, and the way that this works is that we have um the LinkedIn post which is made, the Facebook post was made, and then we want to merge them. So, we have the Facebook post and the LinkedIn post, and then we have the Twitter post which is made, the article which is made, and then we’re merging these two together as well to then finally merge all four things together. So, we can directly send them to the Google sheet. And the reason why we’re merging them is because if we run each one individually, then we would have to set up a new automation for each row at a single time to add them to the Google sheet, which we can actually just remove by just merging them all together in the same sort of structured way, different items to then send them to the Google sheet. So the next nodes right here are going to be connectivity and API. Now API is the most important skill when it comes to automation. And if you haven’t watched my video about fundamentals of API, just watch it up here. Um, but it is the reason why apps get to talk to other apps, right? It’s the reason why this app right here can talk to an attent but this app right here can talk to this one right or we can just talk to each other um in different ways. So in this case the first node that we have to learn is the HTTP request. Now this is one of the most powerful nodes in any because when we go here and I go to action app. So this is taking an action within a single app. We can see that we don’t have an infinite amount of nodes, right? Like we can stop here and then what? What if we have a software that we want to use but we can’t find it here. What do we do then? Well, in this case, we use the HTTP request. So, let’s say I wanted to use the free weather API which gave me the API of the weather. And if I go here to NN, I can’t see any app that’s called free weather API. So what I have to do is I have to set up the HTTP request of the few other API which I can find in the documentation right here. By the way, I covered this in a API fundamentals video. So if this makes no sense to you, please go watch that video cuz it will help a lot. Um, but this right here is the API documentation which is essentially a documentation which allows you to see exactly what you can automate and what you cannot automate within a software and also how to set up the automation. And so by looking at this um documentation here, I was able to set up the um the automation of the weather API which looks at the temperature in London right now. And if I execute the step, I can see that now I’m still able to actually run the automation. I was still able to use the software without having to use the software here which are already pre-made by 10. And you can see here we have the different outputs. So London, we have the temperature, degrees in Celsius, Fahrenheit, and different other informations as well. Then we have web hooks right here. Now, web hooks are a way for us to get notified when something happens. So, let’s say someone fills out a form. Well, it sends a data to the web hook. You remember this right here, the type form trigger. Well, behind the type form trigger is actually a web hook which allows us to be able to get notified when something happens. Well, in that case, it’s whenever the form is being submitted, it sends a data to the web hook through an API. Right? So, right here we have the test URL which is used for testing and production URL which is used when the automation is set to active. And then we have the different type of HTTP method which again is very similar to there because we have post. We have all these options and these are the same ones that we have here. And then we have the path which is just the way that we uh that we name the URL. And then this right here is a thing that you would connect to the software itself to then be able for us to get notified when something happens within that software. And respond to web hook will be the thing that will then respond back to the server that we got the information from. Now, to show you exactly how it works, what I’m going to do is use a software called Postman API, which allows us to send example uh test data to the web hook, right? I’m going to go in here, copy this. Make sure you change this to post request. And then I’m going to paste this here. Make sure this is the post request as well. And then the body will be what is the thing that we’re sending the web hook. In this case, let’s just do full name, my name. Let me run this here. I’m going to press send. This will now start the workflow. As you can see here now we started the workflow and we sent the full name here which is the body right and this is how we send information from one server to another through a web hook. Now let’s say I had this connected now all I have to do here is I have to change this to using respond to web hook node. And here um what we can do is we can just respond with workflow as finished. And so when I run this, I send this here, I can see that now we get the data workflow has finished. Now this is amazing when we are sending data to a software or to a web hook in this case and we want to get something back. So let’s say we send the signup link to a user in some sort of software, he signs up, we get something back. Lastly, it would be the AI integration. So this is one of the ones that are most uh commonly used. Um first one is the AI node. So this is just to create something with AI. So in this case we can say create a LinkedIn post about life and here we have our openi connected the resource is text the operation which is the action that we’re taking is good uh the model it can be um you have a list of models here you can use GPT4 or latest or you can use whatever you want and then you have the prompts right here the prompts there are three different prompts that you can write the first one is a system prompt the system prompt is a prompt that you tell the AI uh you give it an identity so you are a helpful intelligent XY XYZ assistant. Then you have user. So user is when you tell it to do something. So your task is to do XYZ. And assistant is when you give it some examples. In this case, let’s keep it simple. I’m going to press execute step. And this will now create a LinkedIn post about life. And as you can see, sure, here’s a thoughtful and professional LinkedIn post about life. And then it gives me a whole LinkedIn post that we can then use. Now this AI step is used whenever we want to have some sort of data or some sort of input sent to AI just like we would on chat GBT automatically and then give us the output for content for any structured data that you want structured for anything pretty much that you can think of AI playing a role in the automation just as a linear thing for it to do just that task in specific only that task and then we have the AI agent if you haven’t watched my AI agent 101 video make sure to watch it up here uh it explains exactly how you can build your first AI agent from scratch using N10. But the AI agent is the reason probably the reason why uh N10 blew up so fast is because it had now the um opportunity for us to use something that was connected to AI that could think through or that could remember the different conversation we had, but that was also uh hooked up to different tools. So in this case, if you scroll down, we can see that we hook it up to Gmail, we can hook it up to Air Table, we can hook it up to well, pretty much anything. uh we have all these different softwares that we can use to then be able to connect it to the AI agent for it to actually take action and a good thing is that the Gmail tool can be connected and the air table tool can be connected and the let’s say notion tool can be connected and you can have as many connections as you want and this acts as a personal assistant that allow us to be able to take action on different things based on the input that we give it. So in this case what it would look like is we would have a trigger which would be usually it would be an on chat message which means that we’re chatting with the AI agent itself and if I open chat I can now see that I can speak to the actual AI agent something that you can’t do with AI step. So I can say hello what this will do is that it will then talk to its AI. It will remember the conversation and then bring it back. It’s sort of like a person that we’re talking to. And the good thing is that the person itself has access to our software which is amazing because now it can take action on our behalf based on the input that we give it. So if we say draft an email it will then go to the Gmail tool and then do its thing. Same thing with air tableable and same thing with notion. And the use case that you can think of this is pretty much anything any task that you want a singular input data store. So you basically have let’s say one chat message right where you have one place and through a series of inputs. So through a series of send Gmail, send an air table or create a notion task or whatever it is, it takes actions in different softwares without us having to create a new automation for every single uh action that we want to take. In this video, I’m going to walk you through everything that you need to know about data transformation and using JSON within your automations. Now I know this topic scares quite a few people and it scared me coming into automation as a beginner with no technical knowledge but it actually is quite easy and very very important to understand. All right so JSON 101 JSON stands for JavaScript object notation. So if you see JavaScript here and there it stands for JSON cuz it’s JavaScript. So J S O N right here. What it is? It’s a way for servers to store and transfer data. Right? It looks like text, but it’s structured so computers can read it. Now, the best way that I can describe JSON is English for computers. It’s the language that computers use to speak to each other, right? And that’s why it’s very, very important for us to understand it because pretty much everything is built in JSON, right? APIs, which I spoke about in another video up here, uh, config files, databases, but also your favorite platforms like make.com, Nitan, or Zapier, they’re all built on JSON. It’s crazy to me that people still don’t understand that because behind the nodes, the squares, and the the steps, if you really look at it, it’s all JSON. That’s why it’s very very important to understand. Now, we use a very basic structure uh in JavaScript. When we write JSON, we use key value pairs. So, the keys are strings. They’re always going to be in quotes. And the values can be string can be my name, number can be an age, boolean which is true or false. Null when you get no data it’s going to be zero zero data object which is basically a JSON inside the JSON and array which is a list of items which I’ll walk you through step by step. So these are all the different types of values that you can get using the key. Here’s an example of a basic key value pair. We have the key which is name. We have the value which is mika in quotes because it’s a text string. The age which is key right which again is in quotes because it’s always a string. The age which is not in quotation marks because it’s an age so it’s number. Then student and then true which is boolean true or false right? So we have again name key and key and these are values but they’re different types of values. Now arrays are ordered in a list inside of the brackets. Now let’s say you go to the grocery store and you get the groceries, right? The groceries isn’t one thing. Groceries is a list of items inside the key which is groceries. And so this is the same exact example when we have skills. So the key is skills and the value is automation, AI, notion which are my skills. And so why do we use these? Well, we use this when we have the same key like groceries or skills. But we want to add multiple items in the array, right? The array is just the list of things um to to explain the key, right? To explain skills, to explain groceries, to explain whatever it is. We have nested objects which are JSON inside the JSON and for example we have the key which is person the key is also name but the name is inside the person so it’s JSON in JSON um and then we have contacts which is email and phone number so we have different pieces of information but it follows a very clear hierarchy. Hierarchy just means what is the first thing that you should see and then what is the next thing and what is the next thing. Of course, the first thing is person. The next thing is names. And we have contacts within the name. And we have email and phone number. And then we close off with three curly brackets because we start with 1 2 and three. Right? So nested objects is usually the thing that we always use. And that nit make.com usually uses when they want to show different types of data inside the data, right? So you might have a Google sheet and the Google sheet might show the ID of the sheet. It might show the sheet name. It might show the row values. It might show different types of things. And so to show those things, it uses the nested objects. And so JSON applying into APIs. And if you’ve never heard APIs, it’s just basically how a software speaks to a software. How these softwares are actually able to work is through APIs. This is a HTTP request, which is a request that we send to a server to do something. So in this case, we have a curl, and a curl is just a bunch of JSON. Now, don’t worry about what this means, but this is a request. This is something that we sent to the server saying, “Hey, can we get something? Can we can we do something?” Right? In case you want to get new rows or you want to add a row to Google sheet or you want to add a contact on ClickUp or do something else, this is what you use. And then the response, which is always going to be in JSON, looks like this. So let’s say we’re looking for users in a software, let’s say. And the output that I get is the ID of the user, the name of the user, the email, whether the user is active or not, and the roles of the user, which is an array because it can be different roles within the same person. And so we have the keys which are all inside the quotation marks because they’re all strings. And we have the values but the values can change based on whether it’s a number, a string like this, a boolean or just an array. So how does this now apply to end? So if I go to edit first step, I can add a manual trigger which is just a first step of the automation manually. And let me add another node which is edit fields. Now this node right here is very very important and it’s something that we typically use to transform data which is getting an input which can be a name it can be a bunch of values then pulling it here right inside the edit fields node which transforms the input and then gives us the output. So if I go here to mode I can see that I can do manual mapping. Let me zoom in or I can actually write things in JSON and this again is the key value pair key value which is the exact same as the thing we spoke about. Now if I go to manual mapping I can now start adding fields to set. So I can say my full name is Mika Tori right and I can say that this is a string. Why is it a string? It’s because it’s text. If I put number and I ran this would be null because there is no number. It’s just text and it deletes it. Right? And so if we go back to string put my name. What I can do here is execute the step which will show me the output in schema which is basically the way that we all look at it because it looks a bit messy in JSON the table version or JSON right so if you’ve never pressed on this button JSON this is what it looks like we have an object right here we have the key and we have the value right here now let’s say I wanted to do age and we do um 20 if I execute the step now you can see that the object right here is increasing in the size because there’s a new key value pair. And bear in mind that this is text right now. It’s not a number. So if I wanted to change this to a number, look at the color list. It changes the actual type of output, but it changes the type of output that comes here to 20. Let’s say I wanted to do boolean. This is true or false. I can say student false or you can do true. So we’re saying, hey, his name is Mik Torti. He’s 20 years old and he’s a student, right? And then you can also be adding an array which in this case can be skills like we mentioned before and you do square bracket square bracket to end it and you put skills. You say notion you finish it off then anything then make and then you do something else right but we are adding items inside the array which is here and here which are items right here. Boom. Now if I press execute step this will now show the skills like this. It will show the full name. It’ll show the age, the student and the skills right here which are wrapped up in square brackets right here. Notion make and so on. And finally we have the object right and the object can be a summary. Let’s call it summary. And let’s copy this full thing this whole object because this is an object again from here to here. And I can paste this here. And if I execute this step, this will now add the new object that we have which is called summary. And we have this again which we just copied up here. Now why am I showing you this is because typically when we get inputs from the previous node, the previous step, we send it here to then be able to change the data. So let me show you an example here. Let’s say I have let me delete this. Let’s say I have the full name and I wanted to get just the first name. So let’s say I run this and I have the output which is full name. Let’s say I add another edit node right here. I can go here. I can remove this. And now let’s say I wanted to take the full name and I wanted to transform it into just the first name. What I do here is I press here. I can say first name. And if I go here to expression, I can put curly bracket curly bracket. And now inside here, it says anything inside the curly bracket curly bracket is JavaScript, which is JSON, right? All right. So, we’re saying I can actually reference previous variables using this. So, I can say dollar sign JSON, which is the way that you start where you want to reference some sort of item here, dot full name, right? Which you got right here, full name. And so, that is how you can reference these variables from the previous steps to the next steps. And that’s how dynamic variables work, right? Because they are dynamic, they change every single time. Cuz right here, if I ran this, I would also have the first name, which is Nicola Torti. But if I go back here and change it to James and I ran this again, this will now be James, right? Which is why it’s dynamic, which is why automations are brilliant because they change data and you can automate the process. So you don’t have to do it yourself. So okay, let’s say we have the full name here. Let me go full screen by pressing this button right here. And let’s say I wanted to take this name. I just wanted to get James. Now inside N10 and the reason why I would say for a beginner it looks a bit technical uh because of this because make.com doesn’t actually show you this but that’s what it is in the back end I can after the whole variable. So full name which again is this what I can do is actually use some formulas. So I can put dot which now allows me to see different things that I can do with this full name. I can split the first name which we’re going to do. I can check whether the um the name includes something, right? So you can see here whether the team includes T and it says true. And so these are all formulas that you can’t use within your um the full name. Honestly, you’ll probably use maybe five or six of these. So don’t even worry about understanding each one. U one of them that I use a lot is split because I usually want to split the full name so I can get the first name. So in this case, what we’re doing here is we’re getting the full name which is James Torty. What we’re doing is saying, hey, let’s split this name by the presence of a space. So it gives me this, which is first name, and then last name. And then we want to get the first first one, which is James. And that’s the way that this works because everything in JSON is logic. Everything in code is logic, right? So if you put logic here into this automation or not automation in this variable, then you’re saying, hey, let’s split this by the presence of a space. So we do the apostrophe here and we actually put the space on our keyboard. So now we can see that we have the first one and we have the second one. And now after we put split then we want to put dot first because we’re returning the first element of the array cuz you can see here this is an array right because it has this comma this comma that right so let’s say I had the full name being James Torty Arthur. It will then be Jamesa Thory comma Arthur. And so after this we want to put first. And this is how we get James. And that’s how in emails you can turn the full name into a first name by using JSON and by using formulas within the JSON. Now you’re looking at this right now. It probably looks very overwhelming and it was very overwhelming for me at the start as well. But when you understand the ones that actually do matter cuz let’s be honest, you’re not going to be using all these. They work very well, right? Like if you understand split for example and understand that this is the formula they use every single time to split a full name from something else then you’re pretty much set. That’s it right. And the good thing is that you have an AI on the right hand side that you can ask any questions to which can also help you. And so that is how we can transform data. We can take some sort of full name. We can then use some formula and then we can output the first name right from here to here. And that is data transformation. That’s how we use JSON to be able to take an input and turn it into something that’s an output. And quick side note here, if you’re wondering what’s behind this, I mentioned it’s JSON. Let me show you what I mean. I can copy this. I can go here and if I paste this, this will be JSON because these are nodes that have parameters that have different stuff which are all JSON. And the reason why this and make.com works very well is because we don’t have to see this. But just know that behind this is this, right? So it’s all JSON. That’s why understanding JSON is very very important because it gives you the understanding of how things actually work together and how the English language in computers actually works. Now that we have this full name and then going to the first name now we can add some branching. So we can add some some conditions and we can add if. So if is saying hey if this variable which again we can get by doing curly bracket curly bracket JSON dot first name. So JSON dot the variable that’s here right JSON do first name equals to James this will say true true branch and if I go outside of here I can see that this is a true branch this is a thing that is true then we can now send the automation one way if that specific criteria or condition is true and if it’s false let me go down this way and for example if I change the the name to Mikuel execute the step now this will be a false branch so this will go down the false and again behind this what it does is that it uses this variable. It then says, hey, is this variable equal to this? If yes, then it’s true. If not, then it’s false. Because again, everything relies on logic. Everything is logic in automations. Whether you have this or whether you have this conditioning in two different paths. All right. So, right here I have an AI agent. So, we’ll see how JSON actually applies within the AI agent. I can open chat and I can say hello. And what it’s doing now is it’s it’s sending the information here JSON which is session ID action and chat input which is the thing that I just told it to do. So these are different items that we get as an output from the actual thing. It’s transferring the data. So what you see here the line is actually just transferring the data here to this AI agent which is given the chat input as an example in JSON here. Then using the chat input is then talking to the actual open AI by giving a JSON again which is messages right here. And then the output that we get using OpenAI is this. Hello, how can I assist you today? Which again is the output which goes here. Hello, how can I assist you today? So everything that you see within your automations, data here and data there or some sort of variable going to the AI agent and then going to something else, it’s all JSON. That’s how data flows within different automations. And so let’s say now I wanted to take action on my email. I can say send an email to mika.25gmail.com saying we have uh football tomorrow. I can press go. This will now send the data here. It will then call the tool and then it will send the email right and if I go inside here I can see that this is the input. The messages is the input, the subject line and the email body and the output is the response which is the email ID that I just made, the thread ID which is a thread of the email and then the label ID telling us that this is sent. And this right here is an object right right here the same way that it was person name, it was contact, it was whatever it is. All right. And lastly here we have a form that I just made. If I go to the form, I can see that I have the full name, the age, and the date. So I say the age will be let’s say 20 the date let’s say the date is today the 20th I can press submit what this will now do is it will send the data to our automation and we get back the full name which is a key value key as you can see here this is a value but it’s not in quotation marks because it’s a number and then everything else is a key value pair with this because it’s all a string it’s all text now some fundamental rules to remember for JSON is that the keys must always be in double quotes. The keys right here, name must always be in these two quotes because it’s always a string. If you don’t put it that way, it’ll break, right? The second thing is to understand the difference between string, number, boolean, null, object, and array, right? and how these sort of function because then you’re able to understand JSON as a whole because it is just that it is just strings which are text numbers which are just numbers with no quotation marks boolean true or false null no data object which is JSON inside the JSON and array which is a list of values then we have the third rule which is separating pairs with commas so we have the key which is name the actual value the next thing the next thing and then the last one doesn’t have a comma the one nearest to the actual curly bracket which finishes of the JSON structure. And lastly is wrapping the whole thing in quotation mark if it’s an object. And an object in this case is just a list of key value pairs, right? Key value, key value, key value. And we wrap up the whole object using curly brackets here and curly brackets here to finish it off. And if you’re someone who’s serious about starting and scaling your AI agency, then you might want to check out the first link down below, which is a video that walks you through our one-toone mentorship program, which is a program where we get to work with you onetoone to help you start and scale your agency to 10K a month. Web hooks are by far one of the most powerful thing within automation. Yet, most people still have no idea how they work. So, today I’m walking you through exactly what a web hook is, how you can use it in real life, and how you can set it up within your own end. So by the end of the video, you’ll be able to use it within your own automations, even if you never touched it before. So let’s dive in. So what a web hook is is essentially a URL that allows us to get notified when something changes within an app. So think of it as someone coming into your house and ringing your doorbell. As soon as they ring your doorbell, you instantly get notified, right? And we usually refer to this as an instant trigger. That’s exactly what a web hook is. As soon as something happens, we instantly get notified in the web hook. Now, the business use case to this could be someone filling out a form. So as soon as the user fills out a form whether it’s in the website or something else we instantly get notified. So the web hook receives the data meaning receive the responses from the form and then starts the automation which is the one right here. All right. So let’s jump on to any end right here real quick and we can add the first step. So adding the first step just asking us what is the trigger? What is that thing that starts the automation as I mentioned when someone fills out the form the first step will be the web hook because that’s the thing that allows us to actually start the automation. Now the web hook can be found here. So on web hook call we can obviously trigger manually on app event on a schedule form submission. We can do a bunch of stuff but the web hook itself is this one and it runs the flow on receiving an HTTP request. Now HTTP stands for hypertext transfer protocol. Very fancy way of saying that data is passed from one app to another when we get notified right. So when we tap on here we get introduced to this page right here on the left hand side is basically pulling in from the web hook. So it’s listening for new events. So when we press this button it now the web hook itself it’s listening for notifications coming from some server some sort of server. till I stop listening and in the middle this is the configuration and on the right hand side is the output. So when we get notified the notification will show up here. So right here the first thing that we see is the difference between a test URL and a production URL. Now this is quite misunderstood between uh what they are but a test URL. So if you look at the the actual thing the actual URL in this case it says test but production doesn’t have test. Now when you want to deploy which means that when you want to activate your automation you typically want to uh use the production URLs. That’s the main use case for this. But you can use the test when you test and production is again when you want to activate your automation. Now right here you can see that you have a URL. So again the web hook itself is URL that’s accessible to anyone. It’s literally it goes on the web. It’s just a normal link that you can use for anything that you do. So if I press here I can actually copy it and I can go to to Google and actually search it. But again this is a thing that allows us to actually get notified when something happens. And we also get this this long string. So this is the the unique part which is 38 26 BB 2D 9056 and this is the path. This is what we call a path. Now the path can be changed to something else like hello right hello whatever it is or we typically want to have a long string. It doesn’t really matter but again this can be this can vary. This can change right and it doesn’t really matter what you put here. Now when it comes to the web hook itself we have different types of method. Now when you want to get notified from a server you typically want to use one of these different HTTP methods. So the HTTP method can be a get which is getting information head patch post put and delete. Really the only ones that I’ve actually used after building hundreds of automation is get and post. So a server could say hey I’m sending you the notification but it needs to be a put request or a post request or get request. Right? So this is the thing that you put here. The path again I explained which is the last part of the web hook. Authentication is basically saying do you want to add a password? So only you only the people who know the username and password can actually access it. You can use it but I don’t really use basic o and header or JSON web token off. It doesn’t really matter like the difference between that doesn’t really matter but just know that they’re used as a way for us to say hey don’t breach across this point. You need to have a password to actually use it. So that’s what we use authentication for but typically I would have it as none. And then for the response we have immediately we have when last note finishes. So immediately just means like when this happens immediately send the data here we can have when last node finishes return the data when the last node which means that the last step of the execution is finished the last step of the automation and then it sends the data back and we can use a respond to web hook node which I’ll show you in just a second and then streaming as well which we don’t really use uh so don’t worry about it too much and then we have different options so for options I would usually have the raw body so in case we need it but for most of the times because we’re getting notified because we’re getting something we wouldn’t use any options but you can have the opt option to basically have some different options here that you can use for the different types of requests that you’re getting but typically we wouldn’t put anything here. So with that being said if we go here to web hook when I spoke about the respond to the web hook we also get a web hook response respond to the web hook. So what this means is that when we get notified from the server we can actually give it a response back to the server. So let me show you what I mean. So because this is accessible on the internet I can copy this I can listen for the test event and let me just go like here and then I can see that now the message says workflow has started. So if I go back here I can see that on here I get a bunch of output. So I get the user agent Mozilla which is basically telling everything about my browser a bunch of Kodi stuff that you have to worry about but just know that because we opened it on the browser it’s basically giving us a bunch of information that we then can use for the automation. So, let me show you exactly what I mean by respond to web hooks. So, let’s say we add this here and I go in here and I say all incoming items. So, we’re basically saying, hey, I’m going to give you back everything that you gave me. So, if I execute this workflow, I think I have to change this to yeah, you respond to web hook as well because this is the response. Execute the workflow. And now I go here, I can see that I get a bunch of different text. So this is exactly what sends to us. But because we’re sending it back, we get everything here. So that’s why it’s sending us everything back. All right. So you understand what a web hook is now. You understand sort of the different things, the different settings. Let’s actually put it to work and see how it actually works in a business case scenario. If I go here, let me just put it in production mode. And let me copy this. Um the workflow that we’re going to basically make is starting from a type form, which is someone filling out a form. And then we can add it to let’s say a Google sheet. and then we can send an email back to the person that filled out the form. So, let me go to type form. So, this right here is the type form that we’re going to use for this test right here. It all starts with full name, email, and what are you looking for? Very, very simple. You can obviously add more details like company name, budget, whatever it is that you have. Uh, but let’s start here. I want to show you exactly when we fill out this form, how does it send the information to NN. So, let me go to workflows. Let me go to web hooks right here. So, you can connect with any app to send responses or trigger actions, which is exactly what we want. We want to add a web hook which will take us to this page. We can add a web hook. And then here is where we go inside and we actually what is it? Production URL. Let’s copy this and let’s put it into here. And we can save the web hook. Now once this is done, we can we typically want to send a test request to make sure that it does work. So let me go here. Go inside and listen for test events. I can send a test request. And now it’s giving me an error. So let’s see why it gives me an error. So below on the response we can see the workflow must be active for a production URL to run successfully. You can activate the workflow using toggle. Okay. So this is what I meant before. So if you go here, I just pasted the production URL. Let’s do the test URL because again the production URL only works when you activate the automation. So let’s do test URL. Let me copy this. Let me go here. Let me replace web hook. And now we can test it again. So let me listen for event and I can test the request. In this case it’s giving me another error. So let’s see the response. And now it’s telling me the web hook is not registered for post request. Did you mean to make a get request? So now this is goes back to the fundamental where I told you some servers ask us to do a different request. So in this case for the HTTP they say hey this is not set up to do a post request. So all we have to do is set up to the to do a post request in this case. And then we can try again go here and then send a test request. And now it should be successful right at 200 which means it’s all good. The workflow has started. And if I go back to end I can see that we have the output which is successful right which is everything. Okay cool. Now now that we know that this works and we know that we get a request whenever this is post and is test just to test until we set it to active. We can then fill out the form and see the data that we get. Go here listen for events. go back to TY form and then I can activate this because you want this to be on every single time. I can copy the length to the TI form and then I can start filling it out. So let me do malatory my name or my email and what are you looking for? I want to learn automations and I can press submit. And now this information will be sent to NN right here with a different output. So we have headers which is just a bunch of fancy stuff that you want to look at. But then what we actually care about is not the body but the responses. Where is it? Uh the answers. So matory my name the email is this and the text the third one is this. So these are the ones that we’re going to use for the next steps. The form submitted. It sends the data to the web hook. It’s like hey we have this data. Someone just submitted the form. Now use it for whatever you want to use. Here’s a notification. Okay. Once we have this, what we can do now is we can add it to our Google sheet. So, let’s make a Google sheet right now. Let’s name it new form request. Let’s do full name. Just the the variables that we had. Email uh once. Let’s just do once. So, let’s connect this to it end. So, I go here. I can press plus. I can go go to sheets and then what I need to do is append a row and a sheet connect it. All you have to do is go here sending with Google very very simple and then I can do sheet within a document. Append a row which means add a row and a document will be new form request. There we go. The first one and then the sheet will be one. We want to map each column manually because we want to do this manually. And then the full name will be the one here. Where is it? There we go. Text. because this is the text that we got. And you know this because these are the answers, right? You wouldn’t put it here if it wasn’t the answers. And then email would be the one here. So you just drag it across and once will be the last thing which is I want to learn automations. So it’s always good to test because when you go here, how would you know this is the answers, right? I mean it says answers right here. But it’s much better if you test to get actual answers that you know you put. So you can just map them here. And this is all good. So I can just execute step which means I’m just testing it. This is executing. So if I go here to the sheet, I can see that this is already added. So let me add this to bold. And then I know this works. So I can go to the last step which is sending an email. So email in this case will be Gmail. Uh create a message. No, send an email. Yeah, send a message. All I have to do to connect to Gmail to to an end is go here. Send them to Google. Very very simple like Google Sheets. And then here I have to put message send because we’re sending the message. And in this case, who are we sending the email to? We can either pull it from here or we can pull it from the actual form itself which is the email right I can put it here. The subject line will be thanks for filling out the form. Then it’s asking us for the email type. Now HTML is just the way that we make our emails fancy. We can leave this as text because we don’t need to use HTML. We can go here full screen and then here I can say hey I can go down to my name say hey Mika. And obviously, ideally, we want to have just the first name. And that goes into formulas. I don’t want to get into this uh just for this video because it’s a bit more complex. But I can say, “Hey, Mik, just saw our team. We’ll get back to you as soon as possible.” Thanks. All right. Cool. So, we said, “Hey, web hook name, which is a variable that we’re pulling in from the form.” Because again, we’re using dynamic variables. It changes every single time. We’re also saying, “Hey, what do you want? Who do you want to send an email to?” And that’s about it for the steps. So, let me test it. Okay, I just realized that it was actually wrong. I put an X row, so I I actually didn’t send the email. Um, but you should be getting the email when you send it through. Uh, I just had to put one OS, but that’s how that’s usually how it works. You just send it and you get this output right here. So, let’s test it from the start until the end. Let’s execute the workflow and let’s do a new form. So, let’s refresh. Let me go here and say James Low. Let me do my actual email without the extra Omations for lead generation. Submit. We go here. It’s talking to Google Sheets to actually add it. But we got the the output here. So if I go here, I can see that the answers in this case was James Low was email and then it was automations for lead generation which rhymes. And let me go to Google sheet which appends around the sheet which means that it added. So if I go here, I can see that James though was added. And obviously this would be a project management tool. It could be a CRM, whatever you have. Um, but we added it here. So you can keep track of all the different requests you’re having. And lastly, we have the email which was sent this time with the right email. So if I go to my email right here, I can see that I have an email from which says, “Hey, James Low, just saw you filled out the form on the website. Our team will get back to you as soon as possible.” Of course, you want to add more. And then it actually sends this as well, which is which we don’t want. So all we have to do is go here and then we can go to append nnn attribution. We can turn this off so that whenever it sends us an email it doesn’t say this part which we don’t want. All right. So that right there is basically how you use web hooks on nnn. I want to quickly show you how it looks like on a different platform which is make.com. So if I go to make.com I can log in. This is just another automation platform like nn. It’s just between n zapier and make.com. Make.com it’s it’s fairly easier to to get started with. But if I go here, I can see that to add the web hook to make.com, all you have to do is go here and there’s literally web hooks here and you can create a custom web hook which is the same. So create a web hook, name it whatever you want. So mik test this would be the URL that we had before. So in nn it will be this. This URL right here in make.com it will be this. They all have their own in like internal different names. In this case, it’s make.com and for nnn it’s nnn.cloud, right? So, they have their own unique sort of way that they name their um their web hooks. But on a high level, this is very very this is literally pretty much the same. Like it has the same functionality. All the web hooks are pretty much the same. It’s just that the way they look is different because of the way that um that this is set up. Press save. And this is much I don’t want to get into make.com cuz that’s more of a different video. But I just wanted to show you how it looks like to actually make a webbook on a different platform. And lastly, I want to show you how to send a data point from not from a form but from another scenario to a web hook. Right? If I go to another scenario right here. So, let me go out. Let me go here. Let me create a new workflow. And now, because I spoke about HTTP at the start, but in order for me to have a workflow and then send the information from that workflow to the next workflow through a web hook, uh I can then actually use a HTTP request. So let me show you exactly what it will look it will actually be much more clear when I actually run this. But all I have to do is copy this and let me take this out. So I copy the web hook that I need and now we will get data from the from the previous workflow. So if I execute the workflow here I can go here and then I can send the URL which would be basically saying hey I’m sending the data to you right and the web hook is getting notified. In this case, the method would always be post just because we’re posting information because that’s sending information from one place to another. Authentication is zero. And then we can also send a body. The body will be anything that you wanted to do. So you can say uh full name. So I should do case full name. So common case you just just want the capital letters to be this. So this right here will send the information with it. So if I execute the step first of all I have to run this it’s already running right now it’s waiting for this. So if I execute the step now it will send the information and I can see that we have in the body right here we have full name Mikuel. So imagine if you had a workflow right here which could send different variables so different things from one workflow to another. So you can split it up and you have all the different workflows talking to each other because you have web hooks and because you have HTTP requests. This is a whole another topic in itself, but I wanted to show you the overall sort of arcing thing of what a web hook is, how it can be used in a business sense, how it can be used or what the fundamentals are and how everything works together, how you can link it from automation to automation as well. In this video, I’m going to show you how you can handle any errors inside of Nen so your AI agents and your workflows are smarter, stronger, and make sure that they actually work. All right, so the first one here is retry when failure. So this happens when the workflow stops working because of some reason and then we tell it to run x amount of times in x interval and you know a node you know what step has this exact error handling technique because you will see this right here which says retry when fail. So if I go inside the HTTP request which is a again a node a thing that we used to send a request to some server in the internet asking for information we can execute the step and basically what this is it’s a server where it allows me to get any images of any dog randomly I got this dog right here right and I can keep going again and again and as you can see it’s successful why is because the status is success and I also know this because there’s a green check mark right which tells me that everything went good now what happens if something goes is wrong. Well, if I remove the E, right? Cuz before there was image, now there’s no image. This will now stop working. This will say there’s an error. As you can see, the resource you’re requesting could not be found. And if I go here, let’s say you have a whole workflow behind it. It will stop here, right? And so, why is this bad? Well, it’s because sometimes some servers just stop working randomly, right? They stop working for 1 to 2 seconds, maybe 3 to 4 seconds, which is why we use the retry when failure. So the way to set this up is to go to settings. You then have this setting turned on, retry on fail, which means that you’re saying, “Hey, retry these many times in this interval.” So it stops working, it tries once, then it waits 1,000 milliseconds until it tries again. Wait, tries again, right? And so it does it three times to make sure that we say if it doesn’t work, that’s cool. We’ll try again after this amount of time, right? And try back, try back, try back until it works. And so if I go here and I run this, let me put a manual trigger. I think I have this manual trigger. There we go. I can execute the workflow. And as you can see, this is now looping around because it’s actually waiting or it’s trying again after those many times in that interval. So let’s say I take this off, right? All I have to do now is execute the workflow and it will instantly error out. But by turning this on, retry when failure, it will wait, right, to try again and again and again. and at the end it will stop but there’s some process of them going through it they’re trying again um before it goes to the next step this can be applied to LLMs because sometimes open AAI claw Gemini they just stop working and we have no clue why and so to make your automation more scalable so that it just doesn’t stop every single time something goes wrong then make sure you have this the second technique is called the continue when failed now we allow the workflow to continue even when it fails and so theoretically right logically this step right here where you would continue even if it fails fails has to be something where if it fails amazing we still keep going. If it succeeds we keep going. So it can be a step that’s very very important in the whole logic of the flow. It has to be something where if it’s great great if not then it’s fine. And so the way to set this up is you have to go to on error and here we have three options. In this case it would just be continue. And so what we do here is it continues and it actually sends the error output right the error message to the next step. So if I go here I added an extra s. I can go here or extra F in this case and I can see that this is the message that I get. Now on the outside everything looks great because you can see that this succeeds right there’s a check mark but on the inside all we get is a message right we get this error message that we can then use to give to the next step. If I go here to the next step I can then pull the error message through to here like a normal variable I can execute the step and this is the output that we get right here. The third technique is called split error root. Now split error routt is a technique that we use in a lot of our automations to split the automation based on the logic because everything is logic. What that means in the plainest of English is this step runs if this step actually succeeds then it goes one way if it errors out so something goes wrong then we go the next way. Now typically this is great because with automations because everything is built on logic then we would typically have a route. So if something goes right or everything goes right then it goes one way and it continues the automation. If something goes wrong, then we notify our team saying, “Hey guys, something went wrong.” And so if I go inside here, I can see that now I have the same exact API that we had before. And this will now go through the success branch, not the error branch. But if there’s an error, so extra F, I can execute the step. And I can see that now it goes to the error branch, which is this one here. And the way to set this up is if you go to settings on error. So again, what happens when there’s an error? you can continue using error output, right? It passes the item to an extra error output, which means that it gives us two different paths to go down with our automation, one here and one here. And if I go to my email, which in this case is a step that we have right after there’s an error in a workflow. We can send the error message as an output, which in this case looks like this, right? And so right here, I have the workflow. And in this case, let’s say it’s a success, right? Just take the f out here. You can execute this and it goes the next way. And if I go to my email, right, and I have this error here, no root or get XYZ. Now, honestly, this right here makes no sense to any normal human looking at this unless you know APIs and so on. You could delete all these things, all these lines, uh, just to make it look cleaner. Um, and yeah, you could have this so you’re notified when something happens. Now, there actually is a better way when it comes to uh using the notification when something errors out, which I’ll show you in the last technique. But this is great because it gives us two options, right? It gives us the success option and it gives us the error option, all within the same workflow. The next technique is actually within the AI agent. So, if I go to the AI agent and I go on chat and I can say hello, what this does is that it talks to the brain, right? Because again, we mentioned that the brain is the LM, which means an AI that helps it think through what it needs to do. new instructions based on the prompt that we have inside. Now, this is all great until this stops working, right? There is a chance that this just errors out, that this LLM just errors out, which is where we add a fallback agent LLM. So, if I go inside here, I can see that I have an option here to enable fallback model. If I turn this off, that means that it removes the option for me to add a fallback agent LLM. As you can see, this is just a glitch that Ant needs to fix. uh but you will have no option here as well. And so the thought behind this is okay cool if we run this and it goes here to the agent then the agent called its brain because that’s how it thinks and it doesn’t work then we just break the whole thing right and so why don’t we add a step in the middle where if it doesn’t work here it then uses a different LLM to be able to try again and so that’s where we go in here we turn this on and we start adding the fallback agent LLM. Now the fallback agent LLM ideally it would be a different LLM because if OpenAI doesn’t work in that moment it will probably not work in that moment as well. Um so you want to make sure that you connect it to another LLM and you will be able to then use this as a fallback. So if I go here rename this fallback, it will use this model right here in case this one doesn’t work. So right here if I go inside and I go to my connection and I just name it fail save just put an API key fake one uh if I go out I can see that now I have a fake credential called fail which means that now it shouldn’t work right and so if I go here to open chat I can say hello this will now go here there’s an error and see how it instantly talks to the next fallback LLM to then give you an answer now this is great because a lot of the times like I mentioned LLM’s don’t work, right? And so you want a some sort of fallback, some sort of agent that they can rely on if the first one doesn’t work. It’s sort of like you’re playing sports. You have the main people and then the bench, right? Which is me when I was younger. And so when we have the main guy who’s playing and the main guy gets injured, then it calls another guy and then they call me. But in this case, they call the guy on the bench and the guy on the bench is a fallback l. All right. The next one is called the error workflow. So this is what I meant by the other way of doing this split error root because we actually set up a completely new automation which receives any error that comes from any automation in our workspace and then we can do whatever we want. Now this has to be a separate automation. So this is just the automation that we’re running now, right? But this will be a node that we add in a different automation. Now the way to set this up is we need to have a workflow. We have to activate this right here. Once I activate this, all I have to do is go make a new workflow like this, which has the error trigger. And again, you can’t activate this because it doesn’t let you cuz this is already activated. You want to go here. You want to go to settings. You then want to go and choose the error workflow, which in this case is this, right? Which is the workflow where the error trigger node is here. And you just want to attach to it. So in this case, for mine, it will be E with the R right here. I can press save. And now what happens is that I just connected this automation to the error workflow so that whenever something wrong happens here, it sends a data or sends a notification on the other workflow. So let me test it out. So now let’s say we go inside here and we execute the step. This should now work right here. Should give us a picture of a dog, right? Um and what we want to do here is we want to make sure that this will run now every 5 seconds. That’s fine. Let me make sure there’s an error here. So F. Let me run this. So there’s an error. Okay, cool. Now if I press save, this will now run the workflow every 5 seconds. And it should now send the notification to a workflow every 5 seconds because there’s an error here. So if I go inside here, I go to editor again just to refresh cuz you have to reload the actual automation. You go to executions. I can see now that we have new errors coming every single time. And on the one end, it’s a error, right? But on this end, it’s a success because that’s what this job of the error node does. Now, because I’m actually paying for executions, I’m going to disactivate this. But as you can see here, we now have a bunch of different workflow executions that we can then use to then be able to send ourselves an email, right? So, if I go in here, I can see that I have the URL of the workflow, the description, which actually makes sense in plain English, that we can now use to actually build out our workflow here. So if I go to copy the editor, which means that it now pins the actual output that we got from that run. I can then go to Gmail, I can send a message, obviously connect to Gmail by going here, press sign in with Google, and you’ll be good to go. Message send. Let’s do my email. Let’s do subject line, which means you can say error in workflow. And then the email type, let’s just do text because HTML is basically saying, “Hey, let’s make it look pretty.” We don’t have to saying, “Hey, Mikuel, there was an error in this workflow.” So URL, you can put the URL here. Error description, and you can put the description here. And you can go level and you can do warning. They’re saying, “Hey, to what extent do we have to worry about this?” You can just do warning. And now what I can do is I can run this and in that case it will error out and it will send me an email every single time with those variables that change. And if I go to my email, I can see here that I have error in workflow. Say, “Hey, there was an error in this workflow. The error description is this. The URL is this.” And if I actually go inside the URL, it will take me directly to the execution of the error of the workflow, which is amazing, right? Because now we can go here. We can try this again, right? Where we basically try it again with with something that actually works. And now we can rerun the execution to make sure that we don’t actually lose the data of this. It’s all here. So, those are pretty much the only error handling techniques that you need to know inside of any to make sure that you have a way to handle errors. Because what you start to realize when you’re working with clients is that building it for fun when a YouTube video like this and building it for a client is a tiny bit different. You want to make sure that these actually work every single time, right? Because sometimes when we’re building it for fun, we don’t think about what if it goes wrong, right? We just actually build it. It looks cool. It works in that moment, but what if it doesn’t work? And that’s when we use these techniques depending on your use case to be able to mitigate that error to be able to uh be safe when something happens. Hey, so in this video I’m going to show you 30 edit and hacks that I wish I knew when I got started that’ll help you make your workflows at least three times faster and save a ton of money on execution. All these are hacks that I had to learn the hard way over the course of the past 12 months building and selling automation to businesses. If that sounds like something that you want to improve on and learn, then this video is for you. Let’s dive in. So the first hack is actually software updates. So sometimes when you build automations on Nitnen and a lot of times when you watch videos of people actually adding steps to the automation and they go here and they look at an app sometimes you don’t have it in your own software. It’s because Nitan actually updates the platform so that they’re able to add more and more uh nodes more and more actual executions or or stuff to the platform so that you are able to make your workflows more efficient. And so the thing you have to do the way to update your your workflow or your uh account is to go to sign in. You’ll be brought to this page. All you want to do here is you want to manage. You want to go here and you want to press the latest version. In this case, this is beta. So, you might want to press the one below or alpha or the latest stable in this case, which is the most stable version of Nitto end as of right now. That’ll help you build your workflows in the current version. The second hack is deactivating workflow. So, let’s say I have a workflow right here, trigger manually. Have a HTTP request which talks to a server. And then step after this is edit or set fields. So, x equals y. Right? And in here, let’s say I have my website. So if I press execute step, now this will scrape the website. Now let’s say I run this whole workflow. This will run this, this, and this successfully. But let’s say I had a problem when I was running this. Let’s say I add some more stuff. Now if I execute workflow, this will stop right here. And we were building automations on edit and we want to execute this. Even if this fails, then all you have to do is press on the node and press D. This way it deactivates the node so that you’re able to run even the next step without this without this influencing the decision itself and this stops. It doesn’t even consider this node right here when it’s running the automation. So if I execute workflow even though there’s an error here it didn’t run it and it will go to the next step. The third hack is not really a hack but it’s more so the fact that edit end does not charge you for the amount of test executions that you do when you’re testing the workloads. So what I mean by this is that we tested this this and this. These are three different or this is one execution. But if I go to the admin panel, as you can see, right right now I have zero. And if I run this across right now, I also have zero again. Right? So when you’re testing automations in Nitn, the the actual amount of executions that you do or work for executions that you do when you’re testing does not count to the amount that you have to pay every single month. So to show you when you have to pay for something, I just added a schedule trigger. I’m going to activate this. So now this is going to run every 10 seconds. If I go here, I can see that this is running right now for 2 3 4 seconds. is successful. And if I go here to the admin panel, I can refresh and I can see that now I have one execution out of the 2,500 that I have every single month. So this is more so how edit actually charges you on the platform. Uh but just know that when you’re testing the automations, you are not charged for the execution workflow executions that you do on a testing phase. The next hack is actually pinning data. So let me remove this. Let me put a trigger manually. We have this. Let’s say I have to run this every single time. You see how this may take 10 seconds, may take 15 seconds. And to test this step, let’s say I wanted to to do all the data here. So let me drag this across. Now if I drag this across, so if I execute the workflow, the data here, the result that we get is a result from the previous step. And if I have to get this points of data, I have to rerun the whole thing over and over again. Well, not really because any just added the feature of uh pinning data. So you can go here and actually pin the data so that we’re able to execute this workflow almost instantly right here without having to wait for this nodes to run because we have test data to work with. This is great when you have a 100 node workflow when you have a lot of steps. So let’s say I copy paste this and I have all these steps. So let’s say now we have a four-step execution. If I want to execute the workflow here, let’s say I wanted to get the data from the HTTP without having to run it. I can use the test data that we have in order to actually get the data. In this case, the HTTP was not run because of the fact that it is pinned. But now when you want to activate the scenario and you want to get different data every single time using the HTTP request, you want to unpin this. And to do this, you can press P again. So you can P and P. That’s another hack. Another hack here is actually something that a lot of people underuse, which is the AI feature on Nitto N. If I go here to ask the assistant and ask it, hey, can you or hey, how can we build a human in the loop agent? This AI assistant is one of the best that I’ve seen on any automation platform out there because what it does is that it thinks it actually thinks through what it needs to do but then it consults through the community through the documents first and then a community that has full of people who actually um engage with the community and as you can see it says answer in the community. So it gives you three different places that it pulls information from. So it gives you a very very contextual answer and does actually help quite a lot when you’re building automations. Another hack here is that when I go inside this for example and I want to remove this and I want to pull in data from the HTTP request. Usually I would have to drag and drop this here. But as you can see this is actually code. So if you can actually map this without having to drag this across. All you have to do is square bracket square bracket. I can go dollar sign. I can then look for the nodes that we have to reference. In this case, hey, I want to get information from the HTTP request node, the edit fields node or the other edit fields node right here. Let’s say I want to do HTTP request. I can then put dot and then I have this option right here to do the item which is exactly the one that we want to do. In this case, I can now still get the output I got before without having to drag and drop this. So, the next hack is actually something that I’ve never seen anyone say out on YouTube before, which is the ability for us to add images on our notes. So, notes are a way to document your your automation, which I think is one of the best uh things that actually put out, which is something that are lacking in the auto automation platforms or the way that we have it set up here. So let’s say I have a note and I do image one. Now here instead of putting text which you normally would right you’re not limited by text but you can also add images. So the way to add an image is to put an exclamation mark. You do a square bracket this again. And now you would have to put the image URL right here. So right here we have an image URL which you have to put to then be able to see our image here. So let me pull in an image that I have uh from the web. And so what I did is I actually took a screenshot of this. I made it into a public URL so anyone can access it. And if I paste it, I can see now that I have the image of this automation here. You can imagine now this gives you a lot of possibilities when you’re documenting things to actually add documents or add document pictures or pictures, whatever it is that you have to put to add to the documentation that you’re putting for other people to look at your automations. All right. So the next hack is an error handling hack. So if I go here, delete this and let’s say I have a set node behind or before this. Let me do copy and paste another hack right there. Paste this. And I say I do I give it jm solutions.com. So now I want to pull this variable and put it in here. Drag this across. So then now this is basically scraping whatever it’s trying to access anything that I put here. Let’s say I run this. Now I get an invited URL right here because this right here does not have an HTTP https which which is which is what we need in order for us to actually run this. Now let’s say I go here and I go to executions. I can see that here we have an execution telling us hey you ran this there was an error. So there’s two things we actually can do. The first one is debugging editor. So we are able to access the way that the workflow was when it errored which is great because now we can see exactly what it is that the input was. what is the output? But also the thing we can do is press this button right here which is retry with currently saved workflow. So what this means is that you run a workflow. So you run an automation. In this case it’s this. Let’s say your error is out. You want to try again with the same data that we had so we don’t lose different things. So let’s say we had a Google sheet that was running every single day and it caught the most recent 100 rows. Let’s say one row failed. You still want to execute that same row even if it failed because it is important to us because it’s still a data point that we want to process. The next hack is actually a switch mode. go here to edit node and I put x= y. This is just something that we put just to test. Now the next step can actually be a switch node right here. So the switch node allows us to do different things. The the first thing that allows us to do is to basically send the automation different ways based on where we want it to go and based on different criteria. So in this case we have routing rules. So this means hey if this equals that then send it this way. If that equals this then send it this way. So we say we had a very easy sort of thing. adding rule V or in this case let’s execute a step says we had this equals to Y and this equals to X right so in this case now if I run this and again this is called 01 I can run this and it will send it this way because this is set to Y right and the second thing was Y so there’s actually one hack that we can do here because we can rename the output so right here instead of having zero and one we can have this is X or this is Y in this case and here I can have this is X. So that here I can see that this is this is Y and this is this is X which is amazing when we’re trying to uh let’s say we get emails we get an email that we get and let’s say that if the email contained something in the subject line it was a support email or a FAQ email or something email then we would rename this with support Q&A or something else right and it’s amazing because it allows us to visually see exactly what’s happening in the workflow. All right. So, next one is actually the edit end attributions. So, if I go to Gmail and I send myself an email. So, let’s do send a message. Let’s put my email do hello. Hey there. And I run this. This will use my email to send my email. So, if I go here, I can see that on the email itself, it says this email was sent automatically with Niten. Now, ideally, we don’t have this or we don’t want to have this when we’re using it for businesses who are sending email to clients because we want it to feel more personal and we don’t want to exactly say this is an automation, right? So, what we do here is actually remove the uh edit end attribution. So, if I go back here and I go to add options, I can see that I have append edit and attributions. If I turn this off now, if I rerun the automation, you can see that I got another email from Mika Gem Solutions, but now there was no edit and attribution. There was no, hey, edit and send this. so that we can actually send emails that feel more personal that doesn’t don’t tell them, hey, edit and send this. We have an automation set up. Um, so you can actually use it for your own clients. So the next hack is actually on edit and forms and it’s the way that we actually design the form. So if I go in here and I want to execute the workflow and I want to let’s see test the form. We can see that we have this color right here. We have this font, this color, this layout which is standard for end. But what if you had a company that wanted something with their own brand colors that we can send to clients that makes the client feel more more aligned with or more envision with with the company itself? We can actually customize it. So to do that, we can add an option. We can go to custom form styling and it gives you this code right here. So if we copy this and go to childbt and we say can you also or can you or this is the nitn um general styling form styling code. I want the general color and theme to be blue to be light blue. Again, this you will substitute this with anything that the client has like brand colors and so on. So now we let charge BT run. And this is all within CSS, which is just a way a programming language. It allows us to change the design of things. All right. So it just finished. And by the way, uh these right here when you see hashtag something something something, it just says blue color, blue, white, blue, uh blue, and very light blue. These right here represent colors. So if I copy this and I go back to edit end, can paste it here. And if I want to execute the step, I now see that the form is in my brand colors. It’s blue. And you can do whatever you want with it. You can obviously customize the background and so on, but this add that little touch to us actually being able to customize the form for whatever you want for brand colors. All right. So the next hack is on a schedule trigger. So we use a schedule trigger. We want to run the automation maybe once a day, once once a year, uh every second, every whatever it is, right? But now we can actually customize it even more as in the time triggers like when it actually runs. If you go here to trigger interval. So this is you want to run every second, minutes, hours, days, weeks and months. We can actually do a custom cron. So chron is a way that we express time. So if I go here to documentation, I can see that now I have a lot more a lot more options. You can do a custom. So we can do it every day at 2 a.m. And I can copy this and then paste it here. And this signifies every day at 2 a.m. And it tells you that second, minute, hour, day of the month, month, day of the week. And this over here is a very custom way that you can uh obviously run your automations. But I think it’s really really cool that we get to that we’re able to run automations whenever we want in a very very custom order. I mean, we have a ton, right? We have every midnight, every Sunday, every Thursday, once a week. This gives us a lot more flexibility when we’re building automations. All right. So the next hack is actually on the workflow and the way that data actually moves and the the sequential order that it moves. So an example here is when we have an execute workflow and let’s say we have a series of steps but we have two ways that the automation can go through and it will go through the two ways because we have no filter involved but which one does it do first? Well in this case if I execute the workflow I can see that it goes up here first it then waits 3 seconds cuz I wanted to show you that it then does everything. So this runs the workflow that is actually on the top. So again if I put this to the top we can see that now it executes this first. And this applies for anything you do in case you have three, in case you have four in case you have five. So if you’re wondering why your workflows are running the way they are in the sequential order, just know that it runs the first workflow that it runs is the first uh is the one on the top and then it goes obviously on a worker level on a ladder level until the end. All right. So the next hack is actually on a web hook. If I go here to web hooks, I can see that we have a test URL and a production URL. This is the exact same that we have on forms within Nitn. And just know that the test URL is only used when you’re testing the automations. And once you set them to active, so once you press this button right here, activate this. Now this will now you have to change the production URL right you have to change the URL they’re using for the external server that we have to use uh when you’re putting it to active. So just know that test URL is when you’re testing production URL is when the automation is active. All right so the next hack is actually calling another workflow within a workflow. So let’s say I have an automation right here and I then have x= y right it’s good and now the next step can actually be calling another workflow to do something and then giving us the data. So let’s say I have execute uh sub workflow which is the action that we want to do. Now it’s asking us to source the database which is fine and then it’s asking us which workflow do you want to call in order to to send the data and actually execute before getting the data back. So if I go here I can actually create an sub workflow. So I can go workflow personal in this case and now I start from scratch. So in this right here the trigger will be when executed by another workflow. Let’s leave this to all accept all data which means that it sends everything. And now let’s say I do edit field do hello. I say my name is Mik. Let’s say I do wait. I wait 5 seconds before we send the data back. So let me save this. As you can see we already can’t activate this because it always runs whenever it’s called. But here I can then let me name this hello world. I can now go here and I can choose hello world to be the workflow that’s executed that’s sent the data to before we get the data back. In this case if I execute it I can see that it’s running because it takes 5 seconds of course I mean we have this step right here and then it waits 5 seconds and then it sends it back. If I go here I can see that we have the data back which is my name is Kelly. So this right here what it did is that it sent the data to the workflow and then got it back and now I can move on to the next steps. If I go here I can see that executions. So this was successful and then it send the data back. So this is great when you’re building automations because of the fact that when you build a linear workflow, which means that it follows a very specific process and it’s just one line. You can’t actually add more automations here unless you actually call them, right? So in this case, this sort of acts as an AI agent um which is similar to make.com’s AI agent in the sense that it actually calls workflows uh predefined workflows and it gets the data back. All right, so the next hack is actually using a loop over items. So in this case, we have an automation that starts with the list of YouTube channels. It then lists all the videos. in scripts, the comments from these videos in order for us to actually be able to know exactly what people want and in order for us to have a database full of content ideas and hooks and outlines that we can use to generate content for us. By the way, if you want to watch a full video, check it out right here. And so right here when we go to APify, Apiy is scraping all the comments. But in this case, it gives us 505 comments which we then have to send to AI. Now, typically with AI, it doesn’t actually take in or in this case, it can’t take so much context. It can’t take everything at once because the way that Nit end works is that we have different items. So in this case 505 items which are different comments in this case, right? Different comments. This will run through all the different comments at once. And so what we do here is actually use a loop of items which I can find right here. Loop of items split in batches. And we tell it, hey, only send 50 through until and run this whole thing until here and then send it back. So, we use this right here to loop it all back until we get the other 50 and we get the other 50 and the other 50 until the 505 is finished. This is great because we’re sort of splitting the automation up into different items so that the automation can run the first step. Go back run set amount of items. In this case, it’s 50. It can be 30, can be 100, 150. Um, but in this case, we want to keep it at 50 so that AI is actually able to uh to cover all of those. All right. So the next hack is actually within testing AI agents because whenever you want to test an AI agent, you assume that you need to have an input. There has to be an input for the agent to think through what you just asked it and then give you an answer back. But what if I wanted to test only this part and I didn’t want to chat with it every single time in order for it to actually run. Well, in this case, let’s say I do hello. You see how now because of the input, it then does its thing. If I go here, I can now pin the data. So I don’t have to keep chatting to it every single time in order for the actual agent to run. But bear in mind the data that goes through the input will be the chat input which is hello. And another hack that you can do is actually press this button right here. So you can manipulate the input. In this case, let’s do how’s the weather in row and save it. So now the input changed and that’s what is going to be fed into the agent every single time. So if I go here, I can now only test this step because this is pinned and I don’t have to chat to it every single time which makes testing so much easier. The next hack is actually something that I was wondering when I was building AI agents myself because I thought, okay, we we chat to it on N right here, but what if I want to activate this to a client, right? Do I have to always use Telegram or WhatsApp or Slack, whatever it is? Can’t I just use something inside of Nitn a link that someone can use for a chatbot? Well, the answer is yes. Because if I go here and I go to make chat publicly available, if I copy this, and by the way, you have to activate the scenario first. You have to activate this. Activate it and I paste this in the web. Now I can actually chat to the AI agents. If I say hello, what it will do is that it will think through the AI agents. So if I go back here, I go to executions, I can now see that we just chatted to it and the input was hello, right? And and so you can actually chat to this. So this would be the link that you share with the client whenever they have to talk to it or whenever you have to talk to it as a way to have a personal assistant without having to rely on Telegram or Slack or WhatsApp, whatever it is. So the next hack is actually being able to connect an AI agent to another AI agent. So let’s say I go to tool and I go to agent AI agent tool. I can now see that I have the possibility to connect the AI agent to another AI agent right here. Now this right here is an example of a workflow an assistant that I build that uses this exact feature of calling sub agents within the main agent. Sort of like this is a CEO of the company and these are the head of departments and the head of departments talk to the employees which actually do the exact task. Now, this is great because previously we actually had to make an AI agent somewhere else and then be able to call it on a different workflow and then send the data back. But in this case, we can all do it in the same place. And again, the way to set it up is to go to tool, put the AI agent tool, and then you can simply do the thing that you do here. You can put a chat model. In this case, let’s do open AI. You can do the memory this is here. And now you connect it to any tool that you want, right? In this case, it can be whatever. It can be Gmail here and so on. And the way to actually know whether it sends it here is to be able to give it a prompt to tell it hey only execute this or this is the data that you’re going to get and do XYZ just like a general agent would right so the next hack is actually prompting the AI agent in a very specific way. So if I go here I know that every AI agent has a system message which is a message or prompt that we tell the AI agent whenever we want to give it instructions. So typically the way they would look is we have overview which is an overview of what it needs to do. Then we have tools. And the way the reason why we actually use these hashtags is to give it a it’s called markdown formatting. So this is heading two. This is heading one. This is heading three. In this case, we can leave it at heading two. And then we also have rules. It’s something that people don’t even put whenever they’re using AI agents. Let’s say the AI agent was connected to a calendar and we say, “Hey, can you make an event for tomorrow?” How does it know today’s date? Well, that’s the thing about AI because it doesn’t actually remember today’s date. Let me show you. So if I go here and I have no problem in this case and I ask it, hey what’s today’s date, you see that it says hey today’s date is April 27, 2024 while today is actually 4th of September 2025. So we know that AI is actually not the best remembering dates which is crucial because usually we have tools like Google calendar or Gmail and when we have to say different dates let’s say we say hey send a meeting for tomorrow or schedule a meeting for next week. We want to be able for the AI agent to know when today’s date is so that it can contextualize it when we say tomorrow or next week, whatever it is. So to actually fix that, we go here to the system message. We say today’s date. This is going to be at the end of each prompt. So we have the overview, we have the rules, tools, and all that stuff. And then we say today’s date. Then you put curly bracket curly bracket. You put an S dollar. And then you put right here. Now this right here is going to be fed into the agent every single time as an extra so that it remembers today’s date. So now if I ask it, hey, what is today’s date? Because it knows the date, it can say September 4th, 2025. So this makes a difference because again when you have calendar tools, you want to know exactly when today’s date is to be able to contextualize it for next week or next month or whatever. All right. So the next hack is actually using a GBT that Chris Roberts, I don’t know who he is, uh, but he made a GPT that actually works pretty well when you want to debug or need help with automations. Now, I mentioned that you can go and talk to the AI right here, the AI assistant, which pulls from the community, which pulls from from different places, which is amazing, but it doesn’t actually solve everything. So, in this case, I use this GPT. I give it a picture, whatever it is, some tone of voice, even if you want to ask it, hey, I want to build this automation. It actually does a pretty good job. Now, I’m going to leave the link down below. Again, this is not mine. I’m not affiliated with anything here. I actually genuinely use this and I think it’s actually pretty good GPT. All right. So, the next hack is actually within the HTTP request and the way that we actually set up APIs. So sometimes when we want to add an app, let’s say I go to on app event and I want to look for an app but it’s not here. I then have to go to Google and search up the app name. So the software name let’s say ClickUp and we search up ClickUp API documentation and we get on this page. Now this page is an API documentation is a very follows a very standard uh way of that it looks we have different request we have the summary of the request and then we have something called a curl. Now this scroll right here is something that previously we’ll have to manually and paste into the HTTP request because we have the URL which in this case is the one here. We have the headers which is the one here send headers. Uh and we have the body in this case which is not here. But now we can actually copy this and we can go back here and we can import curl. We can paste this and we can import it. So then now we don’t have to know exactly where things have to go at each time. we can just worry about sending the data that we actually need to send and not setting things up on an HTTP request. Now, one more thing is that a lot of the times when you have to use a software like ClickUp or other softwares as well, we have to use something called an API key. Now, this is a key that we use to say, hey, this is my access token. This is my password. You can access it, right? And most of the times the way that we actually use API keys is by adding them here. So, we do API key and this is not always standard. And then we have to put some long code that you know signifies a password. But in this case, instead of putting it here every single time here, you can go to generic credential type, we then can go to barrier o right here. And we can create a new credential. In this case, it can be the actual API key that you’re using right here. And now you can name it whatever you want. Click up. Press save. And now you’re able to actually access the API key every single time or the HTTP request is able to access the API key here. Uh and whenever you have to use ClickUp, all you have to go is here. you can use click up and you don’t have to re add the API key here. Now the next hack is actually batching. So a lot of the times when you do a HTTP request to a server uh the server actually has limits. So let’s say air table has a limit of I think it was 100 requests per minute or something like that and the HTTP request sometimes can go over that. So for us to actually limit the amount of requests that we sent to the server per amount of time we can go down here add options we can go to batching and now we can add we only want to send 50 items per this interval. in this case is 1 second. So 50 items per 1 second. And so you have to obviously look at the limit uh the API limit that the platform has. But this allows us to be more flexible and navigate errors because a lot of the times we know there’s errors when we send too many requests to the to the actual platform cuz they have a restriction. In this case we say hey only send 53 at once every second. And we can change this. This can be 10 10 million right? Whatever it is that you want to do and you can change the time frame and you can change the amount of items that go through the API request at each time. All right. So the next hack is actually within error handling itself. Uh now let’s say we had a workflow that looked like this. We have the schedule trigger which runs every 10 seconds and then we have a HTTP request that we’re calling. In this case it’s my website. So if I execute the step this gives me the whole code. But let’s say now I activated this which runs every 10 seconds. So now it’s calling the API every 10 seconds. And I wanted to let’s say I changed something like this or added some more stuff here. I press save. So we can see here that we got an error because of the fact that again we put an invalid URL and this does not work. Now the good thing about error handling is that we have debug and editor and we have go back to the same data before that I showed you. We also have something called an error workflow. And this just means that whenever a workflow stops working because it’s an error, we call we send the data to another workflow to then do whatever it needs to do. So let me show you exactly because it it makes much more sense once I show you. If I go here to another workflow, do personal I can add something called an error trigger. So this error trigger basically works so that it receives all the errors from any workflow that you connect it to and then it does whatever. So let’s say I do Gmail and I want to send myself an email whenever I receive an error from any workflow. Okay, so now I made the email right here. There was an error in the workflow. Let me do uh exclamation mark. Go here. I can press save. Now if I go back to the original automation I have to go to settings here. Then I have to go to error workflow. So to notify the error. So in this case, let me name this error. So I know that it is this workflow right here. And now I can choose the workflow to send the data to when it errors. In this case, it will be error as you can see here. And I press save. Now let’s execute this every 5 seconds. Let me press save. Let me press active. So this right here should now when it executes it’s going to error out again like here. As you can see it errors out every 5 seconds. If I go here, I can see on the executions that this was successful. As in it’s getting the data because it there was an error in the workflow. If I go to my email, I can now see that I have a bunch of emails saying there’s an error, there’s an error, there’s an error. Now, this is great because let me actually turn this off cuz I don’t want a bunch of emails here. This is great when you have different automations. So, we have a bunch of automations. Let’s say we have 10 or 20 within the workspace. We all connected this. We all connect all the different automations to the error trigger so that we know exactly every single time and it does the same thing, right? Which is amazing because then we have everything centralized and we have everything within one workflow to be able to notify us when there’s an error. Right? So the next hack is actually called a human in the loop. So let’s say I had a simple automation like this. I can go here. I can go to human in the loop and this is across multiple different platforms. So let’s say I use Gmail and I send myself an email and I execute previous notes. This is an example or in this case it’s an error so I can’t do that but uh say hello is this hello how’s it going let’s say I pull something from before previous step and then we have the response tag which is essentially saying hey when I send you the email for you to to check or something submit something do you want it to be an approval so you can approve or disapprove you want to be free text so you can actually give me feedback or do you want it to be a custom form so in this case let’s do approval let’s say I already sent the I can get this and I can approve right here. Now, this sends the data back right here and we got the approval, right? Approved equals true. And now, this is great in case you’re building automations like these. Uh, and by the way, this is a human in the loop AI sales agent that basically starts with the form, right? Let me execute it actually to show you uh which has different fields. So, James, email, company name, intent, budget, project description, timeline. Then we talk to we add it to the sheet. We talk to the sales agent to make a sales email which then is being sent to us for us to say, “Hey, approve or deny or actually get feedback. Then when we give it feedback, the text classifier classifies whether this is good feedback or bad feedback.” If it’s negative, then it uses feedback to rewrite the email. And it goes through the whole thing over and over again until we give it a positive feedback saying, “Hey, all good.” And then actually sends the email to the lead. Hey, so in this video I’m going to show you exactly how you can set up your own Google credentials. So you can connect Gmail, Google Drive, and Google Docs to Nitn and get going right away. Let’s dive in. All right, so if I go to NN right here, I can see that if I go to Google Sheets and I want to connect my Google Sheets to NN, I can see that I can simply just sign in with Google. If I press this button, it will take me to this page. I can choose an account. I will then press continue and the connection is successful. Now this is great because NN previously did not have this, but now they implemented this. So you only have to sign in with Google. This is the same exact case when you want to sign in with Gmail. You want to go here, create a new credential and you can sign in with Google. This is the exact same process and it’s amazing because it allows us to not have to do any authorization or anything like that. We just have to press the button, choose the account and that’s it. But now if I go to Google Drive right here, I can see that I want to press create a new credential. I have to add the client ID and client secret. So how is it that we have to do this? And if I go to Google Docs, you can see that it’s pretty much the same. So if I go here, creating a credential, I have to add the client ID and client secret as well. So in order for us to generate the client ID and client secret, let me go here. I have to go to the documentation. I have to scroll down. The first step is create a Google Cloud Console project. So I have to go log into Google Console Cloud or Google Cloud Console. I have to go right here on the top and I have to press new project. You want to name the projects. In this case, we can name it Google off tutorial. There it is. Going to press create. And now the project is actually creating for you. I’m going to press right here. Select project. And you know that you’re in the right project when on the top left you can see that Google all tutorial. Now the first thing you want to do, you want to go to API and services. And you want to search up for the apps for the software that you actually want to connect your automations to. So in this case, if I go back to NN, I can see that I want to connect to my Google Drive, but also my Google Docs. The first step I have to do is search up Google Drive, Google Drive API, and I want to enable this. This is saying, hey, let’s enable the API so we can use it in the automation. All right, cool. So you get to the screen and we want to do the exact same for Google Docs. Press Google Docs. Google Docs API. I press here. And you want to enable this. Amazing. So now that we have both APIs enabled, all we have to do is go to OOTH consent screen. We have to get started. Put the app name. So let’s do test and it’s end user support email. This will be your email. Next, you can put external which is fine. The email address. Put your email address. Put mine. Next. Agree. Continue and create. All right. So once this is done we can go here the create oath client. This will take us to this page and we can choose the application. In this case it can be web application. Then client can be let’s do color test. Now it’s asking us for two different things. It’s asking us do we want to add an authorized JavaScript origins or authorize zirec. So this right here we leave blank but if I go back to I can see that they said in Google drive use the URL above when prompted to enter an ooth call back or redirect URL. So what we want to do here is you want to copy this URL. Go back to the off client ID and you want to add it to the authorized redirect URLs. Press add URLs. Want to paste this and you want to press create. Once this is done, we have the client ID. Make sure to not share the client with anyone because this is confidential. Going to press this copy. Go back. Paste it here. And now we have the client ID. To get the client secret, all we have to do is go back here. Press okay. want to go here to test and the client secret will be this one right here client secret I’m going to copy this you want to now go here client secret you’ll see the option to sign in with Google so let’s say I sign in with Google this will give me this option I can press the account that I have but now it will block me access blocked and then cloud does not have complete Google verification process so once we get this we know that we have to publish the app so to do this I can go to audience I can go to publish app confirm Now the app is published. So we can then go back to an event. Sign in with Google. Choose the account. It will send me to this page. I can go to advanced right here. I can go to nan.cloud. And now I can select all the different things that we want to do. In this case is edit, view and create. I can continue. And the connection is successful. I can see that the connection is created. go here select connection now I can press save if I go here let’s say I want to create a file from text but let’s say I say hello I press execute step I can see that now the connection was successful I go back to Google docs to pretty much do the same thing so in this case I can create a new credential go here we can go to clients you have a test where actually we can copy the client ID from here so copy this paste it here. Go back. Go to the software or the account. In this case, you can copy the client secret again and you can paste this. Now we can sign with Google and go here. Advanced. Go to end.cloud. Select the different things you want to do. Continue. And the connection is successful. We go back. I can name it. Save. Now, if I want to, let’s say, create a document. My drive folder name is invoice in and I press CSU hello. I can go to execute step. Now the step is executed and we can see that everything works fine. So far you’ve built a solid foundation. You know exactly how to connect apps, how automations actually work, how to use web hooks and how to clean up data. But automations can only get you so far. The real magic is when you build automations and pair them up with AI. So in the next module we’ll dive into the hottest topic of niten which is AI agency. You learn exactly what they are, how you can use them, what is the difference between an AI agent and a workflow, and finally, how you can start building it from scratch inside of an end. And this is where your automation doesn’t just turn into a simple workflow, but turns into a virtual employee. With that being said, let’s dive in. If you’re someone who’s been finally want to understand AI agents, but you’re getting lost in all the technical terms and you’re getting way too overwhelmed, well, this video is for you because I’m going to be breaking down the fundamentals of AI agents as if I’m teaching it to a 5-year-old so you finally understand what this whole hype is about. All right, so we’re going to cover the fundamentals of AI agents and the different types of AI agents. And by the way, if you want to see the difference between AI agents and workflows, check out this video up here. Um, but this is the simplistic version of what an AI agent does. We have an input and we have an output. Between the input and the output, there’s an agent. There’s someone who is prompted with instructions. So, he has instructions saying, “Hey, you have to do XYZ if this happens.” And the AI agent, so the actual thing, the the boss uh which has instructions is connected to its brain and its brain is AI. So, Chad GBT or Claude or Gemini and it has a memory because as a normal human, you remember the previous conversations. So, you have this context and then it has tools. So these are the different things that it uses to take action on something. So in this case, let’s do an example. If the input is send an email, what it will do is that it will think through all the system prompt instructions that it was given saying, hey, if the user says send an email, then call then use the tool which is Gmail. And that’s how the logic usually goes. And so if you have multiple tools, then the AI agent is able to take actions on multiple softwares, which means that it has actions. It can send emails. It could also schedule calendar events. You can get calendar events. It all depends on the different tools that you connect it to the AI agent. Then now it’s able to take action. Okay. So input send something or do something whatever it is. Agent will think through what it needs to do with its brain which is try to be or claw or whatever it is. It remembers the conversation and then it takes action on what we told it to do based on the tool that is connected to and then it will give us the output which is yep everything was good. You’re good to go. And a beautiful thing about this is that one AI agent can be connected to five to 10 different tools. So one input can lead in a series of outputs. It can lead to multiple actions in multiple softwares. Now what does an AI agent actually look like? We’re going to use N10 as an example just because it is the the widely known AI agent uh feature. But the way that it looks like is we have a chat which is the input. So this is a thing that goes into the AI agent. In this case you can chat to it using the native N10 chat node which looks like this. You can say hello, right? Um, you can also use telegram. Telegram is sort of like a like a WhatsApp. You can use Gmail. So, it can send conversations to the agent using email. And now the information will pass through all the way to the AI agent. So, this line means that the information goes through to here. Now, this is where the agent is prompted. So, if I go in here, this AI agent is consisted of three different things. The first one is the source for prompt. So prompt is basically saying hey what is the thing that we’re actually giving the AI agent for it to do right what is what is the thing what is the input what is a chat what is the email and so we connect this so we say connected chat trigger node because currently the AI agent is connected to the chat trigger node this is what this called and then prompt user message which is what is the thing that’s going inside in this case it would be the JSON uh chat input because this is the thing that’s going through here let me show you an example let me disconnect connect this. There we go. Let me go here. Let me say hello. And now the information will pass through to here. Now it gave us an error because this AI agent must be connected to an AI in order to think through. But you can now see that the chat input which is this one is hello is the input that we give it. Now the second thing here is the system message. So the system message is the instructions that we give it. So, sort of like you have an employee and you tell the employee, hey, if this happens, call this. If that happens, call this. You’re training them on what they’re meant to do. Now, usually when it comes to the prompts or the the instructions that we give to the AI agent, it consists of an overview. So, saying here are a helpful intelligent XYZ assistant that does XYZ. And then the tools. Now, the tools you basically explain the different softwares that are connected to the AI agent. So it has context as to what it can do, what tool it can do, what software it can uh it can take action on based on the ones that are connected to it. And then we have rules which are different rules. So it can be when a task requires using one or more tools, make sure to identify which tool is the most appropriate, pass along the relevant details and execute the actions needed to complete the task. So these are different rules that we tell the AI agent to make sure that the quality of output is increasing because sometimes with the fact that it’s AI, it can hallucinate. can make up some stuff. It can do its own thing. And we basically want to restrict it to doing only the things that we want it to do. So again, we have overview tools and rules. And then we also give it the date and time because let’s say we tell it, hey, can you tell John that we have a meeting tomorrow? Well, the thing about AI is that it’s not the best at remembering dates. So we always want to give it a date, which in this case you can simply do by putting curly bracket and then put now, right? So now we’ll give it today’s date. And then we format it in a way where it looks like this. Right, which is good. And now the AI agent will always have a dynamic variable. So it will always have this which changes every single day based on what day it is. And it uses that as context when taking the action that it needs to take. Now obviously this is not used always but when it makes a calendar event when it sends an email asking for a specific time uh this is very very useful. So again we have the chat input and then we have the system prompt which is the instructions that we give to the AI agent when it needs to take action on something. Then we have the LLM plus memory. The chat model here is the brain of the agent. Now I can connect this to the model, right? So this is the um the line that allows the AI agent to then pass through the input to its brain using its instructions and actually think. And in order for us to actually connect the AI agent to OpenAI, all we have to do is go here, create a new credential, and you want to go to platform.opai.com, login. You can go to dashboard. You can go to API keys. And we’re basically making a password that N10 AI agents can use when actually thinking through its LLM. LM just means chbt or cloud. Uh in actually thinking through the instructions. So you can press this button. You can say AI agent create a secret key and make sure to copy this which will then paste right here. And you can call this yeah agent test 3rd October. Press save. And bear in mind that this is not free. So you would have to go to your profile and you would have to go to billing uh right here and make sure to add some money because AI requires you to have credits and credits require money. Uh but it is very very cheap when we’re talking about a few few cents per execution. All right. So now that we connected AI, we have Chad GBT as the brain. All we have to do now is connect the model, right? So, we’re choosing the model that the AI agent uses when it’s thinking through what it needs to do. So, now that we have AI connected to it, let’s actually chat to it. Let’s say hello. And now what you can see is that the input went here. What it did is that it automatically talked to its brain, which in this case it’s OpenAI. And then it gave us an answer. So, the answer in this case is hello, how can I assist you? And this is as if we’re talking to the actual chatbt interface on chatbt, but we’re connecting it using the API version. So the automatic version. Now we have memory. Now memory right here is when the AI agent when you want the AI agent to remember previous steps or conversations uh when you’re doing something. So this is useful when you’re basically creating a drafting email to John and then um the AI agent already knows who John is and then you say, can you also schedule a calendar event? So now it has context as to who John is to then be able to take the next action without you having to state who John is in the first place. But on a simple term I can say hello how are you? And now I can also ask it what did I just ask you? If I ask this I can now get the answer which is probably hello how are you? Uh you asked me hello how are you? How can I assist you today? Now as you can see here the logs these are the different steps that the AI agent took in order to get to the output. Right? All right. So in this case what it did is that the AI agent went through the simple memory. So it remembered uh exactly the conversation that it had using the context. Then it uses AI to think through its uh instructions and then what it did is that it used the memory tool again to give us the actual answer. All right. So now that we have the LM connected to this end the memory this tool right here. So this is how the AI agent actually takes action and we can connect this to Gmail and calendar. And inside the Gmail, we set a series of instructions and different details to allow the AI to define what the subject line is, what the message is, and who are we sending the email to. And same thing with the calendar. This is going to be another tool that the AI agent has access to in order to take actions for us. And we give it the before and after of the event that we want to schedule or in this case, we want to get the event. Um, and now if I speak to the AI agent, this is prompted, if I go here, this is prompted with the two different tools. So, Gmail will be used to draft an email. Uh, calendar will be used to get calendar events, right? So, it knows exactly when to use each tool. And when I say, hey, can you send an email? This should now send back or should ask me who are we sending the email to. So, I say, hey, I can help you draft an email. Can you provide me with the details of the email such as the recipient email address, a subject line, and the message you’d like to include. So I said send an email to mik.torgmail.com saying we have dinner tomorrow. What this will now do is that it will take action on the draft. As you can see, it just called the tool. So just send a signal to the tool saying, hey, I just got received instructions to do XYZ. Can you do it? As you can see, we went through step by step right here. And now it says we have drafted the email to Mik. So if I go to my email right here, I can see in the draws that we have dinner tomorrow to this person right here. Obviously, you can improve the prompt to make the email actually more contextual or uh I guess more sauce in the email. But just know that it called the exact tool that we wanted to call to take the action that we wanted to take, right? Without us having to go to the Gmail tool. And it did it within seconds. Now for my calendar, let’s do an event um lunch and let’s do dinner, right? We have one on Friday and one on Sunday. If I go to any 10, let me ask it, can you grab the events from this week, please? What this will now do is it will go here. It will think through what it needs to do. It will then call the appropriate tool to then give us an answer back, which should give us lunch and dinner. Um, as you can see here, we have Q&A with Shaz, which is something that I did before. Lunch and dinner as well because these were the three events. We have Q&A with Shaz, lunch, and dinner. And that’s how fundamentally a simple version of an AI agent looks like. It’s connected to an input. It think through its LLM uh because that’s how it’s its brain works. It it remembers the conversations and it takes action on the the things that we wanted to do using different softwares. Now, this is called a simple AI agent. Now, we can get on to the multi-step AI agent. So, this is an AI agent that is connected to more AI agents and more tools, right? As you can see, it’s more complex than just a simple walkthrough. And by the way, if you want to see the full walkthrough of this AI agent, check out this video up here. But essentially, the way that this works is that we have an input and we have an output. This is always the case with AI agents. It doesn’t change. Now, the only difference here is that we still have the system prompt instruction. This is still the exact same. It still has a brain, which is LM. It still has a memory, but the only um change is that we’re not calling tools as a first step. We’re calling other agents in the first step. So fundamentally this is why because the most important thing here that matters it’s not so much the tools it’s the prompt that we give the AI agents because the prompt is the instructions and so if we instruct an AI agent to take action on 55 different tools like these well the chances that it would actually succeed are pretty low even though we have the best prim in the world because of the fact that um it be non-deterministic right it can fail right because it’s AI and so what we do here is you want minimize the failure rate of an AI agent. So what we do is we add more AI agents. And so the way to think about this use case is as if you have a company. So a company right will be the customer which is the input. It then tells the the CEO hey can you can you maybe check the finances that we have in our company. And now the CEO is presented with head of departments. So in this case we have the head of calendar, head of email, head of blogs and head of contacts. and the head of contacts and blog and email and calendar have access to tools which are employees, right? And so why do we have head of departments and not just have employees connected to the CEO? Because if a CEO had access to a 100 employees and he was given a task from his client, it would be hard for him to know exactly who to assign it to. He would get it wrong most of the time or some of the time. And so when we want to minimize errors, we want to assign a head of department for that specific role and let him figure out who to give it only for the employees in his department, right? So the tools are only connected to the calendar agent for the calendar tools. Same thing with emails, blogs and and contact as well. And so what ends up happening here is that we have a big Agent and all of these are subset of this. So this is one which is the same thing as this. This is one which is same thing as this. This and this as well. The only difference is that the memory is only connected to the main AI agent. And so here we have telegram which is the input. So we can give it a voice message or even a text. All right. So here we have telegram which is the input and we have the whole AI agent. And let’s say now I wanted to uh send an email and schedule a calendar event. As you can see, we also have the contact agent, which in this case, we instruct the main agent to always look at the contact agent before sending the email and before making the calendar event because this contains the detail of the person that we’re doing all of this for. And as you can see here, the contact database consists of Michael James, John Lori, and James Low. So, we can first run this. So, now it’s waiting for the messages to come through. And now with Telegram, we can say, “Send an email to Michael James, uh, telling him that we have dinner tomorrow at 5:00 p.m. And can you also put that on the calendar and invite him as well?” Um, yeah, that’s it. All right. So, now we give it an input. Let’s press enter. What this will now do is it will then go to the AI agent. It will then talk to the contact agent because we instructed to use the contact agent first before doing anything else. And now it will take action on the email. As you can see, it used this tool which send an email. And then it sent it to calendar agent at the same time to create an event. Now, if I go to my email right here, I can see that I have dinner tomorrow. We have dinner tomorrow at 5:00 p.m. And in my calendar, I can see that I should have dinner with Michael James at 4:00 to 5:00 p.m. And it also invited his email as well, which is nuts. So, why is this any different from the previous one? Well, this is a very very simplistic version of an AI agent, whilst this is more advanced. It has more features and it breaks down the different steps step by step. Right? As I mentioned, we have the CEO and we have the head of departments and the head of departments are connected to different tools and these tools are employees, right? Instead of giving all the employees and hooking them all up to this tool because then it will overwhelm the AI agent. It has way too many options. The prompt will be way too big. And so we basically want to construct it or deconstruct it and break it apart for it to actually have room for thinking when it’s taking the action that it needs to take. And so this is really really powerful because just by having this one input, it can lead to what over over 10 12 actions, right? Which is nuts. Which is why AI agents are really really powerful when you want to have something that’s autonomous. That’s why they say it’s your virtual employee because your virtual employee in this case is connected to different tools which are different actions and it can do different things for you. But bear in mind that if you want the AI agent to do more things than you have right now, then you have to connect it to more tools and more softwares, right? And what I always think about when I’m building AI agents is that we never want to overwhelm the the AI agent, right? Because if you give it a prompt that’s super super long, it’s still AI, right? Like there’s no 100% fact or no 100% um guarantee that it will always do the same thing. And which is great, which is fine when you’re testing, but when you’re putting it into an actual business, like the margin for error needs to be very, very, very I’m talking like 0.00001% chance it fails. Uh because it’s in production mode, businesses need to actually operate. And so you don’t want something that sometimes work, that most times works. You want something that pretty much all the time works. By pretty much, I mean like 99.99% of the time works. Um but there’s still obviously that that thing of like AI not being able to do everything, right? But it’s great that we can now chat to it and it can now take action on everything that we want. So this right here is the fundamentals of AI agents. Let me show you another example of AI agents and where these can come from. I can simply go to chat GBT and I can just search up Asian mode. So agents are pretty much everywhere because a lot of these software tools, they’re implementing these sort of autonomous systems where you can just say, can you go to Google and find the top five marketing agencies in Ontario, Canada? And just by this prompt right here, what it does is that it thinks through. So it thinks through the actual task and then it takes action on the thing that we told it to do. So now it’s thinking which is the exact same with any as in it has a brain that it thinks through. So as you can see now it’s cross-checking it’s doing a ton of research uh for us and a good thing is that we can see it live what it’s doing which is amazing. And one step above this is I can actually take actions on our softwares. So this right here is obviously going to Google on its own but we can say hey go to my notion and create a task or go here and do something else. All right. As you can see here we got the different agencies the location the key specialties and the evidence as well with all the different sources. and a summary as well which is crazy as in we gave it a simple prompt. Can you go to Google and find the top product marketing agencies in Ontario Canada this is something that you give to an employee and it just did it for 2 minutes and it did a ton of research as well. So that’s exactly why AI agents are so powerful because whether it’s Chad GBT, whether it’s and AI agents, whether it’s relevance, whether it’s lovable, whether it’s Gemini canvas, right? Like we all have different uh the AI agent fundamentals don’t change. They don’t change because they all have an input. They all have an output. And the middle part is the thing that really drives the value because it takes action on us without us having to be so explicit with the instructions or the input that we give it. If you’re enjoying this course so far, then you’re going to love the community that we have right here, which is the AI Automation Circle. is a space with over 3,000 individuals or legends looking to learn AI automations from zero either to apply it in their own business or start selling it to businesses or start their AI automation agency. People introduce themselves every single day. They ask questions, they share wins. We have unlimited tech support. We have all the YouTube resources and people looking for jobs and partnerships. And if I go to classroom, we also have a AI automations 101 course, which is a mini course on AI automations, very similar to this one, but that dives deeper into more frameworks that we use when we’re applying automations to businesses. We have Templates Vault, which is a library of all the different automations that we’ve built so far on YouTube, as well as the blueprints as well. We have weekly recordings because we have two calls a week, and you have all the recordings here. And you also have over $20,000 in discounts with softwares across no code automations, across project management, across AI tools, across marketing, LLM, and other tools as well. As I said, you have two calls a week. And our members are spread out everywhere in the world, which is literally awesome to see. If you want to join, check the second link down below. So, in this video, I’m going to show you step by step everything that you need to know about building your first AI agent on NN. So today, you’re not just watching me build it, but I’m walking you through my thinking, showing you the shortcuts and the mistakes. So by the end, you’ll be able to build your own AI agent with confidence. Let’s dive in. All right. So before we get to the actual build and showing you an end on a high level, what an AI agent is something that has an input and has an output. In between the input and the output, it does a series of actions. So for example, the input could be can you draft an email, right? You send that input over to the AI agent which has instructions has a system prompt and based on what you tell it. So let’s say draft an email like I mentioned it consults with the brain and LLM based on the instructions it was given like hey he just told me to draft an email um what do we do and then based on the instructions and based on what it has to do. So for example if he says draft an email then talk to Gmail. If he says check all the calendar events talk to Google calendar right based on the obviously the instruction was given it will then talk to the tools. It will send a request to the right tool that it needs. In this case, it will be Gmail if it has to be dropped an email. So, it will send the request to tools to Gmail and then from the Gmail it will get a response which would be like hey 200 which means successful. And it will then give us the output which is hey it was all good it was drafted. Check your inbox or whatever right? So input output uh system prompts instructions that we tell it every single time like hey if this happens do this if that happens do that. Brain LLM is essentially what the AI agent is using to think right the open AAI or claude whatever it is and then the memory itself basically is important because it actually remembers the previous questions that we asked it. So let’s say the first question is how are you and then we ask it hey uh can you draft an email for me on the third try we ask it hey what did I ask you on the first on the first question it will remember because it has a context window that’s what we call it that’s what the memory is so input is hey can you do this AI even thinks through the instruction that we will give it through the system prompt it will then talk to the AI because that’s how it thinks that’s it brain and then it will use any tool that is connected to it that it needs to use for that specific task it also has a context window and it will give us the output okay so that’s on a high level what an AI agent is so The first step to building an AI agent is going to NN and pressing sign in. You’ll have to make an account. There is a free account, but I believe it’s 14 days free trial. So, after 14 days, you’re going to have to pay. That’s the way that I have set up. Not really a big fan. Not sure about Zaper. Mic.com definitely has a free plan to start, but um N right here. It will come to this page when you sign up. All you have to do is press open instance and you’ll come to this page right here. Now, this page is essentially the dashboard of N. This is what N looks like. Uh right here on the left hand side, you get to see home, personal, which is in case you want to divide different things in different folders. Uh you have your different automations here, credentials, executions. Uh these are some different metrics that they track. Um just so you know exactly what you’re doing within your workspace. And then right here, this is where you want to press create workflow because this is the canvas for and this is where everything starts. The automation starts here. On the down hand side, we have this right here where we can basically move the automation around. We have zoom, we have um zoom out, we have go back, we have basically if the automation is here, it brings it all back to the center. So that’s what this button does. tidy tidy up right here which also has keyboard shortcuts. Then we go to editor right here which is where you can edit the automation executions where you can see all the different executions that you’ve done. So execution just means you run the automation from start to the end you can see all the executions here. And then evaluations is just for some testing. I don’t use it that much so don’t really worry about that. Then you have this button right here where if you toggle this on it will activate the automation. And what it means is that when you build an automation from start to the end um you can activate it so you don’t have to run it once every single time. Right? production it happens every single time without you having to go to NN then share you can share save you can save the automation then right here you can actually download the automation and you can import from file so let’s say I download this automation I then give it to you and you import it into your own NN you will have the automation done for you don’t have to worry about it so that’s how automations NN workflows really work then right here you can see that you have plus which is basically where you can add the different steps to the automation then we have this right here which is add sticky notes in case you want to add sticky notes right here and you want to sort of walk you through that’s good for documentation in case you’re building an automation you want to explain to someone who hasn’t really seen the automation how it works you can just put sticky notes here and then here you can have the side panel and then here you also have the AI assistant which is one of the best that I’ve seen so far within N&N um and it actually answers most of the technical questions that you have all right cool so now that we got through all that part let’s start with adding the first step so this right here is a node right this square right here is a node when we press on this node we get this panel right here now in order For us to build an an agent, we ideally want to talk to the agent itself, right? We want to chat with it. So the trigger basically means what’s that first thing that actually starts the workflow like what is that thing that activates that starts everything. So in this case we can trigger manually which means that you can let’s say we go here we can execute workflow which means that it starts the automation and this just executes the automation starts the automation from scratch but this isn’t really best for us when using an AI agent because we have to trigger manually every single time. Then we have on app event on a schedule which means you can run it every day or every hour. This is based on apps. Then we have a web hook here which is where you can use web hooks to get notified. We can use a form we can use when executed by another workflow and then we can have chat message when running evaluation and other ways as well. Now for AI agent specifically we’re going to use on chat message which means I can actually talk to the AI agent itself. So let’s say I open the chat I can then start talking. This is basically what’s going to start the automation. So let’s say I put hello it will start the automation. So the node executed successfully. This means that everything was good. And you can see the green mark which means that everything was good. All right. So in order for us to then connect this chat message because ideally we want to talk to the AI agent. We don’t just want to talk to any end right? We want something out of it. We want to press plus and then we have different options here. Now the options are AI which is what we’re going to use action and app. So you can actually scroll through all the apps here and you can add any apps here. data transformation flow core human in the loop add another trigger which are cool things that you actually can use but for the sake of this video and AI agents we’re not going to go into that but let’s say we press AI we then have different options we want to press AI agent now you can simply talk to anthropic which is claude you can talk to open AI individually or Gemini but for this case the AI agent uh node is exactly what we want so when you press the AI agent node uh which is obviously the node is just a square this thing will come up now the way that end is actually set up which is probably one of the platforms that I’ve seen they have the input here which is the steps from the previous so the variables or the things the output from the previous step then here so this is the input then we have here the configuration of the AI agent this is how we set everything up and then here is the output so what is the output of the AI agent so going here we have again by the diagram that I showed you at the start you have three different things that you have to connect the AI agent to the first one is a chat model so what chat model so in this case what LLM openai claw whatever it is uh do you want to connect the AI agents What memory do you want to connect it to and what tools do you want to connect it to? So in this case for chat model I can just press plus. I can then have a choice of few a few chat models. In this case we just go safe with openi. So I can go here openaii chat model. You’ll have this page. All you have to do to actually connect the openi chat model is go here to credentials create a new credential. Now in order for us to actually connect openai to nn we need an API key. Now API keys API stands for application programming interface. It’s the way that a lot of softwares talk to each other or how softwares talk to each other. Uh and the key itself allows us to authorize that this is our account and we can actually use it. So in order for us to get the API key, all we have to do is open a doc. So you can simply talk to the the AI set in NN. But in this case, we can just press open docs. This will open the uh documentation for NN which is where we can look at this. Now it says refer to the OpenAI API documentation uh API keys create. Okay. So all you have to do is log into openai account which is essentially platform.openai.com. You’ll have to make an account. So sign in with Google. And by the way, just because you pay for Chad GBT does not mean that you can use this different things, right? Different things. One is for the web and one is for APIs. So once you log in, you’ll have you’ll come on this page. All you have to go to is dashboard. On the left hand side, you have to go to API keys. And this is where we can create a secret key. So go here. Let’s do test YouTube. And I can create a key. So leave this all here. Owned by me. All restrictions. Project is fine. Let’s create a secret key. I want to copy it and then paste it in edit end right here. Paste it here. And if I press save, this will save it. Right. Connection tested successfully. So now the open AI is actually connected to this. Now for the model itself, I want to leave this to GPT 4.1. You can use a bunch of models. Now bear in mind that not all models work with AI agents. They might work with a normal AI node that you can use AI in the process for a workflow. But for AI agents, not all of them work. So in this case, leave this as GPT41 mini. Uh and then we go out. Okay. So in this case now, we connected the open AI chat models to the AI agent. And then we go down to memory. Now memory is basically saying what memory do you want to implement in the AI agent so that it remembers the conversation that we’re having. So if I press simple memory right here, you’ll have you’ll come on this page and you have the session ID which just leave this as this because we want it to connect to the chat trigger node. uh the session key from previous node. Leave this as is. We don’t need to modify this. I mean, we can’t in the first place. And then it’s asking us for the context window length. Now, the context window length just means how many past interactions does the model receive as context. Now, what does this actually mean? Let’s say we say hello and then it says hello, how are you? Good. That’s four different uh interactions that we’ve had, right? So, four different things, four different messages as a total. So you want to make sure that the context window is a bit larger in in cases where you want the AI to actually remember the previous conversation in case you want to change some things. Um so that’s what the context window length is for. Now I want to leave this at five just to keep it simple. Again don’t change any of these. Just put five here and that’s all good. And now the AI agent can actually have a memory. And then we have tools itself. Now tools are essentially softwarees that we connect to the AI agent. So when we say draft an email, it will go to the software and actually do it. but it needs to be connected to the software in the first place. So for today, let’s uh let’s make an AI agent that can draft an email and that can get calendar events. I think that’s the pretty the most straightforward one. So all we have to do to connect the tool is first for email, we have to connect Gmail and for calendar we have to connect Google calendar. So we press and now it’s going to ask us to do different things. In this case we just want to connect it to other tools. So in this case we have a lot of integrations, a lot of softwares. We can see we have Asana, Apify, Claude, Air Table. In this case, the search for Gmail and we have Gmail tool. When we get to the Gmail tool, this is how you connect Gmail to NN. I go here and I can press create a new credential. When I press create a new credential, it’s very, very straightforward. It used to be harder before. All you have to do now is actually just sign in with Google. When you sign in with Google, it will take you to this page right here. You can choose which one you want. In this case, let’s just do this one right here, my work email. It will say connection successful. Now we can go back to NN and we can see that the account was connected. Now name it whatever you want and that’s the name there and you can save it. Okay, that’s how you connect your Gmail to NN. So once you have this you can then put tool description as set automatically. That’s fine. Then resource let’s just put draft because you want to draft an email not actually send the email. And then for operation we can put create. That’s fine cuz you’re creating a draft. And then for the subject and the message which just means subject of the email and a message of the email. we can press this little button right here which means that we let the model define different pattern. So we let the model say hey based on what you’ve given me using AI this is exactly what the subject line is going to be. So in this case I just put this button right here which means that it will be defined automatically by the model and also this button right here. So that way when I tell it to drop the email I don’t have to tell it exactly what the subject line needs to be and I don’t have to tell it what the message needs to be. Right? Everything is just straightforward. It does it on its own based on the context that we give. Okay, cool. And then leave this as text. Uh you can use HTML which is just a way to make the emails fancy. Um and that’s fine. And then here I think yeah we have to add two email. So two email essentially who are we sending the email to that we’re drafting. So in this case you also want to put this right here. Let the model define the parameter because the AI agent actually decides or knows the email or it’s going to ask us the email that we need to draft the email for. Uh so it will add it here as well. And then we want to put create a drafting Gmail. That’s fine. All right. Cool. So now we connected Gmail to the AI agent. Now let’s do calendar. So go here, press plus and look for Google calendar, Google calendar tool to connect it. I already connected. You can see everything. Uh but in this case, let’s just put create a new credential, sign in with Google again. Do the same thing we did for Gmail and it’ll bring it all back. You can close it, I think. Yeah, close it. All right. So now that we connected our account, all we have to do is set this automatically, which is fine. The resource will be event. Uh the operation will be get many because we’re getting many events. You can see here you can retrieve many events from a calendar which is exactly what we need. Uh the calendar which is mine which is fine. The limit will be 50. So 50 events can be um retrieved at the same time. And then it’s asking us what is the time frame before and after in this case because it’s not fixed. We just want AI wouldn’t let the model define this. So based on what we tell it so let’s say we tell it tomorrow. It will know that it’s after yesterday. Um so after today, sorry, after today, then before tomorrow or before in 2 days, right? Um that’s like the time frame between each one. So that’s that’s the thing we want to let the model do. All right. So that right there is how you connected the different tools to the agent. So we have the chat model, we have the memory, we have the tools, and now on to probably the most important part is the actual prompt, the system instructions that we tell the AI agent. So if you go here, we have to add an option which is the system message. So the system message is essentially I mean like this example, we’re telling the AI agent what it needs to do. So for the system message I actually have a structure that I use every single time which is this right here. First we say you are a identity. So you are a helpful intelligent assistant AI agent designed to handle various tasks efficiently. Your primary role is to task. So to do the different tasks that we have in this case is draft an email and get calendar events. You have access to how many number of tools? In this case is two to help you fulfill um requests. The first tool is draft an email. So what what does it do? In this case it will drop an email. Second tool is calendar. In this case, we have to get calendar events. And then you say, when a task requires you to use one of more tools, make sure to identify which tool is most appropriate. Pass along the relevant details and execute the actions needed to complete the task. Your goal is to be proactive, precise, and organized in managing these resources to provide a smooth experience for the user. And then we say, here is the current date and time. Now, why do we say this? We say the date and time for today because AI is actually not the best at guessing what date it is today. So, we always want to put this especially when you’re including any uh any times into your emails or any times into the calendar because if we say tomorrow, usually it might mess up in knowing what today is, right? So, definitely we’ll get tomorrow wrong. All right. So, this is the prompt that we have. Let’s copy this. And by the way, I left all the resources down below. So, you can copy this. I’m going to go to NN and then I’m going to delete this. I’m going to paste this. And I’m going to press this button right here, which basically puts everything um on a wider scale so I can actually see it. All right. So we have identity. So you are a helpful intelligent intelligent executive assistant. Now AI agent design tasks. Your primary role is to let’s delete this and put draft emails and get calendar events. You have access to two tools and then first tool is Gmail. Explanation is Gmail will be used to draft an email. First step is identifying what email we are drafting the email to. then understanding the context of the email and then actually dropping it. And then second tool will be the calendar which will be uh this tool will be used to get calendar events for any given time frame. First understand what the time frame is and then understand what kind of uh then return the calendar events. Okay. So why am I saying I’m giving an extra instruction. So I say the first step is this, second step is this, third step is this. is because the only downside to an AI agent is that we’re relying on a prompt to do things for us. So for us to actually implement it and actually working 100% of the time, we want to make sure that we give it as clear instructions as possible. Uh so in this case tools to get calendar events and then we leave this as here. Okay. And we go here. All right. So this prompt is done. All right. So the AI agents is successfully set up, right? We have the prompt, the chat model, the memory so it remembers the conversation, the Google calendar which we can use to actually get events. creating a draft using Gmail and then we can now actually test it. So let’s go here. Let me go here and let me actually talk to it. Let me say hello, how are you? It usually never likes this question. It will talk to the chat model. It will think through the things that I told it and it will say hey he just asked me how I am. I’m not going to use any calendar events or draft because that’s not the instruction that was given. So this is the the thing about AI agents. They’re smart enough to understand. Uh, let me ask it so you can see the memory. What was the first question I asked? The first question you asked was, “Hello, how are you?” So, you see how it remembers previous ones? That’s the memory that it has. It has the context window like I mentioned. All right. So, now let’s actually put this to test. Let’s create a draft on the email. Um, let’s say I want to create a draft uh email draft. So, it will think through does do I have enough context to actually create the email? And then it will ask me, hey, they received an email address. It needs a subject line. It needs the message or content you want to include in the email. So in this case, I’m going to give it a email address. So the email address will be my email. So this is the email address right here. And then in the email, just say that I’m happy you are building automations on NN and that you are going to take over the space. There you go. Right. So we save this. What it does is that now it has enough context to actually draft the email. It’ll send back an email saying, “Hey,” or send back a message saying, “Hey, I’ve created a draft for you with a message expressing the happiness about building automations in NN.” And so, if I go to my email now, right here, I can see that I have drafted an email saying, “Hey, great to see your work on NN Automations. Hik, I’m happy you’re building automations on end. You’re going to take over the space. Best regards.” Right? And this was done using AI. I just told it to the overall context of the email and it show it does it did the subject line and it did the body of the email and it send it to the email that I told it to. So that right there is for the Gmail like thanks thanks a lot. All right so let’s do the calendar. So let’s say I let’s go to my calendar. Let’s see what I have on this week. Okay. So this week I have groceries tomorrow and then I have strategy session with James on the 21st. These are all connected to different accounts. So if I say theoretically can you get all the calendars that I need for or give me all the events that I have on this week it will say I have outskill I have strategy session and I have groceries. So let’s go here. So now I’m going to ask it can I have all of the events I have going on this week. So now what it does is that it talks to the AI goes to Google calendar pulls it back. It takes a while because I have three events or four and it tells me every single thing. So I have outskill on August 14th, groceries on August 19th, strategy session with James on August 21st, uh, and outskill on August 24th. Now outskill is something that I had today like this morning at 1:00 a.m. Um, which is why it tells it as well. Um, so that’s why it says next day and it gives me all the events right here. Right? So I don’t have to go to a calendar. I can have an AI agent actually pull this for me. Now this right here is a very very elementary example. I just wanted to show you exactly how you can build one step by step. And we only have Google calendar and we only have credit drafting email. But we can add hundreds of more softwares to this which makes AI agents incredibly powerful to use for businesses because it saves them the time to have to go to the software to find something. Right? So very very good. Now the most important thing when it comes to the AI agent is not the tools itself. It’s not the memory or the model. It’s the actual prompt that you tell the AI agent to do. because once you have 20 tools hooked up, right, like these, once you have 20 or even 30 tools hooked up to the same AI agent, it makes it incredibly powerful, but it also increases the error or the chance that it actually errors out. Errors out just means that it doesn’t do what you want it to do, right? So, you want to make sure that the prompt itself is so so like 90% of your time or 80% of your time should be spent towards the prompt because you saw that setting things up on Google Calendar and Gmail is actually not the hard part, right? You want to make sure that what you tell the AI to do, it actually does it. So, that’s what the prompt does for you. Congrats on now being able to understand and build your first AI agent inside of init. In the next section, we’re actually going to make it smarter. We’ll dive deep into how you can actually build high-erforming, scalable AI agents using advanced frameworks and prompting techniques. You’ll discover how you can structure AI agents using data tables, integrate them with thousands of AI models, all within one tool, and apply practical frameworks that will make them 10 times smarter. So, by the end, you’ll not only be building agents, but you’ll build actual systems. In this video, I’m going to show you eight Nitn AI agent hacks that I wish I knew when I got started that will help you build AI agents at three times the speed and make them way more powerful. All right, so here we have an agent in Nitnen. And the first hack is that you can actually chat to it, but you can make the chat public available because tons of times you can actually speak to the AI agent like this. But what if you don’t want to go into any what happens then? Do you have to use Telegram? Do you have to use WhatsApp? Well, in this case, you can actually get a link using this button right here. You can copy it. We can then make the actual agent active, which means that we can use it now. And if I paste it here, I can see that now I can actually chat to it as if it’s a chatbot. something that most people don’t know because that hence why they connect this to a telegram or something else. Well, you can actually just use this URL which is public that you can chat to it say hello and this will execute right. If I go to executions I can see that we just executed the workflow right it went here it used the open router which is the LM which is his brain and he gave us hey how can I assist you today and let’s say I wanted to send a message in Gmail I said send an email to mikuela.45gmail.com [email protected]. I’m going to press go. So, we sent it a message and now it’s asking us, sure, what would you like the subject and message email to be? As you can see here again, it ran. So, if I refresh, I can see that it ran again. And the input was send an email to me. 45. And if I say that we have dinner tomorrow, I can go. This would just ask me the subject line because of the fact that we didn’t prompt it, right? But let’s say it’s dinner at 7 p.m. And now you can see that the email about having dinner at 7:00 p.m. has been sent. So if I go to my email, I can see that we have dinner at 7 p.m. right here. All right, the second set of hacks is within the brain of the AI agent, which in this case is Open Router. And in case you want to watch how to connect Open Router to N10, check out the video up here. As you can see here, we have all the models that we can think of. Quen, Grock, Chat, GBT, Deepseek, all that stuff. But the hacks is within the options. So we have all these options that most people don’t use because they have no clue what they are. So the first one is frequency penalty. So the frequency penalty can either go to I believe two and it can either go to -2, right? So from -2 to two. A lower value tells Chbt, hey, can you make the actual thing more repetitive? Which means whatever you’re saying, use the same kind of words. Whilst if I put two a higher value, it’s more creative. So we’re giving Chad GBT or the I’m saying Chad GBT because we’re using OpenAI, but we’re giving the brain or the AI agent the ability to change how repetitive it is with the answers that it gives us. Then the second one is maximum number of tokens. And so a token is actually four characters. So if I put a token limit of let’s say 200, this would be roughly 800 characters, which means that it will cut the actual text, the output that the LLM in this case gives us. This is great if you want to set a limit on the amount of words that you want the AI in this case the brain to give you to actually save money on credits for the chatbt claude gro anything like that. The next one is response format. So we have text and we have JSON. So usually you would have text but JSON is great in case you want to take some sort of input and structure it in a way where we have variables come out right. So let’s say we have a block of text which contains first name, last name and email, right? But it’s not structured. It’s all within one place. We use JSON to actually structure it. So we can divide the first name, divide the last name, and divide the email. But usually we use text just because of the fact that we also have another hack which allows you to do that structuring thing that I just told you about. Then we have presence penalty. So instead of words in this case, it’s the topic itself. So if you put a higher number, then it’s more creative. A lower number is more repetitive. Then we have sampling temperature. So a lower temperature in this case is more predictable. And the higher temperature is more creative. So we give AI the ability to be more creative when giving us the output. Then we have timeout. So sometimes the AI agent actually runs and the open router starts running and it doesn’t work right. It keeps on running and running and running. Maybe there’s some problem with a server. So what we say here is we say hey you have 360,000 milliseconds I assume maximum amount of time request. Yeah milliseconds. And we say hey you can only go until this long and after that just stop. It’s just easier when you want to error handle which means that when something goes wrong just stop the workflow. when it runs past a certain time period. In this case, it’s 360,000 milliseconds. Um, and we just stop. The next one is max retries. So, sometimes you use open router the LLM, but it doesn’t work. So, you say, hey, if something doesn’t work, just try again this many times. So, if you put 10, then it will try again 10 times. Then we have top P. As you can see here, if I go hover, it says controls diversity. So, it’s controlling the diversity of the output that we get from the LLM. All right. The next hack is actually the ability for AI to be able to enable a fallback method. So enable a fallback method means that if this doesn’t work, we can actually add a new LM as a fallback. Right? So if I put OpenAI here, that means that it will first try here and then it will try OpenAI. So let’s say I go here and I add a fake connection. I do. So just do test save. Let’s do this test. Right? So this is a fake credential. It shouldn’t work. If I go here and I chat to it, hello. What this will now do is that it will go here. It has an error, but it will try again because it has a fallback lm. And so that’s amazing because sometimes the first one doesn’t work, but the second one does. All right. The next one is within the actual memory. So if I go inside, I can see that we have a context window length, which most people still have no clue what it means. What this means is that five, this is the amount of past interactions. So let’s say you say, “Hey, how are you?” That’s the first interaction it responds. Then you ask another question which is can you send an email to John and then can you add a Google sheet? Can you add XYZ? Right? Then it will get the past interactions which is your questions as context for the next output. Right? So if you put 10 or if you put 15 then it will take more interactions in the past that it will use as context. Now why do we want to restrict this to about 5 to 10 is because the more interactions the more how would you put it? more context you give it, the more it can pull, the more credits you use. And so five, I think, is a suitable amount of interactions that we can use within the AI agent. But you can increase or you can decrease. The next hack is actually within the tools. If I go here and I put think, I can see that I have a think tool which invites the AI agent to do some thinking. So in theory, the AI agent typically thinks through what it needs to do using its prompt or its LLM. In this case, it would be open router. But we give it an additional tool, the think tool, which allows it to think even more. As you can see here, we have a predefined prompt, which is a prompt that we never put before. It’s already here, which has use the tool to think about something. It will not obtain new information or change the database, but just append the thought to the log. Use it when complex reasoning or some cache memory is needed. And so this right here is the ultimate assistant AI agent that I built, which is connected to a contact agent, email agent, calendar agent, and content creation agent. And so by feeding it the tool which is the think tool, it gives it the ability to have a another step of reasoning. Reasoning just means to think through what it needs to do to then be able to actually take the right action in the right order as opposed to not having this and just using the prompt and using AI, right? Sort of like that extra step. And the next hack is actually the ability for us to be able to connect AI agents within the tools cuz most times what you do is just connect it to the software. So Gmail or you can connect it to an external workflow. So you say sub workflow. So where is it? Sub uh workflow calling anytime workflow right here which basically calls another workflow to take action. But what if the workflow was inside this workflow right? And well in this case we have access to the contact agent which is another AI agent which is connected to more tools. And the same thing with email agent, calendar agent and content creation agent. This gives us the ability to be more flexible in the I guess AI agents that we build and have that extra feature of not having to build another AI agent in another workflow and just have it all within here. All right. So the next one is actually within the tool software. So if I go in here to send a message, we have to make the connection. We have to do set automatically the action the thing that we’re doing. And now we’re introduced to three different variables that we have to do as an input. You can put your email here, you can put the subject line, and you can put the message. But because of the fact that it’s a chatbot, so the input changes over time. What we can do is press this button right here, which lets AI in Nitnen define the input. So it defines what goes in here so that you don’t have to put it manually, right? You give AI the ability to choose what goes in there as an input u for you to do it. And this makes it so much easier for us to be able to make AI agents because all we have to do is literally just press this button for any parameter that comes through. All right, the next hack is actually the ability for multiple AI agents to be connected to the same exact model, right? Which you can see right here. We have one step right here, which is not an AI agent. It’s just an AI step, which is connected to a model. And we can see that all the AI agents are all connected to the same exact thing. All right. So, the next hack is actually the ability for us to use the structured output parser, which allows us to be able to do the thing that I mentioned before, which is using JSON to take an unstructured input. So, it can be a block of text, can be whatever it is, and we structure it in a way where it actually makes sense. So, a variable. In this case, we have a human in the loop sales agent, which drafts sales emails for us. So, I put my name, my email, my company name, intent, budget, project description, and timeline. I can press submit. And what this will now do is it will send it to the Google sheet. it will add it there to our CRM. It will then talk to the sales agent which will speak to first of all claude which is its brain and then it will then speak to the structured up parser because that is a thing that is going to help it to be able to make the subject line and the body of the email which is then going to be sent to our email. And if you go right here I can see that this was the input which is a block of text and the output was the email body and the subject line as well. And if you’re wondering how we wrote this, you can simply go to chat GBT and ask it, hey, can you draft me a input schema using JSON that allows me to have a subject line in an email body of the email? And that’s exactly what you paste here. And that’s what the AI will use to then give you the output that looks like this from an input that looks like this. So that marks the end for the eight and AI agent hacks that I wish I knew when I got started that makes your build of AI agents much faster and way more powerful. Hey, in this video I’m going to show you four agentic frameworks that can make your AI agents inside of Niten faster, smarter, and way more scalable. You see, most people try to build one big agent that does everything. But that’s why it breaks. It slows you down, and honestly, it’s impossible to scale. So, I’m going to walk you through each framework step by step, show you exactly how it works, when to use it, but also when you can apply it within your automations. With that being said, let’s dive in. All right, so the first framework is the prompt chaining. So what this means is that you are using a AI agent and you’re prompting it in a chain. So you’re saying, “Hey, let’s use the AI agent for to do this first. Then you chain it.” Chain it just means you connect it to the next AI agent which does another thing and then chain it to another AI agent which does another thing and then you do whatever you have to do, right? So this right here is what we call sequential reasoning where each AI agent um builds on the previous output to refine accuracy and context. So this right here is based on the output of this. This right here is based on the output of this and so on. And this framework is great for multi-reasoning. Um, but I’m going to show you exactly what that looks like. So, right here we have a form which leads into the first AI agent uh, which writes the outline for the blog. Then it goes to the second AI agent which looks at the outline. It evaluates how it is and it changes it up. And then we give it to the third AI agent which actually writes the blog before putting the blog into a Google document that we have access to. And so if I go here to execute workflow, I can put AI in finance or whatever topic you want to talk about. I can press submit. What this will now do is that it will send the data to the first AI agent. Right? This is chaining prompts because we have one prompt here which does its own output. Then it goes to the second one to do its second output. And then finally it goes to the third AI agent again prompt chaining. We’re chaining different prompts. Um because these are a series of different prompts, right? This prompt is just to make the outline. This prompt is just to evaluate the outline while this prompt is to actually make the full blog based on the outline. Right? Three different prompts but we’re training it together. And then finally we will add it to our Google document. As you can see we’re finished. If I go here, this is the blog that we get uh with all the information from these different agents. Now don’t get too fussed about the actual quality of the blog. I just wanted to show you exactly what the framework is. But going inside here for example, we have the same prompt. So system message. This is one prompt which the user message because the user message is the thing that we actually give it. The system message is basically giving the AI agent context what it needs to do in general which is then changed to the second prompt which is a different prompt right here right right here with a user prompt as well. And then we have the third AI agent with another prompt which is the one right here. And yes these are very very small prompts just to show you an example uh with a user prompt as well which are all changed together. And one main advantage to this framework as well is that when you prompt chain, when you add one step after the step after the step as well, it’s much easier to debug. Debug just means that if something goes wrong, how can you fix it? How can you go there and fix it? Well, it’s much easier here because it’s linear, right? Linear just means that it’s one line, right? This is one line. It doesn’t go up and down. And so when there’s a problem, it’s much easier to go here and fix it because you know exactly what step it came from. The next framework is called parallelization. Is a big fancy word. uh which basically means that we have multiple agents. So you can have three, four, five, 10, 11 uh which are all working simultaneously which means at the same time on different tasks right and so let’s say we have a AI agent which allows us to create the LinkedIn hook then the LinkedIn body then we merge them and then you send it to the final agent to make the final post. So let’s say I say write a post about how AI is going to impact agencies. I can press go and now what this will do is that it will send the information to the first AI agent to write the hook. then the second AI agent to write the body and then we merge them together. We put them all in the same paragraph which then goes and feeds into the final AI agent to write the LinkedIn post and then it gives it to us on here. So our AI agency is ready for the AI revolution. The tools we want to use are evolving fast and it gives us the whole body. Again don’t look at the quality just look at the fundamental theory behind this AI agent and how it works. And as you can see we have the output right here the first output. This is the hook. Then we have the second output right here. And the way that this fundamentally works is that we have the data going here. And then we have also the data going here. But this doesn’t go through until this finishes as well because they’re all connected to the merge node. And the merge node makes it so that we say, “Okay, cool. Go to the length and hook and write the length and hook, then send me the input, the first input, which is input one. Then go to the length and body and send me the second input. And only once when I have both inputs together, then I go to the next steps, right? Which is great because now we get two items which is right here. One item and one item. Then we can then use the aggregate module or node. As you can see here by the diagram is that we take multiple series of items and we put them all in one. And if I go here, I can see that I have the output one and the output two, right? which is the hook and the body before feeding it into the final agent right here to write the LinkedIn post which is the output right here right and so we give it the output which is the called an array an array is just a way for us to store different pieces of information and so that’s really how the parallelization works now the reason why we would use this over the others is because it is faster at processing information um as you can see here it goes here and then it automatically goes here not automatically but in a faster way rather than the other frameworks And then we can merge them all together before sending it to the agent. And it’s very very structured in a way where we go to the first one then the second one and the third one and the fourth one. That way you can keep track of all the single steps. And one more thing it can do is that it reduces the bias or error uh from a single model because we have these different agents giving their own perspective or or the output in this case. And this right here typically we would use it for research uh or multi-dommain inputs where speed and diversity matters. And the use case of using this type of framework is when we are doing research where we’re doing research we typically want to split it up in a way where we do one sort of piece of research first then we go to the second one then we go to the third one and so on. So that way you’re splitting it and then you’re merging it all together and then you’re aggregating it and then you’re doing something else. The third framework is called the routing framework. Now this dynamically directs the data. So this sends the data to the appropriate agent based on a classifier. Let’s say we receive an email. Then we have the step right here which is classifying the email based on whether it’s in high priority customer support promotions or finance and billing. And based on the answer so based on the classification of the email that we receive, we send it to the appropriate agent we go here to the higher priority agent customer support agent promotion and finance as well. And then they can execute their own tasks which means that they can do their own action, create their own emails and so on um by their own right and they’re all rooted by the output that we get from the previous step. And so this is great because it makes our AI agents and workflows much more adaptive, right? And we are only using the right model or logic when we have a certain use case, right? So in this case, when we want to add a new step, all we have to do is go in here, add a category. So we can say love, hello. And now we have a new filter right here, which you can then add another AI agent. So agent and we have this here. And you can easily add more and more options based on the output that we get here. And this is great again because when we have a input and we want to classify the input based on whether it’s X, Y and Z, then we can have a logic that says okay if this is something then we send it here. If that is something else then we send it here and so on. And you go through the logic as well. And so let’s say I send myself an email right here. I can execute the workflow. This will then be able to classify the email based on whether it’s all of these. In this case, it saw that it’s promotions. And what it did is that it spoke to the AI agent to then create the email that we can then have in our draft. And if I go here, I can see that it dropped the email back to the email that we got here. Of course, this is a spam email, not spam, but promotional from Wise. Um, but as you can see, the AI agent drafted a very, very insightful email um using the prompt, right? And so that’s essentially what it does. Very very easy. only use this framework really when you want to be able to route to the appropriate agent based on the input that we get. And the best use case that I can think of when it comes to this framework is just this, right? Getting emails, classifying them, and then sending them to the right agent uh based on the type of email. The last framework is called the optimizer. If you haven’t watched the full video of me building out this human in the loop AI sales agent, watch it up here. But the way it works is that we have a form right here which has different details that the customer or the lead in this case would fill out. So let’s say I put my name, email, company name. I’m looking for a lead generation service. My budget is less than a,000. My project description is that we want a system that can generate more leads and we want it within a week. If I press submit, what this will now do is that it will add it to our CRM. In this case, CRM is just a way that we store information about each client or leads. Then it talks to the first AI agent which writes the sales email that we can send back. What it does then is that it sets a variable. In this case, the variable would be subject and email body which is subject here and email body which will send it to our internal team. You can see here we have the action required new lead with budget of less than 1,000 and a team member from our team before sending it to the actual customer. We can respond. So I said don’t ask them a question. uh just telling me we’re available at Tuesday 3 p.m. tomorrow because as you can see here it asked them a question of whether they are available. I press submit. So I give a feedback. What this does is that it then classifies the feedback whether it’s a positive feedback or negative feedback. If it’s negative, what this does is that it roots it to the next step which actually based on the feedback that we gave it rewrites the actual email using the next agent right here. And it gave us a new email which we then send back here because again the name of the variables is the same whether it comes from here or from here which we are able to then send it back to our team right here for another revision. I can press respond. I can say, as you can see here, we we actually have the the revised version. So, Tuesday at 3 p.m. And I can say yes, all good. When I press yes, all good, and I submit it, what this will now do is that it will send the email because now it’s it’s approved. It’s positive feedback to the customer. So, if I go here, I can see that I’m obviously I’m the customer and I’m the team member here. But this is what the customer will get. They will get a fully sales optimized email obviously with results and everything that responds to their inquiry from the website. And so this framework right here is amazing. It’s actually one of the best frameworks that I’ve used so far within AI agents when it comes to adding a feedback loop, right? Because what we’re doing here is that we’re writing the sales email and you can apply this to content or whatever it is, but we’re writing something then we’re sending it for revision to our team. Then the team gives us feedback. Then based on the feedback, we categorize whether this is positive feedback or negative feedback. If it’s negative, then we send it to another AI agent. So as you can see here, we have two options, approved or denied. and we give it the description of what approved is and what denied is and based on the appropriate output so whether it’s actually approved or denied we send it two different ways again denied will go to the AI agent which revises the email and so this is prompted to to know that this needs to update the sales email based on provided feedback and this is the email that we get which we send back here which then sends it to our team again for human in the loop and this is a whole repetitive process over and over again now this is great because it enables the AI a agent to have continuous learning, right? Because most of the times, not most of the times actually, sometimes the AI agent will not spit out something that we’re actually happy to send to the client. And so instead of sending it to the client directly, what we do is that we have a repetitive process. As you can see, this is a circle sort of whatever you rectangle. All right? But the concept is that we have a loop, right? Human in the loop. The human is always in this loop and we’re able to give it feedback and iterate on the feedback again and again again and again until we give it positive feedback saying yeah all good or yeah no changes and then it sends it to the client itself and then it does its own thing. Now this is great for systems that require quality assurance which means that they require someone to give some sort of input or feedback based on the output that AI gave. Um this can be applied to again sales outreach or customer support because those are the ones that interact with a customer. And so between the AI making something and the customer receiving that something, there has to be an intermediate step of us giving a feedback. And usually that’s having another person, right? And so in this case, this allows us to have a repetitive loop, feedback loop to generate different things. And that’s where we would use the optimizer framework. In this video, I’m going to show you exactly how to prompt your AI agents inside of any so they actually do what you want with less errors and more accurate results. I’ll break down the main types of prompts, show you exactly how to structure them, and explain how to write prompts that actually get results. All right, so to quickly recap what an AI agent is, we have an input, we have an output, and in the middle, the AI agent is instructed, right, which is the prompts that we’re going to go through today. Uh, and based on the instructions, it then uses its brain, which is LLM, which is just an AI, which thinks through the instructions, and then takes action on the tools based on the instructions that it was given. So, it’s exactly the same as an employee. It’s only AI. And the instructions that you give it are going to be in a prompt format in an actual text. So, this right here is what it actually looks like. This is the most basic version of an AI agent inside of any. The first thing we have is a chat. So, I’m going to go here and talk to it. I’m going to say hello. What this will do is that it will send the input over to the AI agent. It will then call its brain because that’s how it thinks. and it will call the memory tool because we also have the ability to remember uh the conversations that we had. Now inside the AI agent we only have two types of prompts only two right the first one is a user message and the next one you can find right here is a system message. So in this case if you have an employee right you tell the employee a task you say hey can you do this for me that is a user message. Then the instructions that you gave the employee before that is a system message. So two different types of prompts for two different types of reasons. And so right here we have two different options for source for prompt. Source for prompt just means hey where are we getting the input like what is that thing that we’re receiving and where is it coming from. We have connected chat to a node and we have the find below. Now if I go out of here I can see that right now the AI agent in this case is connected to this node right here. A node is just is a square. That’s what they call it. And this right here is a chat trigger node. It’s one that is native to nitn which means that nitan owns it. And typically that is what we use to be able to speak to the AI agent, right? And so the input comes from here. So if I go inside, I can see that we chat to the AI agent through the chat mode. So through here I go here open chat and I say, “Hey, so where are you from?” Right? And so right now what this does is that it takes this input, right? Where are you from? It sends it over here and this will now be the user message, right? So this JSON fancy thing that you see which is code because again everything is code behind the no code platforms the irony there. Um but that is a thing that the AI agent uses as sort of an input to then take action right the second part is the find below. So there are times where we’re not connected to the chat node. So every single time that we’re not connected to this node right here we have to use the find below because we have to define the input based on where it comes from. So, for example, if we have an AI agent that looks like this and the input comes from Telegram, which is just a platform where you chat um sort of like WhatsApp. If I go inside here, I can execute the step and now it’s going to wait for someone to send a message to Telegram. And right here, I have a new chat pulled up. And when I press start, it automatically sends a message, which is slash start. And that is a trigger right here, which is text start. And now, this is a thing that then goes into the AI agent. And now we use define below because this right here chat node like I mentioned is only for that specific node and the node changed to telegram. And so we have to change the input that comes in. And how we do this let’s say this is empty. We just take the input which in this case would be text right because that’s the text that we get and we drag it across here. Or alternatively you can curly bracket curly bracket dollar sign JSON dot message dot chat. And so let’s say now I execute the workflow and I just talk to telegram and I say hey how’s it going what this will now do is it will send the input over here it will then talk to its brain and then based on its brain and based on the instructions that we give it which I’ll show you exactly how to write that instruction then it will do its thing it will give us the output and the output will be in telegram which in this case it’s hi I’m ready to assist you how can I help you today and so that’s where we would use the define below rather than the chat trigger node And this is the one that we mostly use because again charter node I feel like we only use it when we test uh rather than anything else. So I’m going to say hello here just to put this as an example. And now we’re going to go on to the most important prompt which is the instructions. So that’s system message. So if I go to system message and I go to expression and I go to full screen. Now this is the playground. This is where we write the actual prompt. And so I’m going to paste a structural prompt that we typically use right here. Now the first thing is the actual formatting. So we use something called markdown formatting. So if you see uh these sort of hashtags or sometimes you even see this right here. What this is is let’s say I go to a Google document. If I write hello right and I go to right here heading one I can also write hello and then this turns to heading one. And so what this means is that this is heading one. This is heading two. This is heading three, right? And so why do we do it? It’s because then the AI knows the hierarchy, right? Sort of like you’re doing an essay. If the essay does not have a title, subtitle, uh the text, description, all that stuff, then it’s very hard to understand. And so you are using these, you’re using hashtags, right? In this case, this is one, in this case, it’s two. In this case, it’s three. And you can go to four as well. Then the AI knows exactly, okay, this is the main thing to look at. Then this is the one below it. And then this is the one below it. And so when we look at this, we’re saying, “Hey, this is the title of the first thing and then the text, title, text, title, text, and so on.” And if you add things like these, then this would bold it. So something like this on a Google document so that within the text, it recognizes that this is an important word or an important phrase. And it does the exact same thing for all of them. Now, let’s say that you wanted the overview to be the title, this as well, this as well. But you realize that examples aren’t that important to be a title. All you have to do is just put another hashtag so that this becomes heading two and so AI understands right based on the logic heading 1 2 3 that this is less important than this and so it will prioritize looking at this before looking at this. Now the first thing of the prompt is an overview, right? So you are a your purpose is to now if you’re watching this video of prompting then you’ll probably be seeing prompts that look like you are a helpful intelligent content writing assistant. You are a helpful intelligent something something assistant. The reason why we do that is because we’re giving AI an identity. Okay? And by giving AI an identity then we’re saying then what it does is it allows AI to psych itself to make it think that it actually is that identity. So the output will be higher. And so here we start by saying you are a helpful intelligent personal assistant. Uh the only tool that we have connected to it is send a message. So that’s fine. And now we say your purpose is to and then describe what the AI agent actually does. And so here it would be your purpose is to send emails based on just send emails actually. Yeah, your purpose is to send emails to customers. And so that is it. That’s the overview. Now, of course, if it’s a bit more complex that you have different tools, then the purpose is going to be longer because the purpose is different things. And so this obviously depends on the complexity. Now, I’m going to go through a complex agent at the end, so don’t worry. You’ll see exactly what it looks like. But that right here is the first part. The second part is the tools. So right now in this AI agent, we are I believe we’re only connected, yeah, to send a message. And so that is the only tool. Now again, a tool is a software is a thing that the AI agent uses to take action. And so the first thing is adding the tool name. So we say, hey, heading one tool and the first thing we write is the tool name. Send message. Bear in mind that the tool name, make sure it’s the exact name of the actual tool, not an extra e, not an extra r, right? Exactly. And now we have to add the function and when to use it. So this tool will be used when sending emails to customers. That’s it. And then and so if you have more tools then you have more names. The n tool name and then tool description description. That’s it. And the more tools you have the more you add right here. Right? And you keep going on and on and on. And then we have rules. So rules are great to then be able to give it guard rails. So guardrails just means that let’s say you’re in the bowling alley. You know when you’re at bowling and they add the the little sides on the the little things that they put in the sides cuz you’re completely horrible. It’s only because by putting those guardrails there’s a good chance that you will hit the target, right? If you’re anything like me at bowling when I throw the ball it goes out, right? And so by putting those those walls, it makes sure that it actually hits the thing. And so that’s exactly what we’re doing here. We’re saying hey these are the rules and saying always do this never do this if unsure do this. Now these three are obviously optional. It depends on what rules you want. But in this case you can say always make sure to have an email address before sending an email. Right? Because we want to make sure that we actually sending the email to the right person or a person at all. Then you can say never send an email if you don’t have an email address. And if unsure, just ask the user to clarify. Simple as that. Obviously, it depends on your use case, right? Again, it depends on your use case. So, the rules might change, but for this specific use case where we’re just sending emails, then this is fine. And then lastly, we have output format and examples. Now, this is optional. I wrote this as optional because it depends on your use case. If I’m doing something like an email send a message assistant, there’s no need to put output format or examples, right? But what these do is you tell it to basically give you the output in a specific format. So JSON or Buddha list or whatever it is and it actually does it. So in this case, what we could do is we can say format all responses as a short concise sentence, right? Or you could say a bullet list full of points, right? It depends on your use case. It kind of depends on what you want it. Uh for this case, we can just keep it very very short and sweet, it’s fine. And then examples here. So examples in this case, we wouldn’t use it, right? But for something a bit more complex where it has different steps or we wanted to give it more guardrails because again, giving it examples, it is literally just giving it rules, right? We’re saying, “Hey, do it this way. Here are some examples to guide you in the right direction. So adding more guardrails only because AI agents are great, right? They’re they’re amazing. They do really good stuff, but the margin of error needs to be very very small when you’re actually giving it to clients. And so if you add more guards, if you add more examples, then the chances that it will error out, which means that something goes wrong, are very low. And the way that examples usually work is we have the user. So we say this is the input. So let’s say I say send an email to or actually let’s say I say make a LinkedIn post about life and then you give it the uh the answer right you say you actually give it the LinkedIn post so it can use the LinkedIn post as a reference when actually giving the output and so why do we do this is because again with guardrails the AI agent knows what good looks like it has expectations am I giving someone expectations they will get closer to the actual goal because it aligns with the expectations that you have. And so that right there is a full structure prompt that we use. Obviously some things you add, some things you remove depending on your use case, but this is what it looks like. And so when you pair up the user message with the system prompt, the user message is the input. So what do we get from the user and the system message is a thing that it uses to actually think through what it needs to do. Now I’m going to go through a single agent step prompt and a multi- aent step prompt. So a single agent step prompt just means that we just have one step before it goes to the tools, right? And so if I go inside here, the chat input will be the one from Telegram, which is a text below, which is what we covered before. And the system message will be an overview, not a personal AI assistant integrated with Telegram. Your purpose is to help the user manage communications efficiently by retrieving the correct contact and sending accurate well formatted emails on command. As you can see, the purpose changed because now we’re also saying you have to retrieve the correct contact and sending accurate well formatted emails on command. And now we’re giving it the tools. So the first tool is get contact, right? And we put this to bold it to say, hey, this is important. This is the name. And the description is retrieves contact details, name and email, right? So this AI agent in this case is connected to two different tools. It’s connected to the get contacts, which is a contact database, which is the one right here, which has name, email, and phone number. and is connected to send email which is another tool right and so that’s why we have get contacts to retrieve contacts and we give it a rule we also say use this first to verify the recipient or retrieve missing contact information because if you think about it what if I say I want to send an email to let’s say Michael James right how does it know the email of Michael James which is why it has to call this tool first and then it can call the next tool and then we have send emails send emails to contacts and the rules is never assume missing details Always ask for clarification. If unsure, respond with, “Can you confirm who I should send this email to?” Keep the message short, clear, and structured when replying on Telegram. And so this right here is a very short prompt that we give it because again, the AI agent is pretty simple. We just have a get contact. And we have sent an email. And now if I go here, I can wait for the input. So on Telegram right here, I can say send an email to Michael James. I can press go. What this should now do is it should call the contact uh tool. Then it gives us the output. And the output in this case is can you please provide the subject and the email body of the email. So you want to send it to Michael James. So even though it told Michael James and it knows the email, I didn’t give it what the email was about. And so now what I can say is send an email to Michael James about uh and say we have dinner tomorrow. Now you probably noticed that I should execute this first. Uh that I copied and reprompted this again. Why did I do that? It’s because in this case the AI agent doesn’t have memory, right? And so I have to reprompt it and say, “Hey, send an email to Michael James and say we have dinner tomorrow.” And now if I go to my email, I can see that I have dinner tomorrow. Hi, Michael James. We have dinner tomorrow. Best regards, right? All within just telling it a single prompt. But none of this would have happened if I didn’t prompt it right because the AI agent, even though it’s hooked up to these tools, it doesn’t know that it should do this first and then this, right? Which is why it’s all based on the instructions. I mean, in, out, right? Let’s be honest. And it’s the exact same as an employee. You give an employee instructions. You say, “Hey, when you have to go to file taxes, do it in this way.” He file taxes, he does it in that way. And then he brings it to you. If you say it’s bad, was not his fault. It’s the instructions, right? And so you want to make sure that the instructions are very clear and precise so that the AI agent can actually do what you wanted to do. And that right there is a single agent step prompt, which means that we only have one step between here and the tools. And here we have a multi- aent step prompt. Now, this agent looks ridiculously big um right here. But it is a video that I made about building a personal assistant which you can watch up here. And the way it works is the exact same as the previous one right here. But in this case, we have Telegram which is the input. We send it here. We also have the option to do a voice message. And then inside here, if I go inside, the input is still JSON.ext because it comes from Telegram and is defined below again because we’re not using chat trigger node. And if I go to the assistant message, I can see that it follows the same exact structure. It has overview, tools, rules, and instructions. And it also has a final reminder, which I’ll explain exactly why that’s there. So the first one is the overview. So you’re the ultimate personal assistant. Your job is to send the user’s query to the correct tool. And so in this case, we call it a multi-step agent prompt because this right here calls a tool, but the tool is actually another AI agent. So it doesn’t actually call the tool that takes the action like the send an email or get contacts. It calls different agents. So, contact agent, email agent, calendar agent, content agent. Why is that? Is because when we are doing something this complex, not complex, but we’re doing a ton of tasks, like we have 1 2 3 4 5 6 7 8 9 10 11 12 13 14, 14 tasks that the AI agent has the ability to do. If we write all those 14 tasks and we just connect it all to the same the main AI agent, there’s a very high probability that it will break. And so we break it down into a multi-step agent prompt where we say, “Hey, these are the agents that are connected to you. If you get some sort of contact thing, just send it to here. If you’re asked to take action on email, then call this agent here. Uh if you have to do anything within the calendar, call the calendar agent.” And the same thing with content. And then we give a rules, right? Some actions require you to look up contact information first, which is the exact same as we did before. We say, “Hey, sometimes you need to go to the contact agent first to get the contact and then send the email.” That’s a step-by-step process that it has to do. And then instructions call the necessary tools based on the user’s request. And we give it some instructions to then give it more guardrails, right? And finally, we give it the current date and time. So the final reminder is just final things you want to add. In this case, we’re adding the current date and time because AI unfortunately isn’t the best with dates and times. And so with AI agents, if we ever connect it to something that has to do with time, like calendar or send an email for dinner tomorrow, it needs to know what today is in order to know what tomorrow is, right? And so that’s where we add this formula right here. And so this right here is the exact same as the other ones. User message is like the one before. And now we can go on to the next tools, right? And so from here it calls the contact agent or the email agent. And the best way that I can think about this is like a CEO. A CEO doesn’t actually talk to each employee directly, right? He talks to the head of sales, head of operations, head of marketing. And then the head of marketing talks to the employees to take action. Why isn’t it the other way? was because if the CEO had to talk to every single employee, he would go crazy and there’s a good chance he will get the employee wrong because there’s so many employees, right? And so right here, if I go to contact agent, which is the head of contacts, head of department, we just have an overview and then we give a tools, right? Get contact, add or update contact, which is the tools that we give it here. Get contact and add or update contacts. Same thing with this email agent. We have this overview tools and some rules as well. final reminder. Same thing with calendar. I can see the overview, tools, final reminder and the blog as well. Just because a contact agent doesn’t have to know today’s, date and time to to get context, but these do uh overview tool and rules, right? And so that’s it. The input here, the prompt user message in this case will be AI defining. And also the only difference from the singlestep AI agent to the multi-step AI agent is also the user message, right? Because if I go here, right, the user message here will be Telegram. But if I go inside one of these, then I can see that this is now defined automatically by the model. We say, “Hey, the AI agent is given a task, right? This is the CEO.” Then the CEO, we’re letting AI define what the CEO tells the head of department, right? Which is the prompt user message and we give it a description as well. And then based on the prompt, based on the instructions and based on the tools that the head of department is connected to, it will prompt each tool correctly. And so best practices for prompts is be direct and explicit. Right? The more direct you are, the better it is. Put critical info at the top or you can put it with um markdown formatting to make sure that it knows, hey, this is title one, heading two, and heading three. Keep it concise, no filler, which means that the more stuff you add, the more chances it will break. And that is just a truth, which is why we’re not giving it a huge prompt, right? For the multi-step AI agent, we’re giving it one prompt and then that goes to the next and then the next, right? Only include what improves performance. So don’t include stuff just to include stuff because again the more context the more it needs to think and the more someone needs to think the more chances we have or the more likely it is for actually stop working. And if you’re someone who wants to start and scale your AI automation agency and work with me personally onetoone then check the first link down below. Hey, in this video I’m going to show you step by step how you can connect over 500 AI models to your NA10 AI agents using open router and also show you how I built a full AI agent that actually decides what model to choose based on the question that it was given. With that being said, let’s dive in. So if we go to end right here, the way that the AI agent works is that we have an input. We then have the actual AI agent which has instructions. This is the prompt saying hey if you you are helpful intelligent XYZ you do this and you do that based on the input that you’re given and then what it has is it’s connected to its brain which is an LLM which is the one that we’re going to be changing today the memory and the tools and then give us the output. The only thing with this is that the brain itself when we go to NN chat model this is the brain and I look for the software itself we can see that these are individual softwares these are individual LLMs. So if I want to connect claude that means now I have to go to claude and make an API key and then choose a model from here. But if I want to choose OpenAI then I have to go to platform. OpenAI add money there and do this exact same thing for every single chat model there is. But the question becomes what if there was just one thing that we had to connect to the AI agent that we can then use to access all the models al together. Well welcome to open router. All you have to do is go to open router.ai. Um I’m going to leave the link down below in case you want to check it out. And then we see here on the top right that we have different uh places that we can go. So if you go to models, this will basically show us all the models that we have that we are able to connect with open router to then be able to access in our automations, right? We have DeepSeek. I don’t know what this is. Um there’s tons of them, more than more than you probably know, right? There’s a whole list 500 models which is crazy. Then we have chat which is where we can actually test or we can actually talk to all the different models. And then we have rankings which is actually an interesting feature because we can see the leaderboard of which models are the best. In this case top this week will be Grock. And then if I go below to market share uh but below here to categories we get to see which model is the best by what category. So marketing for example I can see that Gemini 2.5 flash is the best for marketing. And if I go to sales or whatever it is, science, I can see that we have Gemini 2.5 flash, right? And so you get to see exactly which models. This is a live representation of which model is the best for what specific use case that you can then use, right? But for this video, I’m not going to show you which model is the best. I’m just going to show you how you can connect it to. Uh the first step here is to make an account. Once you made an account, you go to profile and you go to keys. When you go to keys, this is like the exact same thing that we did for Claude, OpenAI, Grock, Gemini. We have to create an API key. The only difference with this API key is that we only have to create one key to access all the models instead of creating one key per model. Right? We press here. Let’s name it all models key. Uh reset limit every choose how often the limit should. No, NA is fine. No limit. Press create. And now you have this key right here which you can copy. You can then go to endn chat model look for open router right here. And then to connect your open router account you can create a new credential. Paste the API key that we just had and name it all models. Let me go and press save. And now you have access to this API key. Now of course this is not free. So the next step we have to do is add credits into our account so we’re able to access all the LLMs and use them. Uh I’m going to go here profile to credits and yeah also credits here and now you get to add credits here. Now the thing is you would add credits anyways because you would have to go to Chachib Claude Gemini Grock you have to make an API key but even those softwares are not free and so this just allows you to make it so much easier for yourself to just add money in one place so that you’re able to actually access all the models and quick note here when you’re working with clients and actually implementing these automations and AI agents into their system sometimes you would use more than two LLMs maybe one for writing content maybe one for structuring data maybe one for reasoning Right? And so this right here gives us the ability to tell the client, hey, just make an account on one place. You don’t have to go to every single LLM to make an API key to add credits, which makes this so much more structured in the long run. Once we have the credits down, we can go to NLN. We can see that now we have access to all these models right here. Perplexity, Quen, OpenAI, Claude, there’s a Grock, right? There’s a ton of different models that we can access through the API version, which is insane. And this would be the exact same as just adding in this case OpenAI 4.1 Mini, right? Because we’re using 4.1 Mini here, but we’re also using it here, right? If I go here and I can chat to it. So, let’s say say hello. You can see that now it’s calling open router and it’s giving us an answer. How can I help you today? All right. So now that we connected the open router to our Naden AI agent, now let’s make an AI agent that basically gets the input which is a question gives it to the first AI agent which will decide what model to use and then it will use the model that it needs to use based on the question that it was given. Okay. Now the fundamental concept here is that when we go to open router and I go to the model if I press expression this means now I can hardcode which means I can actually type the model that we want right which comes from this list. So I go to GPT4 Turbo. I have this. Now this is the name of the actual model. This is the way that the API recognizes that we want to use GPT4 Turbo. And so in theory, when you think about it, if you want an AI agent that decides what model to choose, we need to give it this text right here, right? And then it uses that model that we give it to be able to answer the question. And so I mapped this out here. This is a two-step uh AI agent. We have the first one to choose the LLM which is LLM just means OpenAI cloud Gemini. And then we have the second AI agent to give the answer to the question based on the LLM that the first AI agent chose. So if I go here, I can delete this. Now let’s go to the first one agent. Let’s do LLM router. Keep the input the same. Now the input is chat input which is this. Then we’re going to need this as well. I’m going to show you exactly how to do it. You can go to system message expression and then I’m going to paste the message or the prompt that I already had. Go here, paste it. And so this prompt right here basically is giving the AI agent an overview of what it is. In this case, it’s an AI agent that decides an LLM model. It gives us the name of the LLM model based on the question that it was given. And then we give it context. So we say, hey, you have access to perplexity sooner, which is good for extended reasoning and this and this. You have access to OpenAI 03 mini high which is a costefficient model that does this. You have access to anthropic claw 3.5 sonnet which is good for this right your task is to respond only in the following JSON format clearly stating the user’s original query in the selected model right so this will be the output that we want we want the let me take this out actually cuz it will give it to me like that uh but we want the user query which is the user question and then we want the model so that the next AI agent is given the model that it needs to use and the question that it was it was given by the user. And so we also give it a few examples because it’s always good to give the AI examples. So for example, if you find a real-time stock price and latest news on Tesla, we know that perplexity owner is great for research. And so it will use the output will be perplexity sonar. Same thing with craft a full business strategy for a startup. It will be open 03 mini high and then write Python code to build a snake game and throw a claw 3.5 solid. And at the end of the video, I’ll show you how you can get the whole system for free. So don’t worry. Um, but this is what we use to give the AI agent. Now, we’re going to require a specific output format because of the fact that we are asking, right? We are asking the AI agent to give us the output in JSON, right? And so, I’m going to copy this. I believe this will be the right way to do it. Um, require specific output format. This is good. So, I’m saying, hey, let’s connect this to open. This isn’t the AI agent that will choose its model. Let’s just use 4.1 mini. And that’s fixed. That doesn’t change. and then the output parser because it’s memory which is simple memory which will be the thing that a gen uses to remember its conversation. the tools. We’re not going to need any tools here. And then output parser. We can use structured output parser right here. And we can say define JSON schema. And we can say I believe that it will be what was it properties? Oh, user query. And then model. I think this might be it. Yeah, I think this might be it. So we say, hey, uses JSON. JSON is just uh it stands for JavaScript object notation. It’s just the way that computers speak to each other. It’s like the English for computers. And so we’re saying, hey, I want the user query as one property and I want the model to be another property. So what I’m going to do now is I’m going to run this. I’m going to go here and say, can you research Tesla news? So now it should give me the output. What is it? There we go. model perplexity owner and the user query. Can you research Tesla news? Which is great. Um, so now I can give this to the next AI agent to actually answer the question using this model. But I show you here if I go here and I say, can you generate code for snake game? This should now use claude, right? So it should now give me the output of claude. And so that’s how you dynamically change the model in the next AI agent based on the input that we gave. And so the next step is an AI agent again. And the input will not be connected to the chat trigger node. It will be defined below because the input will be user query. And if I go here to um the chat model and I go to open router, zoom out, I can now go to expression because now I’m going to dynamically I’m not going to choose this because if I choose this model right here, it will always choose this model. It doesn’t change. So I’m going to go to expression which allows us to change the actual model by text. And I’m going to paste, not paste. I’m going to bring this across so that it uses this which changes every single time based on the answer that we get from this AI agent. Okay. So, I’m going to go here and then I believe this is it. Yep. And then AI agent. That’s cool. So, let’s see how it works. I’m going to go here and I’m going to paste this again. Let me actually rerun this. I rerun this. Can you generate code for net game? Now, it’s using the model. It’s going here. It’s choosing the actual model that we get. So in this case it would be anthropic/cloud 3.5 sonnet and now it’s using claude to generate the answer because this was the output here and we get the code right here using cloud and then right here we have the logs which is essentially what is the step-by-step process that we just went through from the start until the end and so what we did there is that we have the model and we have the user query then it goes to the second AI agent and if I go here I can see that it use this model to be able to give us this answer. If I go here, I can see that this will be the answer. Right now, let’s change it up. Can you do research on the top AI news in the US? I’m going to press go. And now I should be using Perplexity, I assume. Yeah, Perplexity Sona. It’s going to send the model to this open router chat cuz it dynamically changes every single time. and we get the output which is the top news which is crazy to be honest because now you have the ability to literally choose which model you want to use right based on the input and the model that we used here is perplexity sonar right it changes every single time and one thing you could do here is you can add more and more models as in you can give it more context to more models this is only three models right anthropic openai and perplexity but you can have over 200 of course not recommended uh honestly because it will kind of trip up and it might get the name wrong and if it gets the name wrong, then this obviously wouldn’t work. Uh, but you can definitely add more than three here. So, it has access to more models in that case. In this video, I’m going to show you the top three ways that you can scrape any website inside of any in just a matter of minutes. I’ll show you exactly the fastest way and the most scalable way in which one you should probably use. All right, so before we get to the actual method, let’s talk about scraping. So when someone says I want to scrape a website, what they mean is that they want to go inside a domain, a public domain, right, which is accessible and they want to extract all this information right here. Now if you don’t know, each website is actually if I go to inspect, it’s consisted of all this code. Now luckily we don’t have to know any of this, right? But just know that this is called HTML. So HTML is a thing that websites are written in which allows it to have an image, have this button that’s red, have this video, have this number, and so on. It makes websites look pretty. And so when we say scrape, we’re scraping all the information here, but realistically, we’re scraping this, right? We are scraping, if I go to inspect, this code, which you can then use to send emails, to maybe reply to messages, maybe to customize a message based on their website and so on. And so that’s what scraping websites mean. Now, the first way is using a HTTP request. Now, I covered this node in much more detail in my API 101 fundamentals video, which you can check out up here. But right here, we introduced to two different fields, the method and the URL. So, the URL in this case would literally just be the website of the actual thing, which is in this case jammolutions22s.com. And the method in this case is either get, delete, head, options, patch, post, put. Now, these are all methods that we use when we make a request. A request just means we’re saying, “Hey server, can you do something for us and give us back the information?” In this case, we have to use get because we want to get information. So now all I have to do is put get, put the URL, and leave authentication as none, and leave all of this blank. And if I press execute step, you can see here that it’s going inside the website, and it’s extracting all the HTML, the whole code, which you can see here, which is very, very, very long. Right? And this right here is what’s behind this. We just extracted this code right here inside this, right? Which you can then use to do something else. Now, the only problem here is that the HTTP gives us the whole HTML, which is way too large for us to feed it into maybe an LLM like OpenAI to maybe generate emails or generate messages. So, what we do here is turn the HTML, which is the whole long code of the website, into text, which is now readable to someone. So I can go here to plus I can look for HTML uh right here. So work with HTML. I can press this and I can do extract HTML content which means that it’s extracting the text from the actual thing. And now we can extract HTML content. The source data will be JSON because this is JSON um like this. This is all JSON. And if you’re wondering what JSON is video up here uh and then JSON property will be data because this is called the data. and the key let’s call this website text and let’s do body and now if I execute the step I can see that we actually get the text of the website so we got from the HTML that we got which is just a ton of stuff which is all of this right all these letters and colors and images and videos which you typically don’t want we just want the text we’re saying okay just extract the text from here and as you can see this is much shorter than this one just way longer longer than this, right? And now this is something that you can add to an AI, right, to drop emails or do something else. And we also use this node right here to be able to set up API requests. Now, API request, I actually mentioned this in my API 101 video, which you can find up here. If you go to any right here on app event, there will be tons of apps, right? But not everything is here, right? And so, how do you automate something within an app that you can’t find the app here, right? And so let’s say I want to use Panda do but Panda do is not here is not listed here but I know for a fact that you can actually automate things within PandaOC which is where we have to make our own app using a HTTP request and then we typically use the HTTP node when the website it’s static no JavaScript which means that it doesn’t actually change over time and you’re testing or building a simple automation. So we typically use this for testing or to build something quick. Now the pros is that this is fast and it’s free completely free. There’s no extra setup or accounts needed. You just literally need to put a URL and run it. And it works great for APIs or plain pages. So APIs, like I mentioned, it’s just the way that softwares talk to each other. So if you can’t find the software in it, you have to set up your own sort of app to make it happen, which is where you use a HTTP node. And plain pages again, it’s this. The website is static. So it’s just that just the text. It doesn’t change over time. It’s same. Now, the cons of this is that it gives messy and unreadable HTML. So, as you saw here, this right here gives me the whole HTML, which isn’t really readable, which is why we have to use something like this. But if it wasn’t for this, then we would just have to deal with a HTML that makes no sense to anybody. Then, in terms of web scraping, it can handle JavaScript heavy sites. So, sites that are changing over time that are a bit more complex, it cannot handle those. And it’s very, very easy to get IP blocked if scraped a lot. So, if you scrape this website continuously over and over again, you will get blocked, right? There’s a good chance you will get blocked. And on top of that, you can actually scrape every website. So if I go to my LinkedIn here and I just copy the URL and I paste it here inside LinkedIn isn’t a platform that you can actually scrape on a public level, right? So in this case, what this did is that it just literally went to LinkedIn. It just scraped this. It tried to scrape it and LinkedIn said, “No, we have a wall between you and me.” And the wall is an encryption. It’s a password that we have to go through, which is why we can’t use HTTP requests for everything. All right. All right. So the next method is using firecrawl. So if you just type firecrawl right here, you can go to firecrawl, the web data API for AI. And this website, the server is great if you just want to scrape websites. That’s what it’s meant to do. And so when you make an account, just go to your dashboard and you are able to then go to API keys, copy this key, and then if you go back to you, you can download this. You can go to fire crawl. You have to install the node. So there will be a button here that says install. And then you have different options right here. But when you press any options that says scrape a URL and get its content, you will get introduced to this page right here. All you have to do is connect your account by adding the API key. Press save. And once this is connected, you now have the operation which you have to pick which is what is the action that we’re actually doing. And there’s different options. So the first one is search and optionally scrape search results. Now what this means is that you’re asking Google to look something up for me. Then we have map a website and get URLs. So this goes inside a website and gets all the URLs like the about section, the services, the homepage, all that stuff, all the URLs that you might need. Then we have scrape a URL and get its content, which is literally just scraping the URL and getting its content. So going inside the URL and getting everything back. So the text and I’ll show you how this is different from the HTTP that we just used. Crawl a website is a bit more advanced than this right here. Um, but it still scripts websites. Then we have get crawl status which is you being able to get the status of whether this is done or not. So you send a request you saying hey can you just go inside this website and get absolutely everything that you that you have and this is saying okay the status is approved everything’s good you can move forward. Then we have extract data. So in case we want to tell it hey go inside the website and extract the email extract whatever it is. Then we have get extract status because the way that these work is that you send the request at first and then you get the status. So send a request and get the status and then custom API calls which is not going to in case you want to do some more complex stuff. So in this case we’re just going to use scrape a URL and get its content. So I’m just going to add my website go here. Let me delete this. Looks crazy. Um and I’m going to press execute step. And what this will now do if you go to schema is it will actually extract the text. So in comparison to the HTTP node that we just used, this doesn’t give us the HTML, but it automatically does the job that these two do, right? It goes inside the website and it gives me the text, not the HTML. So it’s condensed. So you can see here, if I zoom out, this is the text of the website. Plus, we also get the metadata. So we get the description, and we get a bunch more stuff that we can use for whatever it is. And bear in mind that this fire crawl, I believe, is free. uh they give you free credits every month. So you have about 525 credits. I believe that each scrape is about two two credits per scrape. But as I mentioned, if you want to do something more complex, you can also extract the data which allows you to put a prompt saying, “Hey, can you extract this for me from the website and then you can put a URL here and that extracts the exact thing that you asked it to extract. But in theory, what this would look like is you have the URL. So you would script it. It’ll do this whole thing. Then you add the markdown which is just the way that you write English for computers per se and then you add this to an AI step to extract the data that you want to extract maybe what the offer is of the company uh who are they targeting for whatever use case you have. Now firecrawl is great if you want a clean readable website content. As you mentioned we are doing the job of these two just by using one node. You’re also able to script modern uh/dnamic websites which are websites that change over time which is great. And if you want data safe from bans and errors. So there isn’t really any IP banning like HTTP because behind this node right here there’s a ton of code that happens in the back end which allows you to be more safe when you scrape. And the pros here is handles JavaScript sites easily like I mentioned. So modern and dynamic websites. It returns clean markdown or JSON which is not the full HTML but the thing that we actually want from the website which is the text. It uses random proxies avoid bands. Uh so when you hear proxies it just means that it’s like sort of some things in the back end in the code behind this website uh when it actually scrapes that make it safe for you to actually do it right so you don’t actually get banned and can map search or extract data at scale. So, this is scalable, much more scalable than this because this only works for a few sites and then you get banned or something bad happens. But in this case, because it’s safer, is also more scalable over time. The only cons with this is that it needs an API key plus a small cost per crawl. So, as we saw, this is not free. I mean, it is free, but if you want to go above this, then you’re going to have to pay. And I believe that if I go to the website, if I go to pricing, then we have per credits, right? So, we have 500 credits for free. And if you want 3,000 credits, you have to pay $16 a month, $16 a month, which is not bad. Um, but it only depends of how many credits you need, right? And each scrape takes about two credits. You can scrape about 1,500 websites um using 3,000 credits depending on the website and depending how complex it is. And then it’s slightly slower than a raw HTTP request. So, this takes a bit more time uh just because there’s more stuff in the back end. As you can see here, if I go to execute step one, two, well, actually pretty fast. Uh, and here, if I just go to J solutions, it’s much faster, right? Like maybe half the time. And the third method is API. Now, I’ve made a full master class on API, exactly how it works and different use cases that you can use with API. You can check it out up here. But if I go to API platform, api.com, the way that I would describe this is the Amazon for scrapers. So just like on Amazon, people sell something and others buy something. There’s consumers and there’s sellers. In this case, the consumers is us who go inside the platform to say, “Hey, I want to script some Instagram profiles.” And on the seller side, it’s like, “Hey, I just built a scraper that you can use to scrape Instagram profiles, but you have to pay me or you have to do some sort of exchange of of credits or something like that.” And so when you make an account on Apiy, you can go to console. And important thing here is that on the bottom you see that we have 8 GB of RAM which is memory and we have $5 for free every single month. Now if you do the math here depending on which scraper you use it’s free right depending on how much you use it. And so this is great because it allows us to scrape tons more stuff than something like firecrawl or definitely HTTP because now we have the ability to scrape Google maps, Facebook, Tik Tok, tons of stuff that you just simply can’t do with firecrawl or http. But in this case, let’s just do the website content crawler, right? So the first step is actually connecting and it’s end to a. So I’m going to go to the run and actor, which you can find a here. You can do run and actor actions run on actor. And by the way, actor is just the the scraper. So we call them scraper. Like the Amazon product it’s called in this case an actor. The way to connect it is go here, press plus, then go back here, go to settings, I believe. Yes. And then go to API and integrations. And you can copy this. Bring it back. And go to API key and save and name it whatever you want. Press save. And now you have your account connected. And now the resource is actor. The action that we’re taking is run an actor. The actor source is recently run actors. And the actor in this case you can choose um well in this case we want to use the website content crawler which you can find right here. You can go to API store go to website. Well in this case you can see it here. And let’s say you didn’t see there you can go website content cra. And now you can start using this scraper right away. And like I mentioned this scraper what it is it’s something that well in this case was built by API itself the platform but usually we have random people like let me show you we have compass we have API dojo we have clockworks we have curious coder and some other people who actually build these scrapers and make money out of them. So as you can see here the pricing is pay per usage so you pay per run but since we have $5 of free credits each run I believe is a few cents. We’ll see when we actually run it. um but is very very cheap. So in this case, you just want to test it. Just press start. This will be an automatic thing that will be there at default. When you press start, what this will look like is that it will start running. It’ll show you that it’s running. And here it will show you the results, the request, the amount of usage that it takes to scrape the website and the duration and also the date. And down here you can see the actor getting the data. Now, an important thing here is that we currently just used API’s platform to scrape, but ideally we want to use it within our automations. And so, right here, we can see that we have the full text of the website, which is great. And now, in order for us to set this scraper up, all we have to do is go back to any I can choose the website content crawler. And now, we need an input JSON. So, an input JSON is something that you can find right here. And right here, there’s two different ways that you can run it. The first way is manual where you can start adding the URL of the website, the different types of crawlers which is optional but you have different types. So adapt is switching between browser and raw HTTP which by the way makes no sense to anybody. And then we can use the crawler type which is the type of thing or the type of way that we actually crawl the website. Crawl just means extract all the data that you can then apply to the actual scrape. And then there’s also stuff like crawler settings, HTML processing, output settings, and run options, which are all things that we can change. But to keep it simple, we will not change anything. All we have to do is go to JSON, which is the way that we actually use this in the automation. All I have to do is copy this. I have to go back to N. I can delete this and I can paste the URL or not the URL, the JSON. And now all I have to do is change the website, right? With the URL. In this case, let’s leave this right here. I can now press execute step. If I go back, I can see in the runs, this is now running. So, we have a new thing running automatically, right? Without going into the actual platform, which is how you use it within your automations. All right. So, I realized there was an issue here. And the issue was that I actually exceeded my memory, even though it doesn’t say here, but I’ve been using this a lot more than you think. Um, but if you’re new to this, you will not have that problem. So, I’m going to sign out and log in with a different account. So what I did here is I just changed the count cuz the other one was maxed out and now the actor is running. So we can wait for the information here. All right. So it just finished running and we get this data right here. As you can see I told you that we don’t actually get the text of the website. What we get is something called a default data set ID which I can copy and then well not copy but go to the next step. So let me just pin this. Press P so I don’t have to rerun this again. And right here I can go to schema. I can look for default data set ID which is right here and I can give it as well and make sure that your connection is correct. And now if I press execute step I can see that I have the whole JSON here and down here I have the text of the website which I can then use for the next steps. Now, you should only be using Apify really when you’re doing large scale scraping or complex projects like LinkedIn, Amazon. Because Apify is known not for scraping just websites, but for scraping Instagram profiles or Tik Tok profiles or Facebook or LinkedIn. If I go to here, LinkedIn, a platform that natively does not want to get scraped. Um, you can see that we can scrape it using this using these different scrapers. And we have tons of options as well. and also when you need to use pre-built scrapers or browser automation because these right here are all pre-built scrapers that we can use to do whatever it is that we want to do. And we have a big variety of different scrapers that we can use for different use cases. Like I mentioned, social media is a big one. Uh which is where we use API for a lot of these things. Uh but there’s tons more as well. Now the pros is that we have a huge library of pre-made scrapers actors. It’s cloud-based so there’s no setup. It handles login based or complex sites which is very good like LinkedIn something that with a HTTP node you just can’t do because there’s an encryption there’s a password and so what they have is they have proxies that go around the password they make it seem like they’re an actual user to then script the data and the cons is that it can get quite expensive at scale depending on the scraper that you use depending on the actor more setup steps for custom logic and overkill for small simple scrapes right so if you’re using something really really simple you’re better off going with something like Firepro, which is simple, it’s very easy to set up, and it’s just made for websites. So, now that you have the skills to build workflows with AI agents, let’s focus on building just AI workflows. Now, don’t get me wrong, AI agents are extremely powerful when you have to build them for businesses. But the reality is that most of the times we simply don’t want an AI agent inside the workflow because it’s much easier just to have a simple workflow. And tons of businesses just need something simple rather than anything complex that will just make it harder, that is not scalable, and that we simply just can’t put to production. And so in the next module, we’ll look at real world AI workflows, projects that we build step by step for businesses. We’ll look at everything again from finance, operations, sales, and marketing. So you’ll be able to build AI agents and workflows at the same time. I built a noode rag agent inside of nitn which allows me to search through hundreds of documents all within seconds. All right. So this agent is split up into two different steps. The first step is new document into superbase. So if I go here to the SOPs which tag team made a quick one. I can see that I have a SOP for a creative agency. All I have to do right here is go to file. I can download it as a PDF. And this is a thing that I have to upload into Google Drive. As soon as I upload it into Google Drive, it will download here and I just have to press execute workflow. Of course, this workflow will automatically be will be executed every on a pulling trigger. So every day or every hour, whatever it is. And now this file is stored in our superbase, which is the vector database that we have here. And now all I have to do is go to our next agent, which is the agent that you’ll be using, and go to open chat and ask it any questions we have. So if I go to SOPs, I can see that one of the questions, one of the things that it mentions is that ClickUp or Asana or notion are used as a project management tool. So if I go here and say what tools do we use for our project management and what it’s doing now is it’s querying the agent. So it’s quering the actual database that we store the information in. And it’s going to give us an answer. In this case, it’s ClickUp, right? And if I go here, the answer was ClickUp, right? So that’s exactly how the agent works. And if you have hundreds of documents, it will scan through hundreds of documents and it will give you a concise answer based on what it found. All right, so let’s go to Miro and let me show you exactly how it works and what the whole thing’s about. So the source data is essentially what is that thing that we give the agent? What is that thing that we give the database for it to pull information from when we ask any questions. Uh in this case it can be in the form of video, audio, image or text. We use PDF but you can use any of these. Now for the source data for the data for the file whatever you’re using uh to be added to the database again for the agent to pull information from it needs to be transformed into an embedding. Now what the embedding means is that it takes the file and turns it into these numbers into vectors right which gives me a bad bad um memory of high school. Uh but the embeddings right here are 0 1 0 0 1 0 0. It’s just a bunch of numbers that represent the file that we gave it. And then these vectors, so this is a vector for a specific file will be stored into a vector database which is a database which has different vectors. So different files and that’s the thing that the agent is going to query is going to ask when it needs to find anything that we asked it. And fundamentally that’s how a file gets turned into a vector which gets stored into a vector database. It might sound complex but it’s actually very very easy because a file is a vector and database is just full of vectors full of files. Now how does it work when you actually ask it a question? How does it pull information from the vector database to give us an answer? Well, the question that you ask it is in text. You say, “Hey, what is that XYZ?” Now, those different letters that you ask, those sentences that you give or that question gets turned into an embedding which gets matched to the embedding sear and that’s how it gives you an answer because it matches the different numbers. All right. So, let’s go to edit. Let me go here and we can actually build one from scratch. So the first one as I mentioned is pulling data from a Google drive and that will be the thing that will be stored into the superbase. So ideally your team will just drop files in Google drive and the automation just runs every every so often every 1 hour every day or whatever it is. So first step is actually making the drive. So we made a drive we called it rag example and that’s the thing that you want to do on a Google drive because that’s the place that we just drop the documents for it to go to the superbase. And then we go here and know the first step here is watching every new file that is created because that’s the thing that starts the automation, right? We don’t want to automatically or we don’t want to manually run the automation every single time. We want the automation to be smart enough to know when a file is created in that drive so that it pulls it to the database. So the first step here is Google Drive and the action is on changes involving a specific folder. So what this is is you’re watching a specific change within a folder and the to change itself is a new file being created. So all you have to do to connect Google Drive to your Nit end is go here and you need a client ID and client secret. I would recommend watching or asking the assistant exactly step by step what you can do. It’s more of a longer process um but it’s very very easy. Let me know down below if you want a full tutorial where I can show you exactly how you can do it. Uh but once you connected your Google Drive, let me go here. You’ll have this. Then it’s asking you pull times. This means how long or how often do you want to run the automation. So in this case we can do every minute which is fine and trigger on changes involved in folder. Okay that’s fine because we want to change we want to watch changes inside a folder. The folder itself will be rag example. So rag example it’s right here. And then what are we watching for in this case? We’re watching for a file being created. Right. So let me actually test this. Let me fetch test event. In this case, I think the file was the one I pulled it before, but let me do another one. So, let me delete this with the trash and let me put it back here. So, I deleted one here. Every minute, it runs and it checks that a new document has been added. So, I can go here, fetch test event, and this right here has been added. And this will be the file. So, let’s see if that’s the file that we have, agency SOPs to PDF, which is this one, right? And that’s the one that we’re going to be adding to the actual database. All right. So now we have an automation set up where it triggers whenever a file is created inside of Google Drive. But how do we actually send a document from Google Drive to the vector database, right? Well, in this case to send any documents there, we have to download the file first because the vector database only gets or only intakes binary which I will explain just a second. But the way that we have to send the document in the vector database is in a very very specific format which is in the binary format. So all we have to do here is actually download the file before we send it to the vector database. And to download the file you have to press plus go to drive and then you can download a file right here connected which is the same file download. And then the file we don’t want to select the file because we want it to be dynamic. We want to change every single time. And we can do ID and the ID of the file will be the one here. So let me go down to the ID. There we go. And this is the ID of the file that changes every single time because it’s a new file that we’re doing. And that’s the thing that’s going to be added to the vector database. And if I go here, let me just pin this, which means that I will already have this input. I can I don’t have to rerun this. I can just use this as test data. I can execute the step. And I can see that we have binary right here. This is exactly the type of input or the type of thing that goes into the vector database, which you don’t get in the previous one. So we have to download it first. All right. Now once we downloaded it we can go to superbase because that’s the software that we’re using to actually add a document to superbase vector store add documents to vector store because we’re adding a document and you’ll come on this page now once you come to this page in order for us to connect your superbase vector store I’m going to go through everything step by step so we go here create your credential and then the service role secret which will be the thing in superbase so let me go here let me actually log out and make a new account so you guys can see exactly what it looks like sign up now Actually, let me do my email and then my password. God, which is the same password I use for every single email, which is not good. Uh, sign up. Check your email notification. So, this is the email that I got. Confirm email address. And this will be the account that is just made for Superbase. All you have to do is organization, personal. There you go. Create organization. And that’s I just want to walk you through step by step because that’s exactly what you have to do when you do this. And you create create a new project. Uh let me just let me just cancel. That’s fine. So that’s it. So now actually we can create a new project because we actually need this. Uh let me do n YouTube rag agent. The password is not strong enough. create a new project. And now we have the project that is being added to Superbase. All right, cool. So once you get to this page, there’s a few things we have to do. Now the first thing we have to do is we have to connect our Superbase to NN. And then the second thing we have to do is actually make the database that we add the document to. So in order for us to connect the NN, we have to have a service ro secret. In order to have the service ro secret, we have to go, I believe, to project settings API keys. There we go. Service ro secret. So we can reveal. Let me just copy this. And this is a thing that you want to paste into any none here. And you can save it. Couldn’t connect with these settings. Let’s see why. Okay. And so the reason why it says couldn’t connect settings cuz I’m missing my host, which I didn’t even see. Uh now, so to connect this host, you have to go to superbase, you have to go to, I believe, project overview. Yep. And then down here, there should be a project URL, which is this one right here. You just copy. Go back to NN, paste it. And now you can save it. And now the connection is tested successfully. And let me do N8N YouTube uh 21st August. Name your connections, right? Cuz don’t be like me. Save it. Okay. So now that we connected our NN to Superbase, we have to put operations mode, which is insert document because that’s the thing that we’re doing. We’re inserting a document into a database. But the problem is there’s no database to add the documents to. So the next step is this. All you have to do to connect or to add a database is to go to docs, scroll down to uh where is it? Yeah, this one here. So a quick start for setting up your back to store. Press this. You’ll come on this page. All you have to do here, you just have to copy this, right? And don’t get overwhelmed. Just follow me step by step. You go to superbase and then you have to go to this right here, SQL editor. Just paste this here. Paste it. So you go like this and zoom out. And now you will have this code here. Now all you have to do is run it. Once you run it on the bottom right, it should say success. No rows returned. Okay. So once that’s done, once you actually made this on the table editor, you can see that we just made a table called documents. And this right here is the database that we’re going to be adding the document to. So if I go back to Nan, I can now choose refresh. Let’s refresh. actually cuz sometimes it trips out and it takes a while to actually update. I can go here and I have documents now from the list and so that’s document that’s the the place where we actually get to store the document in. If I go to options can match the options Mac documents and leave this as is and the embedding match size is 200 which is fine. And now in order for us to actually make it work we have to connect two different things. The first one is the embedding which is what is that AI or I mentioned before that we have to take the file and turn it into different numbers. So we have to use AI for this which in this case we could use openAI right here and we can leave this as text embedding 3 small again to connect your OpenAI to NN all you have to do is get the API key which you can find on platform.opai.com open.com. Let me go here. Let me actually show you. Apart from the open.com, you log in dashboard. On the left hand side, you have API keys. Create a secret key. Name it whatever you want. So, let’s do nitn test YouTube secret key. Copy this. And now we can go to nitn. We can paste this. Name this test August 19th. Oh god. test August 19th. We can save this and now the connection is done. Okay, that’s how you connect your OpenAI to an event. Um, and now for the model itself, you want to connect this to text embedding three small. It doesn’t really matter. Um, just do this one. This is the fastest and probably the most efficient for now. And this is the thing again that’s going to take the file, turn it into numbers to then add it to the database. And now for us to actually add a document, we have to do the default data loader. So it loads data from previous steps into the workflow. So let me go here. I can press this and in this case we don’t want to do JSON but I mentioned before that we want to do it as a binary which means that it’s asking us what is that type of file what is the type of input that we give you in this case it’s binary so load all data input yes that’s fine automatically detected yes that’s fine and simple is fine that’s all good is there anything we want no that’s it okay so in this case data format automatically detected by time text splitting is simple and that’s all you have to do now this right here just means it splits every thousand characters within a 200 100 character overlap. So before if you saw the PDF was actually stored into 10 different rows, 11 different rows. It’s because it actually split it up. So this right here is used then it goes here to the embeddings turns the file into the embedding and then in order for us to actually store the document we have to use this one right here. So let’s test this. Let’s test this right here. Let me go to unpin this. Let me go to Google Drive. Let me just reput another one. So piece replace the file. I can go back to NN. And now if I execute the workflow, it should work. Let me go here. Download the file. It goes here. Okay. Everything was successful. And if I go to NN YouTube agent, I can see that the data was stored here. And the data has the ID which is just the rows, right? Every every new every new entry is one. And then content, which is this, just a bunch of text. Metadata, which is JSON. which is a bunch of stuff as well. Embedding which is again the thing that I mentioned which is the different numbers. These are the vectors which might look a bit intimidating at the start. Uh but these are the series of numbers that we have that are stored in the vector database which is the thing that’s going to allow us to actually ask it questions. All right. So once this is done we have to go here and we can get on to the second agent because the second agent is what the real source is about because we can actually ask it any questions about the document. So we can keep this on the same workflow. So let me save this. Right here we have upload a document, download it and then add it to the database. Now we can start by actually querying the superbase. So for us to actually create the superbase, if you really think about it, we have to text the agent. In order for us to make a text agent, we just have to add an AI agent which will go here. And then we just have to connect it to a chat trigger, which means that we have a chat connected to the agent. So we can talk to the agent. All right. So there’s a few things. Uh the chat agent. So this right here, I can just talk to it, right? And it will send the information and it will send it here. It will do whatever. And then we have the AI agent. In the AI agent, the source for prompt, meaning what is the input? In this case, it’s just connected to the chat trigger node because this is the chat trigger node. We can leave this as is. The prompt is fine. Uh require specific output format. No, we don’t. And now it’s asking us to do a system message. So that’s the thing that you want to add to the AI agent. Let me go here expressions so I can do it full screen and now I can start adding the prompt. Now for the prompt itself we usually use a structure which is overview tools and then rules right for overview we can say you are a helpful intelligent uh information extracting I don’t know if that makes sense but extracting assistant that helps me to answer or the answers any queries that come to you. Okay, that’s fine. For the tools itself, um we have to add and then for the rules we can add as well later. So overview you’re a helpful intelligent information system answers my any queries that come to you and then tools we can add the tool in this case we only have one which is getting the uh superbase for the effective database and then we have the rules if I go here we can now connect this to a chat model which in this case we can do openi you can’t see it right now cuz my face is there but openi chat model is here can press this and now again we already connected openai to nnn so we just have the connection here in the model leave this as 4.1 bin we don’t have to connect memory or actually no we have to or we can right we can uh for simple memory just so that it actually remembers the previous questions that we asked it we can leave this as this this is fine and now this is asking how many past interactions does the model receive as context five is fine you can add more if you want in case you’re having longer conversations where it needs to remember what you said before and now for the real source of the AI agent it’s the superbase so if I go here superbase vector store you can see that now the tool is this one here so let’s first let’s rename this do vector store rename. If I go in here, I can then have different settings. The first setting is obviously the connection which we already made before. Then the operation which is what is that thing that we’re doing in this case is retrieving documents as tool for AI agent which is fine. Again we previously we had insert documents. The description is you can just leave this as work with data from the superbase vector database rhymes. And now the title the table is a database right that is a thing that we just made this one here. So if I go here and I go to it only gives me one option because we only have one table documents. The limit is fine include metadata. Actually I don’t this says number of top results to fetch the I don’t think we need a limit. I think we can just not have not have one because it can pull any any any number of results. Include metadata. What is this? Whether or not to include document metadata, it’s fine. All right. So now we can connect this to an embedding because just like we did this above, we need to embed which means that we need to turn our question into numbers so that it can ask it any questions on a vector database. So we can go here embedding. And by the way, you can connect this to the same one, right? But to make it less complicated, we just have our own. Uh so let’s go here. Embeddings open AAAI. Leave this as before, which is fine. And now this is embedded. So in theory now when we ask any questions, it will go to the AI agent. It will think through it it’s uh its brain, which is the LM. It will remember any conversation that we had. But most importantly, it will send the information here first. It will embed it. So it will turn it our questions into numbers. It will then match it up against any numbers that we have, any vectors that we have in the vector database. It will then send us back an answer in natural language, right? Like before like I showed you. Now one thing I need to finish is the prompt. So let me go here and let me go up here. And now for the tools we have vector store. Very important that you name the tool the same as the tool that you actually have. What I mean by this is like vector store needs to be the same name as this. If I rename this to something else like vector store, make sure to update that into the prompt, especially when you have more tools. So, vector store, this will always be used when answering any questions that the user might have. Now, rules. The only rule I have is actually I have two rules. The first one is you must always pull information from this from the vector store. Um that’s it. And then your answers need to be concise and to the point. Uh okay. So why do I say this will always be used? Because previously when I actually made the this agent uh I was asking it a question. it was using like the natural LLM to actually answer it like what what is a project management tool that we’re using. It will use the LLM to search in the internet or search through like its own its own storage. But in this case, we only wanted to pull information from the vector store. Okay, that’s why we’re saying this. And then we always we always want the answer to be concise because I don’t want it to give me a full paragraph um or a long long paragraph that we can’t read. All right, so I think that’s it. Now we can test this and if it goes wrong, we can uh we can obviously change it. So let me go here. Let me say let me go here. Let me get something specific. What are the things that are included in the content production? That’s it. And it should say video, social media, copyrightiting. So we go what is included in our content production. So what it’s doing now is it’s going to embed our answer. It’s then going to query with the vector database, give us back an answer. And now it says that we have video production, social media and copyrightiting. And if I go here again I can see video, social media and copyrightiting. So let me ask another question. So let’s say I want to ask it what is inside content I mean the social media. So say what is inside social media. What it should say now is that we have content calendar managed in notion post schedule one a week. Content calendar is managed in notion post schedule once a week. Right? as this is insane especially if you have hundreds and hundreds of documents inside the vector database which allow you to pull information from these uh documents in in a matter of seconds cuz typically when I worked with agencies especially creative agencies or any type of agencies we worked with a lot of them they store their SOPs into a Google document into multiple Google documents with tabs and in order for them to actually ask any questions about the actual document they have to go inside the document itself to get any answer but in this case we just have a chat AI agent queries itself and then gives us back an answer in very very simple way in just seconds. So that right there is a full build for the rank agent inside of N&N that allows us to search through hundreds of documents that we have. In this case I only used one but imagine you can add multiple hundreds of documents inside of Google Drive which will pull it into the vector database and then we can just ask it any questions that we want. Hey, in this video I’m going to show you how I built an AI support agent for an e-commerce store that automatically pulls in queries, classifies a query, then searches through a directed database for answers, drafts an email reply before alerting our team to review the email and send it. Now, for businesses who receive a large amount of emails from customers asking questions, at least 90% of them are the same. These systems are amazing just because they save that time that you can now devote to actually growing the business. All right, so I’m actually going to test it before I even explain exactly what everything does, just so you get to see the final outcome. So, I’m going to send myself an email saying question about the return policy. All right. So, I asked the return policy plus the shipping location. Uh, I’m going to say thanks in advance. And you press send. Now, this right here will send it to the base email. So, this will be in theory the email that receives all the incoming queries from all the customers. As you can see, we just got the email. I go here. I’m going to execute the workflow. So, this is going to run. Is that going to classify the email? It’s going to then pull the answer from the reged database. It’s going to drop an email and then it’s going to send us a message on Telegram informing us that a new inquiry came through. We have to review it and actually send the email. As you can see in Telegram, we said new inquiry received from the name about is the question of the actual the subject line and then the action is email drafted to your email. So they know exactly that they have to go to their email and actually look at the email before sending it. And if I go to my email here, I can see that on drops I have one new dropped. You can see that we have the return policy. We have the shipping locations and James Noble Mart customer service team. All right, perfect. All right, cool. So, let’s go through the whole process step by step. Now you have an idea of what it actually does. Takes emails or takes emails from with questions. It then looks through our vector database which is a database that has different um the different documents and then sends back an email reply and then informs the team to then go in drafts and actually send it to the customer. All right. So, the first step here is actually incoming emails. So, this will be the trigger on any incoming emails that come through. In this case, we have an inbox and for any businesses really, they have inboxes like um a company name support.com and that’s the inbox that they use to answer any incoming FAQs. So, they have this and this would be the domain or the actual inbox that we use to collect and then run the automation for the first step. So, in order to connect our Gmail, we have to go here obviously choose the Gmail trigger cing credential and then you can sign in with Google and take you through the whole process. Uh it’s very very easy just as a regular sign in with Google sort of thing. And then it’s asking us for the poll times. The poll times says, “Hey, we’re looking at your email, but how often do you want us to go through your email to make sure that we have all the questions?” In this case, you can put minute, hour, day, week, month, every x custom. But I think every minute is fine. It depends on the amount of queries that they get. So I would ask the business, hey, how many queries do you get a month? How many queries do you get a day? If they say, hey, we get about a thousand a day or 100 a day, whatever it is, maybe we can run it every hour or every every 5 minutes, right? But speed speed to lead and speed to questions is important because that builds up the brand and it just makes a part of better impact on the customer as well. So we can obviously do every minute every hour and with so again it depends on on the amount of inquiries that they get. Then we have the event. So the event is hey what has happened like what is the thing that we’re watching for in this case is a message received which is the only option here right and then simplify which is fine uh because you just want to keep it simple with uh with the way that the the actual note is set up. Once this is done, right, which is the again the email trigger. So I can actually fetch test event. I believe that we have Yeah, we don’t have any emails anymore. Um, let me actually send myself an email so we can we can test this 100. Hello. Hey, I need to know the shipping policy you have. I send it now. I don’t have to wait. Of course, when you have to run this for a customer, you have to automatically run this every 1 minute. But for this case, we just have to test. Um, so I’m just going to send it to myself and wait for the email to come back. As you can see, we got the email here. If I go here, I can fetch test event and we get the snippet, which is the email body, which is in this case is, hey, I need to know the shipping policy you have. And that’s the thing that’s going to be sent to the next uh step to actually classify whether this is a promotional thing or an actual FAQ. So the next step here actually before we get to this point is we have to set the variable. Now, why do we do this is because when we look at all these, we can get a bit overwhelmed and we don’t really know where the where the actual text is. So, we just want to basically make it as simple as possible for the next steps to pull in information from Gmail. So, we add in a set node which you can find here. So, set node edit field set. This allows us to just pull in variables from a list of variables. In this case, it’s just snippet. And we call this email body and call it whatever we want. Basically, this makes it so much easier for the next steps to actually pull in information from Gmail without having to go through all these different pieces of information. Once this is done, we go to classify emails. Now, we have to have this step because not all emails are FAQs. Some are promotional, some are just general emails. In this case, we just wanted to check whether they are promotional or silver service. So, if I go in here, and this, by the way, is text classifier right here. Text classifier. This allows us to classify text based on specific um you know rules. So go in here text to classify will be the JSON email bodies. So let me actually run the previous steps. Let me go here and pin so I don’t have to rerun the whole email. Let me actually execute step. As we can see we have hey I need to know the shape and policy you have. And this will be the thing that we then pull here saying hey classify this text. Now here’s where we start adding the categories. So the categories like what are we classifying it for? like what are what are the what are the rules and what is what’s the logic here in this case we have promotional we have support service now to add a category you have to press this button right here you can put the name so in this case let’s do support service and then description is hey this is the name of the of the actual rule or the category this is the description of what it is so in this case for promotion we said marketing offers discount sales pages newsletters which are typical sort of promotional emails and then we have support service which is customer increase troubleshooting complaints or help requests that’s the only two categories that the classified email node or the text specifier will take into account when it needs to look at the the inquiry that came through from the customer and classify as to whether they are one or the other. Then we have options. So system prompt which is basically saying hey please classify the emails provided by the user into one of the following categories categories right here just so it knows that these are the categories and user provided formatting instructions uh below don’t explain and only output the JSON. I believe that this is a standard prompt. Yeah, it is a standard prompt. So you can just add this um but this allows the the actual node to be more strict and understand exactly what it is. Now in order for this to actually work this doesn’t just work on its own. It works with AI. Let’s say we have to go here the model. to choose a model here and we have all these models. I typically go for the OpenAI chat model because it is the I go for quality plus uh plus price. I think this is fine. Connect it. To connect to your OpenAI, you just have to go to platform.openai.com. Go to the dashboard. Go to the API keys. Create a new secret key and then you can put your name and then create a secret key and then bring it back here to paste it. Don’t worry about the organization ID. You don’t need it. And as well this don’t worry about this. Uh, one important thing here is that for a company to run this, they do have to pay for the credits which you find in your profile and you find it here. But obviously would look into how many increase they get and then make the price based on that. But the price is like 1/10enth of a cent per per run. All right. And now that we connected AI, what this happens, so how this works is we have the email body which is incoming emails. It will then go here saying, “Hey, can you classify this using AI?” Right? It will have categories. It will have strict rules. it will talk to the AI to make sure that that’s how it thinks. That’s that’s that’s the actual like program. Uh and then based on the the two different sides, we have promotional, support service. In this case, we actually didn’t put anything for promotional. So if something is promotional, it just stops there. We don’t want to really do anything with it. Uh we only want to send it through if it’s a support service. So that’s why we drag this across and we put it to the next node. Uh which in this case is an AI agent, which is really the the main source of the whole system. And so once we classify the emails we say, “Hey, okay, this is an FAQ. This is like actually something that we can answer, let’s go out and actually review and draft an email for the customer using the data that we have. Now, if you haven’t checked out my AI rag agent system, then make sure to check it out right here on the top or below. It’ll show you exactly how we set this up step by step. So you get to see the whole process. But essentially what it is, it’s an AI agent that gets incoming emails. In this case, it gets the the inquiry from here, which is the same input as this. But now we know that it’s support service because we went through the step. And what it will do is I will go through a back to database. Now, a back to database is something that looks like this, which is composed of different rows. These rows come from this document. Okay. So, we have a document, which is essentially where all the information is stored. So, account login, all the different FAQ questions that people usually ask, which is typically what a company would have in the first place. And then now we basically transform this into vector database or embeddings in this case we call them that will allow the the program to actually take the question that’s coming through match it up against any of this embeddings and then give us back an answer in the simplest way. So the way to do this is we have an AI agent right here the prompt which is the user message. This right here will say hey what is the thing that we’re fitting into uh the AI agent in this case is email received which you can find from the email body right here. So this right here will be the the from because when we actually have to drop the email we have to know who the email is coming from and the name as well just so we can personalize the email plus send it to the right person and that’s about it for the user message. In this case we don’t require any specific output format. We don’t enable any fallback method. This just means do you want it in a very in a in a specific format like JSON or anything like that. We don’t want to do any of that. And also do we want to enable a fallback method. This means that if OpenAI does not work you want to use another AI to to test. In this case, you could or could not put this on. I mean, typically I wouldn’t have it on because the chat model right here works fine. Um, but you can have it on even to be more safe. Now, the system message here is a system uh or is the message that we tell the system like, hey, you are a helpful intelligent XYZ that does a few things. So, the prompt for the AI agent follows through a very very specific structure that we use for most of the AI agents that we build. In this case, it has an overview. So, you are helpful assistant that answers any inquiries from our e-commerce store called Novart. You’ll be dropping email replies for the incoming queries that come through. And then tools, this will be the tools that the AI agent is connected to. In this case, it’s two. The first one is pulling in information from the document that we have, which is the one right here, which not right now is stored in the vector database in superbase. And the second one is the email draft, right? Because this tool will be used to draft any emails back to the user to make sure that they have the corresponding answers based on the information that comes from the vector store. Some rules here is we have to always use the vector store before answering any questions and droting any emails. This is very very important because sometimes what the AI could do is that it can drop the email but it will not have any context or any information that’s actually valuable for the end user uh to give them an answer. So it’s sort of saying hey what is the return policy? I reply to you first and then I go out and look for the information. We have to make the order actually make sense which is why we tell you hey look for the information first and then you can go and drop an email and then some extra information. My name is James. Make sure to include that when dropping an email because at the end um what it did basically in the email it said hey thank you uh this comes from add your name like bracket add your name and then uh it will put the put the actual company name in this case we want to put James because again that’s that’s reality of what emails look like they put names instead of just adding variables uh so we give it that context as well all right once this is done then we have the chat model in this case we can add here same way as we did before we can go to open AI and we have to connect to our account and use 4.1 mini. Again, this is perfect uh perfectly fine for for this use case. Now, what we have to do is connect to tools. Now, the way that an AI agent works is that it gets it gets the inquiry. So, it gets an input like, hey, dropped an email or hey, look for this information or do something and it will then think through what it needs to do using its model and then to take action what it actually needs to do, it uses tools. So, in this case, because we have two tools again, one for the draft and one ones for the vector database that actually looks for the information. We connect these tools to the corresponding softwares. In this case, to connect it to the vector store, we have to go here. In this case, well, I mean, it’s vector store, so you have to press plus. Let me see if I can move this. There you go. Uh, superbase superbase vector store and you’ll come to this page. Once you get to that page, so let me delete this. You’ll be here. The first thing you have to do is create a new credential. And again, you should have a service ro secret and a host, which you can find here. And then we have this page right here. The first thing you have to do is obviously make the account. Then you have to make the database. And again, I put a whole video on how to do this down below. So, make sure to check it out. And now we have to go back here, go to the API keys, and you can then reveal, copy the secret, and paste it here. And then you can press save. And then you’re done. All right, cool. So once we are done with this, we can then use the operation mode. Again, operation in any to end just means what is the thing that we want to do. In this case, is retrieve documents as tool for AI agent. There’s a different options here. And now the description is work with data inside the vector database to answer any questions, which is fine. Let me delete the extra e right here. Um, and then the table name which will be the table here, right here. Table editor. Yeah, this will be the one that’s containing different information. As you can see, we have no mart e-commerce general information. We have go to your cart xyz. All the different information that it needs to use in order to then answer any incoming queries. And once that’s done, we have the limit. Again, actually, I don’t know why I put this to four. Uh, this basically says the number of results fetched from the vector store. I typically will leave it blank. Uh in this case of course if you have a really really large vector database and you don’t put a limit it will basically use more credits than if you put a limit on x amount. Uh so that’s why we add a limit here and then we include metadata and then we have to put the query name which is match documents which is the database that we’re using. All right then we have the embeddings which are a way for openi to take the incoming query like hey what’s the return policy turn that into numbers so that it can match them to the embedding. Again, this will make much more sense once you see the video uh of me creating the AI rag agent and the fundamentals behind what it is. But in a very simple way is that text is turned to numbers. Numbers will match numbers to give you an answer. Um to do this we have to uh put the embedding which in this case is another LLM and we can use OpenAI connect to OpenAI. You can leave the model to text embedding 3 small. All right. All right, once the vector store tool is finished and we now can look for the information in the vector database, we can now connect the second tool which is the email drop because again the sequential order goes in the vector database to find the email or to find the information in this case sorry and then go to the email to then drop the email to give an answer to the customer. So in this case we have to use an email draft. You can go here Gmail tool and you come on this page you have to connect your email. So is the same exact process as the one before create your credential and then you can set it with Google and then you have to use a tool description. So the tool description you can set automatically the resource which would be uh what is the thing we’re doing in this case it’s not label it’s not message and it’s not thread it’s draft and then the action that we’re taking is we’re creating a draft and the subject line something good and it has is that we can actually let the AI define this define this parameter which is the subject line of the email and then the email type which would be text then we have the message which is the email body and we can also press the button right here which will let the model define this parameter which is amazing because we don’t have to do anything and also on top of that we also have to send the email to someone. So we have to press to add option to email. So who are we sending the email to? And then the [email protected] will be replaced by the email that we mentioned that we’re giving the AI agent to take action. So we can just press this and now the AI will already have be smart enough to be able to think about who are we sending the email to based on the input that it was given. All right. So let’s put this to test. Let’s see how it actually works. Um I think we can just Yeah, I think we can just test this. Yeah. Let me go here. Here I’m going to press this button right here which just test this right here. It will classify it. We’ll say it’s a port service. Now what it will do is it will look through the back to store. But again first of all the first step is it will think through its memory or its LLM um its brain to then think about what it needs to do. So the first step is finished and then the second step is drafting an email and then it goes back and it thinks through before it gets to the next steps which is Telegram in this case. But before we get to that, let’s look at the draft of the email. Let me go here. Go to draft refresh. Then the shipping policy tells me all of this. Now one thing we want to change ideally is maybe the size of the length of the email. I think this is pretty long. Uh so to do that to make any changes you can go here and then the rules make the email draft a medium length keeping it concise with a good structure. So, let me test this again. Let’s see if anything changed. And this is how you usually go about iterating and and making sure that the AI agent does what you want it to do in the in the best way possible. Now, if we go back here, you can see that we made another email, which is more structured. Maybe the size isn’t yes, it’s not shorter, but the structure is better, I’ll say. So, now we can say and we can leave this as this. To be honest, if I was a if I was a customer, I would want some sort of answer like this that would give me the best information with all the prices and stuff. Cool. All right. Um, and again all the information comes from here. So the shipping policy and options comes from here which it pulls information from. All right. Now once this is done, we can then go to the last step which is basically informing the team. Now why do we do this is because the email again you saw it wasn’t it wasn’t sent to the customer. It was dropped. We have to notify someone that they have to go to the inbox and actually send the email to the customer if they like it. So that’s why the last step is Telegram which is send a text message which you can find right here. Telegram. send a text message right here and then to connect it you have to create a new credential you have to get the access token if I go to ask AI start a new session now this will tell me the step by step and I recommend you guys always use this sort of feature when you’re not really sure as to how to do it h because it is better than chat GBT because what this does is that it actually looks at the end to end community it looks at the different questions and it’ll give you a step by step as to how to do it so the first step is start a chat with the botfather and then you do different steps until you get the actual access token right so once Once you connect to your telegram, you can go here. The resource again is message because we’re not drafting or chat or fallback or file. We’re just sending a simple message. The operation is what is the action that you’re taking. In this case, we’re sending a message. The chat ID is something that you can actually take. Um, so let me let me show you. Let me execute the step right here. So, I executed the step. Now, if I go to Telegram, I should see the message. Let me show you right here. I just got another message at 350. And now in theory this will give me a chat ID. So if I go here chat ID, this is the chat ID that will be used to then send the the text to. This is great because the chat ID allows it to give us the the answers in the same thread of information or or conversation in this case. All right. Now once this is done, we have the chat ID. Now we have to put the text. So what is the thing that we’re putting in the message? Well, in this case, I thought that it’d be good to add new inquiry received from the name of the person and also the about which is a subject line. Uh you could in theory change this and add more stuff but I thought that this would be the most relevant to have for this agent uh as a text message. Um so we have new inquiry received from name about subject line here and then the action it says email drafted to your email. So again if you saw on telegram that the message itself was email drafted go to the email informing someone they know the name they know the the about like the actual question and they can then go out and send the email. Hey, I’m about to build a live invoicing parsing system right in front of you that grabs invoices from a Google Drive, uses AI to extract all the key data, stores it in a Google sheet before sending an email to our billing team once it’s done. Now, this kind of system can actually save companies hundreds of hours of processing documents. In this case, it’s invoices, which they can now devote to actually growing the business. So, today I’m going to build a whole system from scratch using a platform called N8N. I’m going to show you all the mistakes, all the detours I make that you get to see what an actual development process for a real client project actually looks like. All right. So, this right here is the edit end workflow that we’re going to work with. Uh, we start with Google Drive. So, in this case, I go to my Google Drive. I drop in an invoice that I have, one of the hundreds that I have right now. I go to the invoice. I can see that I have different fields in the invoice. Company name, uh, address, email, line item, price, currency, payment method, invoice number, date, and status. Right? So, these are different fields that I have within the invoice. If I go here to the first Google Drive, I’m here and execute the workflow. What this will do is it will take the invoice that we just gave it. It will then extract the text from the invoice. It will give it to an AI which will check the different variables that we need from the invoice like client name, address, all that sort of stuff. It adds it to a Google sheet database. It then drops an AI to address an email using AI and then sends it to us as well. If I go to my Google sheet database, I can see that now the invoice was parsed. So the different variables have been extracted. If I go to my email right here, I can see that I got an email saying dear building team, you have received a new invoice and it gives me the different details. And it says the system has added the fields in the Google sheet database which you can also view here. If I go here, takes me to the Google sheet database with all the line items there. All right. So, that right there is for the system we’re going to build from scratch. Again, I’m going to start from zero, completely zero. So, I’m going to show you the whole development process. Let me go to a new a new workflow right here. We can start from scratch. The first thing we have to do is actually map out the process of the automation on a platform called Miro. You can use any other platform for this. Uh, but I like using Miro uh because it is very very easy. All right. So the first part or the first the thought process here is we have a bunch of invoices. Then we have to so let’s do invoices. Then we have to basically extract the text or extract different variables. Extract variables from invoice. And by variables we mean client name, client address, all that sort of stuff. And then we want to add it to a database. When someone says database they just mean a Google sheet or table, notion, clickup, whatever it is. And then after we add to the database, we want to send an email. So send email to billing team confirming invoice. All right. I mean it is a four-step process. As you saw, it was more than four steps just because of the way we had it set up. Uh but this is fundamentally what it is that we’re doing, right? We’re watching new invoices from somewhere. We’re extracting the variables. We’re saying, “Hey, okay, what is the client name? What is the account address? What is the price? What is the currency?” All that sort of stuff. And then we’re adding it to a database. And then we’re sending the building team. We’re sending an email to the building team confirming the invoice. Now, typically when I do something like this, I’ll think through how to structure it. So, the first step is invoices. As you saw, we used the Google Drive because that is the easiest to get started with. So, we can say watch invoices from Google Drive. And what this could look like is we run the automation maybe once a day or once an once a minute uh every minute, I mean, every hour or every week. And we watch new invoices that have been added so that we it’s a continuous thing. Uh, and that’s always good because we don’t want to have a system where there has to be a manual step of running the automation every single time. We want it to be automatic so that they can just drop invoices and every so often it takes invoices and then does the whole process. Uh, then extract the variables from the invoice, adds it to a database, uh, in this case Google sheet. Add variables to Google sheet and then send the email to the billing team confirming the invoice. All right. So the first step is Google Drive. So what is the first step is always the trigger. So what is the thing that actually starts the automation? In this case, every new client that has or every new file that has been added, every new invoice that has been added every so often will be the thing that starts the automation. Um so if I go to Google Drive and I go to on changes to a specific folder because we’re adding invoices to a folder, I can see that the change that we want to make is actually when a file has been created, when a file has been added. Um, so first the first thing you have to do is go here, create your credential, and you have to um connect your Google Drive to Nitn. Now, I’m not going to dive into this whole process right now, but I actually made a full step-by-step video on how you can do it within less than 5 minutes. Uh, you can check it out on the screen right now. Uh, but once you connect to your Google Drive, you’ll have a connection right here, which is good. The pull times just means how many times or how often do you want to run the Google Drive. In this case, it can be every minute. Then the trigger on just means what do you want the trigger to be? Do you want it to be just changes involving a specific folder, every file? In this case, it will be a folder because we need a folder to include the invoices in. And then we have to make a folder. So, let’s go to Google Drive. I can go here. I can make a new folder. I can call it invoices test YouTube create. And now this created a folder which I can find here. Now, this is a place where we’re going to store all the invoices to be processed every every so often. Um, okay cool. So now, uh, obviously make sure that your connection is correct. In this case, it actually should be James Solutions, not Nika connection. That’s a different, uh, account. And the folder in this case is invoices, test YouTube. So invoices test YouTube. Okay. And then it says, what are we watching for in this case, are we watching for a file to be created, updated, created, uh, folder created, folder updated, watch folder updated. Well, in this case, we want to do when a folder is created within a folder. So when a file is created within a folder. So in this case it would be when a file is created in the watched folder which is this folder right here. So let me go here do file created. So now this watches every new file that has been added. So let’s try it out. Let’s test because part of automation is testing. I want to have an invoice that I have right now. So you can drop your invoices here and I’m going to test if uh now that added here if I execute workflow. So in this case if I fetch test event I created will this catch the invoice that has been added? Well in this case yes. So this is the output. If I scroll all the way down, I can actually find the link which is a web view link of the invoice that has been added which is correct which is the same one that has been added here because it basically caught all the files from there that has been added. It’s only one. All right, perfect. So we know it works. Um so the first step is done right right here is finished. So we watched invoices from Google Drive. That’s good. Now the next step is to extract text from a file. So let me go here. Extract from file, extract from PDF because the invoices itself are on PDF version. So it depends what kind of PDF or what kind of file you have. Now here it says extract from PDF which is a thing that we have to do uh because that’s the action that we’re doing. But then it says the input. So the thing that’s going in to this node right here which extract text from PDFs has to be in the form of binary. Now, in order for us to get the file to be added here, we have to do an additional step, which is actually downloading the file to then being adding it to the to this node right here because it only likes binary format. And the only way to get binary format is to download the file. So, if I go here to Google Drive, I can now download a file. Press this button right here. Make sure you have the right connection. File, download. That’s fine. Uh, and now we want to actually do it by the ID because if you do it by the list, then you only have access to one file. We don’t want to keep downloading the same file. We want to change the file that we’re downloading. So the files itself all have an ID that’s unique. So if we map the ID, if we put the ID that’s different every single time, it will download every single file differently, which is exactly what we need. If I go here, I can put ID. So we can find the ID. And now the ID will actually be here. It always, it usually starts with one uh Y. You can see here ID um one Y whatever. So this will be the one that we map that we add here to be able to download it. Now if I just execute the step I can now see that I got binary format data which is a thing that we need in order to add it to the next step. And this is the data we got. Okay. So you always need that additional step when you’re actually doing something with Google Drive folder. It’s usually downloading it and then turning it into a binary format when you have to do something with it. Now in this case um the input binary format field is fine data because this is equal to data. So that’s fine. We can execute the step. We’re actually testing. As you can see here there’s a lot of fields. The one we really care about is text right here which gives me the company name, invoice number, customer name, date, company name, all that sort of stuff that we need in order to actually split it up and add it to the Google sheet. So the next step is actually extracting the variables within the text. Because it’s a block of text. How do we split it up? So we get the customer ID, the customer name, the email, the address, all that sort of stuff that we actually need in order to add it to the Google sheet. Well, in this case, you can press plus. We have to go to information extractor. Now, what this does is that it receives text to the actual thing. It then think through what the text is about and then based on the descriptions of the line items or variables that we tell it to to give us, it will then split up the text. So it gives us the the customer name, the address, the the invoice ID, all that sort of stuff that we need. Um, okay. So the text here will be the text from the previous step. So I can across right here and again you can also see the result which is something that any actually does really well. Uh you can see the output before you even test the schema type will be from attribute descriptions. Don’t worry about this. You can leave it as it is. And now we have to add attributes. So attributes just means what is that thing that we want to extract from the text. In this case there’s a few things. So if I go here and I look at the invoice again this would be different for sort of every company. It’s sort of similar. You still have the price the invoice number all that sort of stuff. uh but sometimes we do have something called statuses or payment methods um that we want to account for. So in this case it will be customer name. So we can do customer name. This is the name of the customer. So right here it’s asking us what type of output is it? Is it a string? Is it a boolean which is true or false? Is it date? Is it a number? In this case a string is just text like the normal version. So leave it as it is. And then description is us giving it a description. So it actually helps it in thinking what is the customer name um and so on and then we can put a required so it needs to give us the output. Then we have uh from here company name address and email. So company name this is the name of the company required email this is the email of the customer address as well. So address this is the address of the customer. All right. Then we have invoice number, date and status. Invoice number, date, status. Invoice number is this is the number of the invoice required. Now this right here for date we can actually turn it into a date format and we say this is the date of the invoice required and then status will be this is the status of the payment required and then we have line items. So line items this is like this the description of the payment the price and payment method. Price and payment method. Uh line item. This is the line item of the invoice. Price the total amount. This is total amount of the invoice and then payment method. This is the payment method. of the invoice. All right. So, I just finished filling out all the forms, all the details in the in the actual invoice. We have customer name, we have a company name, we have email, we have address, we have invoice number, we have date, and again we turn this to date because it is a date format, um status, line item, total amount, payment method, and so on. Okay. All right. Now, what we have to do here is we have to do two things. The first thing is to give it a system prompt template. In this case, it’s you are an expert extraction algorithm. They only extract relevant information from the text. If you do not know the value of an attribution as to extract um you may omit the attributes value. I think this is pretty good. I think we don’t need to give it any more context. Now, one more thing we have to do because this does not run on its own. This runs through AI. So, we have to connect a model to it. So, if I press here, I have a list of models that I can choose. In this case, I’m choosing OpenAI chat model. And I will come to this page. The way to connect your OpenAI to Nitn, you can go here, create a new credential. You can go to platform to OpenAI because you have to get an API key dashboard API key. Create a new secret key. Name it. So you can do invoice system. Create a secret key. You can copy this. Go back. Paste it here. And then name this whatever it is. So 5th September connection save it and now you will have your OpenAI connected to Nitan. Bear in mind that this is not free as in you still have to pay for this in a sense. So you go to your profile and you go to billing you have to add $5 because we’re using API credits and API credits costs money. Uh but is very very minimal as in I think I used $5 in 6 months. Um and I was using it quite a bit. So obviously it depends what you use it for as well but it’s relatively cheap. So you can add $5 and you’ll have that last you for a while. All right. So now that we have that the model can be 4.1 mini. It’s good, good quality and good speed. We can actually extract this. So let me run this. This uses the previous steps to test only this step. If I go here, I can see that I extracted uh the comp name, the company name, the email, the address, the invoice number, date, status, line item, total amount, and payment method, which is amazing, which is exactly what we need. Perfect. All right, the next step. So we did this done. The next step is actually to add it to the sheet. So if I go here, I actually made the sheet. So the variables that I have, uh, let me just fill this out so you can see. Go right here. I have invoice number, client name, client email, address, description, total amount, invoice date, status, and payment method. Now, this is right here is just a way for us to actually store the invoice. Uh, cuz there has to be some place for us to store all the information. Um, typically a company, they probably wouldn’t have Google Sheets. They would have maybe a a notion uh maybe some sort of custom software they have or but they always have a database right they always have a place where they actually have to store information. So this is what we’re going to use. Let’s name this invoice uh system and it and YouTube. And now if I go back here to uh here I have to add a next step which is add the invoice to the Google sheet. So if I go here, I can go to action and app sheet Google sheets and then I can a append a row in a sheet which means add a row connect your account. All you have to do is create a new credential. You don’t have to do the same thing you did for Google Drive. You can just sign in with Google which will take you to a page like this. Choose your account continue and then it’s successful and you go back and name it whatever you want. Press save. All right. All right. Now that you connected your Google Sheets, uh it is going to be a sheet within a document. You want to append a row because operation again is the thing that you’re actually doing. And then we want to look for invoice system and it and YouTube, which is the first one that comes up. The sheet will be sheet one because again this right here is sheet one. And now we want to be able to map the fields. So mapping just means that you have different columns. You want to add the variables for each column to make sure that when we run the automation they actually show up. Um so it will be invoice number which is invoice number client name so customer name client email so email address description and in this case it’s line item total amount is this invoice date it’s here status is here payment method is right here I believe that’s it we have to do anything else no that’s all good Um, okay. So, let’s test this. Let me execute step. Now, it’s running. If I go here, I can see that the first run did well. Uh, we have the line items. We have invoice 109, Lucas Martin, the email, address, description, total amount, invoice date, status, and payment method. Let me just freeze this row right here. So, when I go here, it doesn’t it doesn’t actually take it with it. And the next step is finished. So, this can go green. And you see how I’m just checking things off as I actually do this because it is a whole process. I’m planning it out. And now the last one is to send an email to the billing team confirming the invoice. So the next step is using AI because to send an email to the billing team, you typically want to use AI uh depending on the the email of course. Um but in this case we want to let AI actually do the email and we just um set up the email the Gmail after. So let’s add plus let’s do AI. Let’s look for an open AI node which just means hey we’re talking to a GBT like can we do this and it gives us the output. We are messaging model. Uh the again the way to connect to your openi I showed it before. Uh go to get the API key and it’s the same exact connection. If you connected it before you’ll have it here. The resource is text operation is me model because that’s the action that we’re doing. The model will be let’s do 4.1 mini. I think that’s more than good. That’s fine. And the prompt is going to be first a system, right? And then we’re going to have a user prompt. So the system prompt I’m going to copy from the other automation and go here will be you are an email expert for JM media named Jenny. You receive invoice information. Your job is to notify the internal billing team that an invoice was received or sent. In the evil make sure that to include the system that has been added to the fields. So we say okay. So in the actual email itself we want to give them a this right here. So anyone with the link copy the link. want to give them access to the Google sheet because I want them to actually have access to it if they want to look at it. Uh they get a notification saying, “Hey, everything’s good. By the way, if you want to look into this further, you can obviously look at it in the Google sheet.” Your output should be in the following JSON format. Uh so we tell it this because when we want to make an email, the email is composed of two different things. It’s composed of a subject line and it’s composed of a email body. In this case, because they’re both custom, we want them split into two different variables. So that’s why we use JSON to then split the email body and the subject line. And the rules is don’t use any markdown formatting because Gmail does not lack any markdown. It doesn’t actually recognize it. And then it actually recognizes HTML which I’ll speak about in just a second what it is. Uh so we use we tell it that we say hey talk to talk talk in the way that Gmail actually likes that you talk to. Um that’s fine. Now the user prompt is going to be this. User prompt is going to be the variables. So in this case, we need to add all the different variables. So it can be invoice number. I’m going to cut to me actually finishing this cuz it’s going to take a while. All right. So we have invoice number, client name, email, total amount, and invoice date. Now we can map this. So invoice number right here, client name right here. Uh email, total amount, and invoice date. Yeah, let me do status as well. And we can also add payment method at this point. Cool. All right. So that is the input that we give it. So we say hey you would do XYZ and here’s the input that you have to do this thing for and just give me the both the emails. Okay. Now one more thing we have to do here is actually turning this on. The output content is JSON because we actually tell the AI give me JSON. So we wanted to actually officially say hey the output should be JSON yes or yes. Um and we don’t want it to error out. So that’s good. Now let’s execute the step which is basically testing. It will use the previous variables and now it will give us the email. So the email is all in a weird format. This is the format that Gmail likes when you give emails. So don’t worry about this too much but worry about the fact that you got the subject line right here and you got the email body as two different variables right here that we can then use to actually send the email. So if I go here, I’m done with the AI part which is well I mean I guess it’s part of this. I can go to Gmail send a message to connect your Gmail to NN you can go here send sign in with Google and then you can take go through the same process that you went through Google sheets close and there’s three things that we have to fill out the first one is message uh or resource is a message operation which is what are we doing we’re sending the message uh who are we sending the email to in this case let’s do my email the subject line will be the one here so we just drag it across and we can see even the output before we even test which is again amazing and then and the message itself or the email type in this case which is where we add HTML. We have two two options. So we say okay we’re sending the email to someone. How do we want to send it to them? Do you want it just text or do you want to put HTML? HTML is just a way that you make your emails look pretty. You know when you guys get emails that look nice have formatting that have headers that have all that stuff. That is because you’re using HTML. So we kind of want to do that which is why we use HTML and that’s what we tell the AI to output it as HTML. Uh which is good. So the message in this case will be the email body which is one here. We just drag it across. And one thing more that we have to do is we want to take this off. So append edit end attribution which is basically a way for end to end to market themselves in a way. Um so when you send an email to someone if you don’t turn this off it will say this was sent by edit end. So we turn this off just because it’s more I guess professional more clean. It looks like it actually came from a real person even though we all know it’s not. Uh especially when you’re doing 100 invoices a day but that’s fine. Now we get it to execute the step. So, we’re testing this. And if I go to my email, I can see now if I refresh that I got an email um with all the details, right? And this is how we managed to make these look nice and bold and actually even have a sort of an embedded link that we can just press here and it’ll take us to the sheet that we have. All right. So, now let’s test it from scratch with another invoice from zero. Let me go to my Google Drive. Let me delete this. Not delete this. Actually, I can just send a new one. In the new one, let’s do a random one here. Let me see what the name of the person is. Isabella Moore. And now, if I go here to edit end, I can run this. Now, what this will do is it will take the file that has been created. It will extract the text. It will then go here to the information extractor. It will add it to the Google sheet. It will then think through AI to make the email that will be sent to us on Gmail. and we’ll have everything there. If I go here, I can see that I have Isabella Moore with the email, with the address, with the description, with the total amount, with the invoice date, status, and payment method. If I go to my email as well, you can see that now I also have a notification. Dear billing team, we have received the invoice uh from Isabella Moore. And we have all the different things that we have here, Jenny with no edits and attribution, with no hey, this was sent by NLM. And now I also have a link right here, which takes me again to the Google sheet with all the information here. Hey, so in this video I’m going to build a human in the loop AI sales agent live in front of you that takes lead form submissions. It adds it to your CRM. It drops a sales email. It roots it to your team for feedback and automatically revises it until it’s ready to send. So today I’m going to build the entire system from scratch in and it end. I’m going to walk you through my whole thought process, the whole detours, the the mistakes I make and everything that I go through. So you get to see what an actual development process looks like when you’re building automations. So this is the automation we’re going to build. It’s built on NNN and it all starts with the lead form uh submission and this is typically what the the client or the lead whatever it is they actually fill out to start the automation. That’s the trigger. Then we add it to our CRM which is in Google Sheets. Then we talk to our sales agent which will draft an email, a sales email that will be sent to us first. So this is the human in the doop element. It will send it to us. We’ll revise it, give feedback. If the feedback is negative, it will send it to another AI agent to revise to make the feedback, make the changes based on what we told it. send it back and do the whole repetitive loop until it’s positive and once we approve the email, it will then send it to the customer. Okay, so let me show you exactly how it works from the start until the end. I’m going to execute the workflow which will run the automation once go here and now I’m going to start filling it up. So name company name will be JM solutions budget can be 1.5 project description we are looking to generate leads for our real estate business and in time it can be 1 to 3 weeks. When we press submit here, this will trigger the automation. So the form is itself, that’s what the customer will do. It will send it to the first agent to check against projects that we’ve done before to actually incorporate results and testimonials into the email. It will then send it to us. So the next step we have to do is go to our email, go to this email over here, action required, new lead budget of 1.15. Um, and this is what their internal team in the company is going to look at. They’re going to look at the email. They’re going to respond. So this is a place where you get to give feedback for the email. So hey, thanks for reaching out. your time in one to three weeks. You recently helped another client. So, see how it incorporates testimonials here. Then it says, “Are you available for a 15-minute call this week?” Okay, let me ask let me tell it. Don’t ask a question at the end. Just say or just ask a few times. No, just ask to provide a few times that work for them. next week, right? And this is the feedback that I’m going to give to the agent. I’m going to press submit. Go back here. You see how now it roots it to the denied path because we denied the actual email. We said, “Hey, make changes is not good.” It will now send it back to us. If we go here to my email, I will have another email here, which I can go through. I can respond. And as we can see, it changed the email based on the feedback that we gave it. So, please share a few times that work for you. So, I’m going to say, “Okay, looks good. and submit it. And now because it’s positive, it will send it to the actual customer uh or the lead. So I’m going to go here and now since I’m the lead itself, I’m going to get an email saying lead generation results for your real estate business and I get a whole customized email for me. Now that’s right there is the automation that we’re going to build step by step. And the application on this on a business side is that a lot of customers or a lot of companies they have a lot of forms on the websites but the whole process from when the lead fills out the form to when they are replied to and so on. It’s a very manual process for companies. What we’re doing here is not only saving that time for the company to be able to reply to those emails automatically, but actually making it custom and also incorporating our feedback into the whole process as well, right? And that’s exactly what we’re doing. All right, cool. So, I’m going to start from scratch and I’m going to go to another workflow personal and test builds. Create a workflow. Okay. And we’re going to start here. And before we get to the actual build and actually putting any steps into it, I usually like to map out the automation, what it looks like. It’s sort of like a plan that I have uh before I get to the actual build. So, it all starts with the form. So, the first um the first place is form. And I add a sticky note saying what kind of things we want on the form. In this case, it’s name, uh, email, was it, uh, income, no, budget, intent, timeline, and project description because that’s what we want in the email. Then on the form or after the form, we ideally want to make sure that we add it to the CRM. So, add responses to CRM. And the CRM can be Sheets, it can be ClickUp, it can be ASA, whatever you have, uh, or Hopspot. And then you can then after we add to the ser talk to the first agent. So first agent to write sales email. Then ideally we want to send it back. Send it to us for feedback and approval. And now it can go either two ways. If we approve it, it goes to send the email to the lead. If we don’t approve it using the feedback that we gave it, it will then send it back. So I could have two paths here. I could have what really red and green right that’s approve or deny. So if we approve it deny so once it’s approved again we will send it to the a to the customer. So the lead so in this case will be send email to lead and if it’s denied then we want to uh have second agent. So second revision agent right here which will then send it back to us for feedback, right? And that’s exactly what we want to build. So we start with form. So there’s a form that lead fills out with different variables right here or questions. Then we add the responses to our CRM. In this case, it’s Google Sheets. Then we add the first or we talk to the first agent to write the sales email. Then we send it to us for feedback and approval. And I forgot to add one more step here which is uh in this case it’s a intent agent. Okay, I’ll explain exactly what that is because we get feedback but how does the system know whether it’s positive feedback, whether it’s negative feedback, how does it know whether it’s accepted or denied? Right? Uh so this is intent. So feedback intent agent feedback intent agent. Okay. And now if it’s approved, it goes there. send the email to the lead and if it’s not approved, then we talk to our second agent which will write the email. Make this smaller. So, quick note here. Um, you don’t actually build automations and go straight to the platform and start building them. You always want to have a process to actually map things out. Map out what you want to build first and then go on and build it. It’s sort of like you’re building a castle on a foundation of sand. So, you always want to make sure you have that road map and that guide that you can then take when you’re building automations. All right, so let’s go to an end and actually build it. Um the first step of course because we have the form we have to create a form. Now thankfully we have NN which has an internal way of creating the forms. What I mean by this is that they have just an internal NN end form right here. Um so we can use this we go here and form and we can use the trigger. So the trigger just means what’s the first thing that starts the automation and in this case will be on a new and end form event. So if I press this button it’ll take me to this page uh where I have a few things to look at. The first thing is test URL versus production URL. And test URL just means that this URL will be used when we are filling out the form on test mode. So when we activate the automation right here, then only do we use the production URL. Okay. So test URL is what we’re using right now to test it. But production is when you’re activated. Authentication is when you want to add a password. So you want to add a password to this form. So let’s say I add a basic O uh name credential. I can create a credential. I can name it YouTube human in the loop agent. I’m definitely not going to remember what this is. Uh user will be user and then it’ll be 1 2 3 4 5. So let me show you exactly what this is. Um close. It’s fine. Uh no thanks. And now I can do new lead submission. I want to show you exactly what the basic off is. I can execute the step and see before we actually get to the form it asks us for a password. Well, why do we do this? It’s sort of like you’re putting a password on your phone. You don’t want everyone to have access to it. Uh you want only the people who have the password to have access to it. So in this case, if I put the password that I put before, 1 2 3 4 5 and sign in. Then I can obviously do the form and whatever I have right on there and I can submit. In this case, there’s no questions. Uh but that’s what I do and I get the output. Uh so that’s what basic off is. um form title. So let’s let me actually turn this off because I don’t want the the password. So this will just be free. Uh the title will be this. So this will be we can add this as we’ll get back to you as soon as possible. Now that we have the description and the title, we want to add the elements. So in this case, we spoke about having name, email, budget, intent, timeline, and per project description. So to add questions, we have to add a form element. So in this case, it can be full name. It will be text placeholder will be James Low. So this is the thing that you see before you actually fill it out to give you an idea of what you have to fill out there. Required yes will be required. Then we have let’s say email. So this will be email and email could be james.logmail.com. That’s what we have here. And we can also make this required. So the the user has to fill it out. Then we have another uh question here which can be company name. In this case, we didn’t add it here, but it can be a question. So, let me do it here. Company JM solutions, which is the company name that I have. And then we have budget. So, budget can be a not a text uh but it can be a drop down. So, dropown just means you have different options. So option one will be less I can just do this less than 1,000 add a field option. Option two will be 1,00 to 3,000 like this and then 3,000 to 5,000 and another fill option 5,000 plus. So in this case more than 5,000 that’s for budget and then we have um project description. So in this case wouldn’t be this be acquired project description which should be a text field. So you can just add we want a system that boom you can go up to the user required field and then we have timeline. So timeline again can be a drop down uh because you want to give them a few options. It can be within one week, one to three weeks and then we can do three weeks above. So one week to 3 weeks and then we can do 3 weeks plus. All right, cool. So uh the last thing we have to fill out is respond when. So this is saying when do we want to send the data? In this case, we want to send the data when the form is submitted. But there are cases where you want to send the data when the workflow finishes. So you start the form and does it only submit does it only send a confirmation of submission when the the actual workflow finishes when the automation finishes? In this case we don’t need this. Uh we just have form submitted. So whenever the user submits the form it starts the automation and we can now test it. So in this case as I mentioned we’re testing it. So we’re using the URL here. I can execute the step. I can now just fill out the form. So for company name budget it can be 3,000 project description we want more leads more leads and 1 to three weeks right if I go back here I can see that this is the output that I get so we trigger the form using the NNN and now we get this output so full name email company name and so on now we can use this variables so these are called dynamic variables because They are dynamic. They change every single time. Um, and then we can use them for for next steps. So, hormone is good. Took us a minute to put this together, but now we can add this to the CRM. So, the CRM will be a Google sheet. So, let me add the Google sheet here. We can do CRM intake YouTube in the loop agent. I have so many Google Sheets of these. So, I make I have to make sure that I know exactly which Google sheet is what. Um, so this can be full name. Uh I think we had company or email. Let me just quickly check. Have company name, full name, email, company name, budget, project description, and timeline. Uh God, how did I forget to read? Budget, project description, and timer. project description. Now we have timeline and make this bold. Let me make this here white. Like to make this pretty. Okay, cool. Uh, now that we made the CRM and typically we use Google Sheets because that’s the easiest, but um, a company probably wouldn’t have Google Sheets. They would have a HubSpot. they would have a notion or they would have a clickup where they store all the leads that come through. Um, but this is just for testing purposes. All right. So once we made the CRM, we can now connect it. So to connect the form to the uh Google Sheets, we just have to press plus. Look for Google Sheets right here. And now we want to append a row. Append just means add, right? So we want to append a row in a sheet. Uh connect your account. So you can connect your account by creating a new credential. In this case, you can sign in with Google. I’ll do it step by step. my email. Continue connection successful. So if I go back, I can see that the account was connected. I usually would recommend naming it um the email. So five and then the date which is 28th of August. Okay, cool. And you press save. So now the connection is done. Uh the resources sheet within document append row because that’s the action that we’re doing. There’s a bunch of stuff that we can do and we’re going to use I believe it’s get rose. Yeah, we’re going to use get rose later on. Now, it’s asking for the document. The document in this case is the CRM intake YouTube human in the loop. That’s a long name. Okay, they’re there. I know it’s that one cuz we named it. So, that’s good. And sheet one will be the sheet that we have to map. Again, sheet one is here. And now it’s asking us to put the values to send. So, in this case, we’re mapping each column manually because we are manually adding variables for each column. And we’re saying, hey, full name needs to go in column one, which is full name. Second column is email, company name, budget, restriction, and timeline. We do everything for for the different columns. So, full name, let me drag it across right here. Email, drag it across here. Company name here. Budget here. Project description here. Timeline. I forgot to add one more, which is date submitted. All right, cool. Um, I want the date submitted because I know I want to know exactly when they submitted the date or when they submitted the form. Uh, because that’s always good to know. I can just refresh here. And now it gives me the the column that I put. And now this is the variable. So submitted at which tells me the date. This gives me also the time and all that sort of stuff. So we’re going to drag this across. Submitted at. And now I wouldn’t want this like this. So I’m going to format this in a way where it’s actually readable for the company and they can actually understand. I mean cuz who’s going to understand this? You’re going to have to spend time even thinking about what this means. So, uh, to do it, I believe it’s format date. Uh, no, it’s not that. Okay. So, let’s see why it doesn’t work. Uh, let me see what I have. Suggested to date time. Okay. Okay. Okay. And then we have to format it right right here. Yeah. Format. And now it’s asking me to format it in the right way. In this case, you see the result. The way that this is set up, we just added the formula. www mm dd will result in this uh in this case I probably wouldn’t want it like that um let me just go to the formatting guide which will show me exactly the kind of formula that I need to add this looks crazy with the with the color that I have um in this case we want we can do this uh August 6 so let me do FF so if I do FF here it should yeah 28th of August 2025 at 620 20. That’s perfect. Uh now if I execute the step which will use the previous variables to actually add it to the sheet. If I go here I can see that the responses were added here. Okay. So gem solution this this and then we also have the date. Space this out and then that’s good. All right cool. So now that we have this we can go to our next step which is actually making the sales email. So in order for us to make the sales email we have to use a agent. Okay. There’s a few reasons why. Um, we typically would have like this is a agent workflow because we’re we’re also formatting the email and I’ll explain exactly what it means. But if you go to AI, you can either use an agent or you can just simply use an LLM. I typically use an agent because we’re doing different actions with the with the thing. Like we’re not just telling the agent write the email, but we’re also telling it, hey, formatted. And AI agents are usually very good at taking something and then doing something with it. Um, as in doing different actions. So, I’m going to press AI agent to connect this step to here. And now I’m going to rename this sales. So first sales agent, sales email agent rename. And now I have to connect this to three different things. Uh and I have to put a prompt inside which is the main thing. Um so here chat model will be openi to connect your openai here create a new credential. You have to go to platform theopenai.com sign up. to log in. I want to show you everything cuz I feel like this is one of the things that uh it’s like the small things that actually matter when you build automations. Dashboard, go to API keys, create an API key, name it whatever you want, right? Then you’ll have So, let’s actually do it. Human in the loop agent YouTube. Create a secret key. Don’t don’t worry about any of this. This is the API key. So, save this because you’re not going to be able to reaccess it unless you make a new one. Um, so we go back to NN API key. You paste it here. Then you save it and then it will automatically be connected. Okay. Close. All right. Cool. Then you want to connect it to 4.1 mini. That’s fine. And actually we have to go inside the agent first before we do the other ones. So let me go inside. And now we have to do a few things. Uh the first thing is source for prompt. So this is asking us what is that thing that’s going into the AI agent every single time. Uh in this case it would be the the details of the lead, right? Which will be the details of the form. Um which is why we have to change this. So this right here it says connect to chat trigger node. This means that usually when you have an AI agent you chat to it and then it does something. Uh which is why we’re using chat trigger node. But in this case we’re using a form. So we have to change this to define below. And now here we have to add the things that are going into the agent every single time. Uh so I can go here to expression go full screen and now I can add the lead details to the form. So in this case it can be here’s lead here’s the yeah here’s the new lead intake information then we can start adding it. A full name right here. Yeah. Drag it across. Email, company name, budget, project, description, timeline, and then I also want to add something else later on. Uh but email goes here, company name goes here, budget goes here, product description goes here, goes here. All right. So, uh the reason why and now this is basically changing every single time. So these variables will change as the form submissions change. Uh which is what we want because we want the sales email to be different every single time for every lead. Um but the reason we’re putting it in the user message is because in the user message we add the things that change. the system message which is what we find here system message. This is what we tell the AI agent what it needs to do right in general and the identity that it has. So if I go here I can now start adding the system message. I’m going to go here. There’s a prompt that we’re going to give the agent for it to think through what it needs to do and what it is. I’m going to copy the prompt from the other agent that I built before and paste it here. Uh and by the way you can either take a screenshot and put it through chat GBT and tell hey can you transcribe this or I’m going to show you after at the end how you can get the whole resource for free the whole blueprint. So don’t worry. Um but this basically is saying you are an expert salesperson for an agency that delivers a solutions. Your job is to respond to incoming leads by addressing their needs in a professional manner. You’ll receive an information that looks like a lead project encryption and timeline and your goal is to convince them and let them uh let them know that we are the best AI agency on the market. The project uh so the tools right so this is the typical structure that we have. We have overview we have the tools that are connected to the agent and we have the rules. Now, I’m going to explain to this I’m going to explain to you what it is. Something we forgot to add to the mirror right here when the first agent actually um is doing because we want the agent to be connected to the Google sheet with project results because we want to incorporate results to our email. So, we don’t want to say, “Hey, thanks for filling out the form. We can definitely help.” We want to say, “Hey, I saw that you did a lead generation. I saw that you’re looking for a lead generation project. We actually did a lead generation project for John a few months ago and we got this results. We can help you, right? So, it’s always good to incorporate proof into what you’re doing. Um, so we want to connect this to Google Sheets. We want to connect this as well to let’s leave it to Google sheet, right? So, in this case, uh, that’s why we see the projects. So this is the tool that’s Google Sheets in this case where it gets the different rows from our Google Sheets to then give to the AI agent uh for it to to actually use to make the email. We say use this tool to search to the previous project we’ve done that can be included in okay cool. So before so to actually make the tool we have to make the sheet because right here is the intake but then right here is the projects. So what we want here is a way for the agent to pull projects in or pull results that we’ve done before. So what I’m going to do is I’m going to copy the um the results that I had before. And bear in mind this is something that the company can start adding every single time after after a minute. It the agent will always be automatically uh updating as in it will take all the roles that are here. So if you keep adding that’s fine. It will keep on on taking whatever’s here. Um and again these are the projects that are going to be included when the agent needs to refer to let’s say someone said lead genen it will use this example for result in legen project. Same thing with general tech on boarding content and whatever it is. So actually now that I start to think about it, we forgot to add the intent. Um okay, which is drop down lead generation. Then we have content creation. And this is something that happens, right? You just think through, you just forget. Um that’s why I want to show you the raw version of me building automations because that’s what actually drives value to people. Uh on boarding automation uh let’s do general uh general automation support. All right. So um yeah this is need definitely needed when we have to give to the agent for it to pull information from the Google sheet. Um so let’s rerun this. Let me actually update this. Let me go here. Let me do tent actually. Let me So we have to shift this and then put here. Let me run this first. Let me just fast forward to me filling it up. All right. So I submitted the form. Now we have this data to to work with. We can pin it, right? Pinning it just means that we don’t have to rerun the form every single time to execute the next um nodes. The automation we can use this as test data for previous for the next steps. And now we want to add this to I refresh this. Okay. This is good. Uh intent will be going here. Okay, cool. So now we also want to give it the intent. So let me go here. Let me say intent submission. We can put the intent here. All right, cool. Now we want to go here. And now because we are able to give the intent to the the agent. Now I can use the projects, right? Because the intent is what’s linked to here to the projects. Perfect. Um okay. So let’s go here. We also give it some rules. So keep the email concise and professional under 100 words. This comes from reactive prompting rather than active prompting which just means that we prompt as we get errors. We prompt as we iterate as feedback as we get feedback and feedback only comes from actually using the automation actually running it. Um we give it a few objectives. Retrieve information about the project with the lead to prove that the team is capable. Okay. So this is this is the part where we tell it to use previous projects results to give in the email. Always write the email in HTML. Um because Gmail to make it look pretty. So to make it look like this with new lines, this is called new line. One and two spaces between lines, we use something called HTML tags. So break. So this right here, BR really stands for break, right? And that’s why we add one, that will just do a new line. If we add two, that will be two new lines. One, two. Okay, so this is very important. Um, and then don’t add any emojis in email. Yeah, don’t lie. Definitely don’t add emojis because in the sales emails, emojis are the worst thing you can add. Um, perfect. Uh we’re going to use this later on but don’t worry about it now. Uh now we can connect this to the Google Sheets. So go Google sheets sheets tool connection. We did all this we already did. The resource will be um yeah the resource will be sheet within document and we can get rows. So we want to get the rows when I get these and we’re going to let the AI actually think through which result which project it needs to use to then make the sales email. So the document will be CRM YouTube human in the loop agent. The sheet will be projects and I’m going to leave this empty. So execute step. And now see how it got the three different uh four different rows. Den responses onboarding or content onboarding and general tech. Right? And now that’s what’s going to use to actually make the email to incorporate the results into the email. All right. Cool. So now that we did this, we can now um I want to show you exactly why we have to add something else to the agent because it’s a bit more technical. Um but it’s actually very very easy to understand once you see why we need it in the first place. So I’m going to run this. I’m going to show you exactly what we need this for this agent right here. What it did is that it just wrote the email. Okay. So dear Mikuel, we specialize in custom driven lead generation systems and understanding. Okay. The only problem with this is that we don’t get the subject line and we don’t get the body of the email in two different yeah in two different uh variables. So if I paste this all into Gmail, there will be no subject line. So for us to be able to make an email that has a subject line and an email body, we need it to be in a very specific format, right? That’s why we press we toggle this on which is require specific output format because you want the subject line and the email to be in two different variables. So once this is turned on, we have a new option here which is output parser. We can just press this structured output parser and don’t worry um I’m going to copy what I had before but when you get the blueprint you can u you can directly have it but what I’m basically saying is let me just copy this that I want the first property. So the first variable here is subject line which is the subject line of the email and then the email body which is the body of the email and then the required is subject line and the email body. So we want the actual output format to be in a subject line and the body of the email. So let me show you the difference now when I run this. Okay, let’s see why there’s an error. All right, so after some error handling uh I realized that the code here was wrong. I actually just pasted the right one. Um so in this case again it was just a few tweaks. subject is subject line and then we have email body required. Again, if you have the the whole setup, you can just have it here. I don’t worry, but you want to make sure that this is right. And by the way, if you ask me, how did I get this code? You can simply go to chat GBT and you can say, hey, I’m feeding the AI or feeding the code parser and email with a subject line and the body together. I want to output it as two different variables. One is subject, one is email body. And it will give you this code right here. So, you can see here we have a subject line and we have an email body. Okay. So now we can go to the next step. The next step is actually setting this. So setting the edit fields set. Why do we do this is because ideally when we go to the next step which is human in the loop agent which is what you’re here for is we get the feedback and then we get the intent of the feedback. If it’s positive we send it to the customer. If it’s negative then we reroot it back. But the only problem is is that we want to routt the same variable back to the agent or back to the human in the loop agent. So it’s better if I show you rather than tell you uh because it makes much more sense. But in this case let’s just set two variables which is subject I’m going to press here which in this case is JSON output subject and email body right which is email body. Okay so these are the two different variables. Uh and now when we route it back to the agent that actually has to do the revision we loop it back here. Okay, we’re looping back here for it to use this variables to um to reroot it back. Okay, so now that we have the variables set, we can then go to the human in the loop element. So human in the loop will be um human in the loop right here. And you can see we don’t have only email, we have Google chat, we have outlook, we have different software. In this case, we are using Gmail. So we can go here to connect your Gmail to NN. We have to go here, sign in with Google. It’ll take you through the same thing that we went through before. Message, send, and waiting for response. That’s that’s the thing that is human in the loop. The email is who are we sending the email to for it to give us feedback. In this case, we can put my email. If I go here uh on the email, I think we added action required new lead with budget. Okay, so we put the budget here and then here we put hey we have a new lead created. Okay, project description and then email drafted. Okay, cool. So here subject line will be this new lead with budget of and this variable will be changed because that’s the thing that changes every single time. Add fields. No, it’s actually form submissions. I can go to budget right here. So, it will change and then the message like I mentioned before is, “Hey, Mikuel, we have a nude lead form submission. Please revise the email and give feedback on the copy.” So, in this case, we can just add two. So, this just it’s just two headings. heading to we can do project description so the internal team knows has a context to what we’re giving feedback on project will be here and now we can add the email so subject I would add a subject line subject actually I do email uh I think this would work with markdown this is markdown format um subject line will be used which is this. Then we have email body is this. Let’s test this. Uh let’s see if it works, how it works, uh when it works, why it works. So waiting for input. Um okay, cool. So now we go here. Can see. Okay, so this didn’t work. We we have to take this off. Um but I can go here. I can see that we got the email. So that’s all good. Okay, perfect. Um, okay. I also realized just now that so let me just give you feedback like I can approve. Perfect. Um I realized that this so email doesn’t as I mentioned before email needs HTML not um it needs HTML not markdown format. This is markdown in order to put HTML. So in order to put heading two on HTML we have to use this uh here and then to close it we have to use this slash forward slash and then same thing with this and we can just remove this I don’t think we need it no body yeah that’s fine okay um okay put and then we can add please provide feedback on the email if you have actually no preview if you have perfect now as you can see when I went to the email it actually just asked me to approve but in this case we want to leave space for feedback so in this case we want to add free text so what this means is that when he sends us the email to revise we don’t just press approve we can also press approve and deny right but we want to add uh text we want to add feedback so we can say hey change this change that and then it will then send it to the agent to revise it and then change it, right? Um because free text is what we need. I want to take off appendn attribution which is just this automated ven saying hey n I did this. Um so we can do this. We can execute the step again. And now if I get the email I can see that it says respond and the response now I can give feedback. Okay. I can say, “Hey, uh, this needs to be more concise and professional.” Submit. And now that’s the feedback that’s going to come through. Say, “Hey, this needs to be concise and professional.” So, ideally, we want to then talk to the other agent, give it the email that we dropped right now, give it the feedback, and then let it revise and then do the whole thing again and make it a repetitive loop. Okay. So, now that we have the feedback, as I mentioned on the Miro before, we want to send it to the feedback intent agent. So, so first let’s rename this to human in the loop rename. Uh, and then now I can send it to the text classifier cuz the text classifier on NN basically takes text and classifies basically says hey based on the text this is what it is based on the options that we give it the categories right. Um, okay. So text classify would be the this right here will be the text to classify which would be the the feedback that we give it and then it’ll be two categories. One is approved and one is denied. Right? So approve and then let me just copy the description from the agent that I built before. We go here. I say the sales agent approved the email accepted the way it was written. The text that we’re classifying intense that it was accepted and that everything was uh good. example output. Yes, that’s fine. Looks good. Send it through. Now, this came from actually testing because how does it the text specifier isn’t always 100% correct, right? Sometimes we give it something we say, “Hey, can you change this part?” But it assumes that we accepted it. So, it sends it to the lead. Uh we want to make sure that we give it examples of what someone might say as a way for them to reference whether it’s accepted or denied. Um so, that’s why we add the examples. And then category will be denied which will be the uh right here expression. Let me go here. Here the sales agent denied the email and denied the way it was written. Uh the text that we’re classifying intends that it needs updating or changing. Usually usually um we predate feedback on how to do so. And then we give it a few examples. So make it shorter. I don’t like it. It’s too long. Include other projects and no. So these are various things that you would um ask the agent or you would tell the agent and then we’ve tell it hey based on these sort of examples this is the denied path. Now okay this is good. Um so now as you can see we now have two different paths. So now we can go to the side where we send the email to the lead and then the denied path where we have to make the agent to revise. Uh but before we do that we have to add a model because this thing’s through an AI. So the model here will be uh open AI chat model. Again we already connected it. So 4.1 is fine. And now that we categorized the different types of responses based on what’s approved and what’s denied, we can now send it two different ways. So let’s do the easy one first which is approved. In this case, we just um use a Gmail node to send it to the customer. So create send a message. Yeah, send a message. Um you already connected a message send to in this case we have to execute previous nodes. Uh okay, let me just add test email. subject line will be hello. Let me just change this real quick later. Uh let me just run this. Okay, pin this. And then now I believe that we have okay, we don’t have data here. So let me just run this again and go here to my email. Make this shorter. Now this right here I can pin. And now I can use this. Okay. So I can use this to say for it to classify whether it’s denied or approved. So as you can see it went down the denied path because we said make it short. We give it feedback. Um okay. So now right here I can then pull information from the form which will be email which will be subject line will be in this one right here. Subject line. actually need to remove hello first and then the body of the email which in this case again it’s HTML. We can also put text but we’re using HTML um for this for the actual message. Okay. So now if I test this. Okay. I actually didn’t get it for some reason. I didn’t get any email. Let me try again to see if it works this time. Okay. I think it’s because it didn’t go down this path but or it’s because these are pinned. Let me just unpin this. do each one individually. By the way, I’m just pressing P when I hover over this. I can try rerun this. Okay, let’s just go through the whole phase. Um, right here and go here. I can get an email and say yes. Looks good. Submit. Go back. And now because it’s approved, it will go down this path. Okay, cool. That’s why uh because the text that we give it before was the denied path. So, we go here. Um and then say boost your lead generation one week. We’re specialized in developing lead generation tailored systems for business. For instance, we recently helped a real estate firm generate 20 leads. Do you see how it pulls in these sort of projects? We recently helped a firm generate 20 leads in 5 days after working with us which generated 100k pipeline. That’s what it uses to uh in the email, right? To generate sort of authority and trust. Uh given your timeline and budget, we’re confident we can deliver. Okay, best regards. And now this right here I don’t want. Okay, so this is where we go here to the email node and add options. We can then uh append we can turn this off. Okay, append and end attribution. Turn this off so that we don’t need um we don’t have the sponsorship which is right here. Okay, so name this to send so lead email and that’s the first path for approved. So the next step is the denied path. So in this case we get the feedback and we give it to another agent to revise it. Okay, so I’m going to press add AI agent. In this case, we can name it revision agent. We don’t need to connect it to a chat node. I mean, we don’t have it connected. So, we just have to define it below. And the thing that we give it is, let me go expression is the feedback and the email, right? So, it knows that both of them. So, in this case, it will be feedback received, which will be this one here. and the email body which will be this one here right and sub. So we give it okay uh and now we want to give it a system message because we want to give it an identity in the whole thing that we give it before the only thing that changes now is the fact that now it needs to revise but it still sends it still does the actual email. I’m just going to copy and paste the prompt that I wrote before uh so we don’t have to waste time actually writing it. And I have you are helpful intelligent email assistant who needs to update a sales email based on the provided feedback. I’m going to add overview which I forgot to add. The tools is the same. The rules are the same and final notes are the same. Um okay, cool. And uh we still have to turn this on because we still need it to be in a very specific format. In this case, it’s subject line and email. Again, the only thing that changes is that this makes a revision, but the output is still the same, which is an email. So I’m going to put this require specific format. And now I have to connect these to a chat model to a tool and help you parse it. The good thing about N&N is that you don’t have to connect it again uh to this to to a different thing. We can use the previous chat model the previous tool and the previous operate parser. Okay, so they’re connected to the same thing. So this goes here, it uses these, then goes here if it needs to go here and it uses it again. So you don’t have to redo it. And I can press save. And now let’s test it. So let me go here. Let me use the feedback that we got from here. Let me go here. Hey, Mikuel, we specialize in customized lead generation systems. We recently helped. I told it to be more concise. I think that’s what Yeah, more concise and professional. Do a quality so we can see. Yeah, I think this more concise. Definitely more concise. I don’t know about professional. Um, but that’s fine. And now to make sure that we can send it back to the human in the loop to make sure that it’s a whole repetitive process, we have to pin this across and put it in the edit fields. Okay, so this is where it all links together because we want it to be a repetitive loop. So we want to make the email for the first agent which only writes the first email, then send it to the human in the loop to make sure that we revise. If it’s bad, it will revise it. Send it back again. If it’s bad again, it will revise it until we accept it. Okay? So it’s a whole repetitive process. So there’s no human, the only human in the loop is us actually approving it or denying it. Uh but the automation is smart enough so that we can loop it back. And the reason why we’re using this node right here which I explained before is because the output here subject and email body is the same type of variables that we get here subject email body. Okay. So this basically gets the input from here and from here and they’re all the same. The only thing that changes is the actual content right but the variable name the key this is called the key is the same. So that’s how we use that. Um okay so let me unpin this and we can run this from the start until the end. Save. Unpin this as well. Save. And now I can execute workflow. It’s going to be here. And I can start filling out the form. James Michael. Now obviously this should be above um we can change it later in in the form. But that’s the whole formula there. Submit. And now this starts the automation. Okay. So it sends it to our CRM. So if you go here to uh that was the old one to here she won James Michael Corp budget authority uh budget description timeline intent and date submitted it will now send it to us for revision action required let’s say we look at this and we say respond we say you need to ask them at the to give you a few times that work for them next week for a call. Okay, so in this case, it should send it to the denied because we gave a feedback. So see how it goes here. It will use the AI and we use this tools as well. Send it back another email. So could you please provide a few times that work for you next week? Let me say make this a bit longer. So now when I submit it, it then goes back to the same thing. You see how it’s a whole repetitive loop? It goes through every single time. Um, and that’s why it’s it’s a great system to have because it doesn’t really end until you accept it. I go here again. I can respond and say yes. All good. Press submit. And now because it’s approved, it then goes here. Okay. And we get the email which is this. So let’s discuss your AI driven automation. It made it a bit longer like we asked it to. It also made the question here. Um, and it added the case study right here. Okay. So, that right there is I mean one step ahead that we can do is actually make only the first name, not the full name. So, let’s just do that right now. Let me go here. Um, yeah, let me actually just put first name. I think that would work in some Yeah, I could do first name. And I think this needs to be split. I think it needs to be a space. Yeah. And then I can first get the first. Yeah. So this gets James. So a full name is like this, right? And this is always good to know because when you’re building automations, you want to have these sort of formulas uh at hand. So full name is first name space last name. So we’re saying is split this by the space. So it will be one and two and I want the first that comes here. So split by the space space here and then I want the first. If I said last it will get the last name. So let me say last it will get Michael right? James Michael. I mean in this case it would because the full name is James Michael it will get Michael. And if you’re enjoying this Enit course, then you might want to check out our AI automation circle, which is a school community for people who looking to learn AI automations from zero, either to apply in their own business or to start the AI agency to provide services to clients. We have people introducing themselves every single day, asking questions, sharing wins, getting technical support, and also looking for jobs and partnerships. We also have a classroom full of courses, which is the AI automations 101 course, an extension to this course. the templates vault, which is all the resources from our YouTube channel in case you want to work with us oneonone to start and scale your agency. We have all the weekly recordings from every single call that we do, plus over $20,000 in discount codes. We also have two calls a week for weekly huddles to answer any questions and also VIP coding sessions. We actually build systems from scratch. The only catch is not everyone gets in, so feel free to apply and make sure you put some thoughts into your answers. With that being said, let’s get back to the course. I built an AI agent on Nitn that reads my contacts, manages my emails and my calendar, and even writes my blog post. And honestly, it still blows my mind. So, in today’s video, I’m going to show you exactly how I did it. All right, so let me show you exactly how it works. We have the agent pulled up here. And then we also have Telegram, which is exactly how I get to talk to the agent. Let me just say, can you send an email to James Low, uh, telling him that we have dinner tomorrow at 7 p.m. in Rome, and also, can you put that on the calendar to make sure that we have it there for 7:00 p.m. and send an invite to him and, uh, yeah, let me know when it’s done. So, right now, the agent had a task assigned to him. It’s going out and finding the different agents that I need to talk to in order to fulfill the task. It’s using both the email agent and the calendar agent. As you can see, the email is done. The calendar is done. And I get a text saying that the email to James Low about dinner tomorrow at 7 p.m. in Rome has been sent. And the calendar event for dinner has also been created. So if I go to my email right here, I should expect an email saying we have dinner tomorrow at 7:00 p.m. in Rome, which is fine. Calendar, I can see that we have dinner in Rome, which is scheduled for 7:00 to 8:00 p.m. And I never told it to do 1 hour, but it was smart enough to understand that for dinner, uh, 1 hour was fine, which is great. And then it sent an invitation to $100 million peanuts, which is the email that I have unlisted under James Low right here. The real ones know what this is and it was scheduled automatically for me and the email was sent. All right, cool. So now you got to see what the AI agent does. Let’s go to mirror right here. So I drew up this diagram which shows exactly the fundamentals or the way that this multi-step AI agent works. Now we still have an input and we have an output. Sorry for that. Uh the input is essentially what I told it. So hey, can you do XYZ for me? Can you schedule an email? Hey, you schedule um can you put something on the calendar? Right, this is an instruction that we tell the AI agent to start with. That’s the input. Uh and the output is hey yeah everything was good. So after we give it the input that goes onto the multi-step AI agent. Now think of this as a CEO of the company. CEO of the AI agents. It has system prompts and instructions. So what these are are instructions that say hey you are a helpful intelligent assistant, right? The typical prompt that you put on for an AI agent. And we also say here are the tools that you have access to. Here are the agents that you have access to. If this happens, if you asked to send an email, then choose this agent. If you’re asked to do the calendar, then choose that agent. Right? So, fundamentally, this multi-step AI agent thinks with its brain, which is the LLM, and also has a memory, which means it remembers the previous conversations that you had or the previous questions that you asked. And on a high level, the multi-step AI agent gets an input, which means it gets a a request, right? And then chooses which agent to talk to. So, think of these as head of departments. So the CEO has different head of departments in their company. So it gets a request and it chooses hey based on what I was told let’s say we do a schedule calendar event for tomorrow for dinner which is exactly what I did. Then it would go out and talk to the head of calendar so calendar agent. It sends a request saying, “Hey, I got a request saying that we want to schedule a dinner for tomorrow 7 p.m.” And then that calendar agent talks tools which are the employees which actually do the thing which actually schedule the event create the event through a request and then they get a response which is yeah it was successful and the response back to here saying hey everything was good and obviously these head of departments think with the brain which is the LLM in this case but let’s say we asked it to send a calendar event or even send an email in this case because we have a contact department we because we have a contact agent the first it has to that we instructed to is hey if we’re told or if you’re told to schedule a calendar event or schedule an email the first step you have to do is actually find the contact of the person that we’re talking about because I’m just saying the name and then you can do the other things so for the example that I gave you for the calendar you have the input which is calendar multi-step AI agent first step is contact agent so to get the contacts that it needs through a request in a response right talking the tools as well which is the employees which gives the contacts and find the contacts then it goes here then it says Okay, what do I have to do first? In this case, calendar agent. So, we schedule the calendar. So, head of department goes to the employee saying, “Hey guys, can you do it?” Yes, it’s done. Sends a response. Everything was good. And then talks to the email agent, which is head of email in this case for the company. Then from the email agent, it assigns it to his employees, which are tools, through a request. So, it sends a request like, “Hey guys, can you do this?” Then sends a response, which is, “Yeah, everything was good.” And then once everything is executed based on what we told it to do, it then gives me the output saying, “Hey, everything was good.” And so on. And we also have a blog agent which in this case wasn’t used but this agent is just used when we tell it to write a blog right and then it goes out to the head of content per se and then head of content assigns it to his employees which are tools through a request and then we get a response right and that’s a whole repetitive loop that happens every single time but this is non-deterministic so what does nondeterministic mean it means that the input can result in different outputs so I can say hey send an email and it will send an email but I can also say send a blog and it will send a blog so it the one input could result in mult multiple different outputs. That’s what nondeterministic means. It’s not determined, right? Uh so that’s what it is. So the first step to this AI agent is the trigger. So the trigger is the first thing that actually starts the automation, starts the the AI agent because there’s a way that there’s a systematic way that we actually talk to the AI agent. It’s like you’re talking to an employee. There has to be an input, right? And this is the input right here. Uh, so if I go on here, which you can find by the way when you go to Telegram, go here, and then you go down to triggers, which is essentially, I don’t know if you guys can see it, but all message right here. So, this is the one we’re going to use to then trigger. So, it says, hey, whenever a message comes, so trigger on message. Whenever a message comes, can you please just um allow it to or can you please just trigger the automation? Can you start the automation? And to connect to your telegram, all you have to do is press here on credential to connect with. This is my account. You can create new credentials. And then to actually connect this, so let me press this here, which talks to the agent from N&N, which gives you like a step-by-step instructions. Uh there’s a process to it. You have to talk to an agent called the botfather, which is Yeah. So create a Telegram account, start a chat with the botfather. So you have to use this link right here. And then you can uh you have to give it a slash something. You have to start a conversation with Yeah. /neubot. And then you can get your API key or your access token which it gives you which then allows you to connect it to your account. So once you connect it to your account, you want to just put trigger on message which allows you to be able to trigger the the actual workflow on the message that you sent it. So let’s say I trigger this. So I go here and I just I can write a text like hey how are you? I can then go inside and see that we got a text saying hey how are you right and this is a text. Now we use a switch node after this because a switch node allows us to differentiate whether the text or whether the message was in audio whether it’s a text because if it’s an audio we have to get the file which because the audio itself turns into a file and then give it to AI to say hey we have an audio can you just turn that into text so we can use it okay because the input here has to be text either way whether it’s an audio whether it’s just text so we want to make sure that we get text in the AI agent in the CEO uh all the time so switch here go inside and then We want to make sure we’re choosing basically a field that only happens whenever we send the audio. So what I mean by that is let’s say we send a text. In this case, this is all the fields that we get, right? Which is this message text. So we know it’s a text because this says text because chat says text. But let’s say I did a voice message. So let me go here and let me rerun it and let me say hello, this is me. Hello. Hello. I can then go here. I can see that it triggered. We can see here that it’s voice. So when we go back here, we’re basically saying, hey, set of rules. There’s two different rules. If it’s an audio, so we know it’s an audio because we know that this variable exists, mime type, and we know it’s a text when text exist, which we had before. So we’re spinning in two different ways. And we’re using again two different variables. The ones here, right? This looks like code, but it actually is just me drag and dropping this one here. Boom. Like this, right? And you will get it there. Uh and then we are spinning into different ways. So if it’s an audio, it goes here. If it’s a text, it will go here and then we’ll send this. So, this right here is just the text of the message and it will send it both ways to the AI agent. So, it’ll route it back and then bring it back to the same place. So, the AI agent always gets text. There’s a few things we have to set up for the main AI agent. The first one is source for prompt which is a user message. Now, the simplest way possible, this is asking us basically what is a thing that you want to feed in to the AI agent. So, there’s two options. The first one is connect uh connected chat notes. Let me zoom in. connected track nodes which is basically saying do you want to connect it to the chat node of nitn which is because nitn has a native chat node so we say no we’re using telegram so we just want to define it below so we’re defining it ourselves and below which in this case is just json text which is the text that we get from telegram whether it’s a voice whether it’s a text we always give it the same thing and then we require specific output format no it doesn’t require any specific output format because it changes and then enable fallback method this says hey since it’s using an AI to actually think. Uh it says if the AI doesn’t work, do you want to set another fallback method? So it uses another AI. Well, in this case, we don’t need to. So we can just leave it there. And now for the most important part of the agent is the system message. So this is the instruction. So let me press this button right here, which basically puts it full screen. And this is the general structure that you would give an AI agent for it to actually work because a prompt is the most important thing. Without a prompting, without you giving instructions to someone, how are they meant to know what to do, right? So we say we give it an overview. So you are the ultimate personal assistant. Your job is to send the users query to the correct tool and these are the different tools. So I state first tool and then second tool and then third tool and then content agent. So this is another tool and then we give it some rules instructions and then final reminder here’s the current date and time. So we always give it the date and time because AI isn’t the best at um at guessing what date of time it is. U I tried running it before I said run a make an event for tomorrow and it made an event for I think 6 months ago. So not the best. Uh and the structure is overall mainly the same. We have the overview which is some context. They have tools. So for the tools itself we have contact agents. So we say use this tool to take uh contact actions. You must use this before sending emails or creating calendar events within attendees. So this is where we go into prompting right which I don’t want to get too deep in but we’re basically saying hey before you use something else use this. So let’s say we say hey can you send an email to James? How does it know James email? Right? So we’re basically saying we’re prompting it saying hey before you send an email before you create a calendar event just go out to the contact database and find the contacts which in this case is in a Google sheet. So that’s what we tell it to do. And then we have the email agent which is use this tool to take action in email. That’s simple. Then we have calendar agent which is basically saying use this tool to take action in the calendar. I also reiterated. So I said hey you must use a contact um agent before using the calendar agent and make sure you pass through the email of the contact to the calendar agent. Now, this only comes from actually testing the agent and making sure that it works. Because sometimes what it was giving me, it was, you know, when I say send the invite to the actual person, it was sending me just the name. So, I said, “Hey, no, that can’t happen. Just send me the email cuz that’s the email is the only thing that we can actually use to send the invite.” Then we have content agents. So, use this tool to generate a blog and return the full text. And then we have rules here. And the rules are basically going towards telling the AI agent some rules that it needs to do. And this is a difference between proactive and reactive prompting. Because reactive prompting is essentially the uh the act of iterating. So it means changing the prompt over time as you’re testing the agent. So you’re testing the agent. You see that the email agent doesn’t work for this reason. You add a rule saying, “Hey, if this works, uh do this.” But you wouldn’t know it didn’t work if you didn’t actually test it. So you always want to do reactive prompting. Test the agent and then add the rules. Uh that’s what you want to do. And then some instructions and then final reminder again. All right, cool. So this is the prompt that we want to use and this is the one that is going to use to then decide which AI agent it’s then going to offload the task to. Now the main AI agent is connected to a chat model. So this is the brain the LLM that I was talking about which in this case we use chat GBT41 mini to connect your OpenAI. You just have to go here create a new credential and then you have to go to the actual platform to openai. So you go here platform.opai.com you log in. So you have to log in and then you have to go to dashboard I believe API keys on the left hand side go here to create a new API key name it so hello test YouTube 19th of August leave this as you project is default and then permissions is all it’s fine create a secret key and then copy this bring it back to N&N and this is the one you’re going to put here so API key let’s do YouTube August 19th You don’t need this uh base URL is fine. All you have to do is just press save and you will see this green check mark here which means that connection was tested successfully. And bear in mind that you need to add credits to OpenAI for it to actually work. Um and I think $5 should do. It’s enough. Uh it’s exactly what I put I think 4 months ago and now it’s still going. Uh so it’s very very cheap. Now the model itself 4.1 mini is actually very very good. Uh some models don’t work for this AI agent like two to actually run the AI agent. For example 40 would not work. Uh so leave this as 4.1 mini which is very fast. Then we have think which is a new node that was added recently which is just used to add that extra person to think. So it does everything and then it consults. It’s like a consultant. It consults with the AI agent saying hey I did all of this. Am I doing it right or is this something that I’m getting wrong? It will think through it and then it will tell if something needs to change. And then simple memories. If I go in here I can see that we have a session ID which will just be the chat ID that we have with the agent. Then we have context window length. This just means how many text messages do you want the AI to actually remember when it gives you the output. Uh because let’s say I say, “Hey, can you send an email to James?” Then it goes out and send the email to James and says, “Hey, we’re done.” And then you say, “Can you actually schedule the calendar event with him as well?” Now, it needs to remember who James was, right? That we actually said James for it to actually do the thing. So, this is basically saying if you put five, it will just say, “Hey, remember the five past conversations that we had with you.” So, that’s what it means. And then here is where the real sauce begins because we have the contact agent, the email agent, calendar agent, the content creation agent. All right. So the first tool here, the first agent that is hooked up with is the contact agent. Uh now this right here again is the head of contacts. What it will do is it will call this tool to take action within the contact database. So we add a description which is what it is and then we say the prompt. So the prompt is what do we tell the agent to do in this case we can define it automatically by the model and then we give it a system message which is exactly what we give it in the main model overview which is you are a contact manager you have tools to take action within the contact database uh the different tools you have is get contacts you use this tool to get contact information like address or phone number and then add or update a contact use this to add a new contact to database or update an existing contact so that’s exactly what it does those instructions allow it to think about what it has to do and choose which tool it needs to send the information to and we also also have a model which is the brain. So in this case the LLM which is also hooked up to the main agent the same. So in case we’re using 41 mini like I mentioned before then we have the tools we have get contact and then we have add or update contacts uh like you saw here in the system message. So if I go here to the first tool we can see that get contacts is hooked up to Google sheets. So the first step you have to do is go here create a new credential and all you have to do is sign in with Google. You can press this button right here which will take you through the main page uh right here with Google which will basically allow you to connect to any account that you want and then you can bring it back. It’s as easy as that. You can bring it back and we’re already connected. So that’s fine. Yes, delete. And then you want to set this automatically because we’re allowing AI to actually set the tool description. Uh so what it actually needs to do and then the resource will be the sheet within the document because there’s a sheet that we’re using which is a context which is this one right here which all the context in this case will be more but these are the ones that we have now. And then we have get rows because that’s the action that we have to do in this case we’re getting contacts from the list. So which sheet are you using? Which uh sorry which document are you using? So which yeah which main sheet are using. So in this case will be contact database USB. And what sheet within the sheet are we using so in this case will be sheet one. And then you want to leave this blank because we want to let the AI figure it out. Now let’s test this. Let me show you exactly what this uh just what this step does. Let me go to Telegram. Let me execute the workflow and say so this case we have James Low. say, “Hey, can you quickly get me James Lowe’s email?” So through text, it will then talk to the main agent. It will think, hey, what agent do I need to use in order for me to do that task. It will think and then it will send it here and then this will then send it here, bring it back, and then give me the output. And it will say, hey, James Lo’s email address is $100 million peanuts. Uh, is there anything else you want me to do? So this right here, just use the agent. So you use this tool right here to do this specific task. So it will think through which agent it will send it to. It will then send it here and then based on what it’s told it will then think through exactly which tool. So which employee is it going to offload the task to in this case the employee will be the get contacts. And the same thing is update a contact. So right here we can update the contact here. Uh we’re going to do the same connection set automatically. Uh this is all the same. The only thing you want to change is you want to map the column mode uh manually because you’re manually mapping each column. And then it says based on because when we tell it can you update or can you change something it needs to know what it needs to change. Sorry we want to match the name to the name in the sheet to make sure that it knows exactly which one is updating and then it’s updating the name which is defined automatically by the model the email or the phone number right based on what it needs to update and I give it a description as well. So this is the name of the person the email and the phone number and leave everything else the same. So these two are called upon when it needs to do the specific task. Now let’s get on to the email agent which is again the same thing same same sort of setup. We have the description so call this tool to take action in email. Uh prompt which would be defined by the model. Then we have system message. So you’re an email assistant. You have tools to take action in email. And then we have different tools. So send get draft uh create a reply create a draft and then get labels uh actually label them. And then we have rules and then final reminder. Uh in this case for the different tools we tell it we give it a small instruction. So in this case, you have to use this to send an email. You use this to get emails. And we give it different rules and different logic. And this all comes from actually testing and making sure that we know exactly what hasn’t worked based on our test. And then what can we add to the prompt to make sure that it works every single time. Uh so that’s what we want there. And this is basically it. So all the same for the different agents. And then it’s hooked up to the opening brain, which again is the same for every single agent. And then it’s hooked up to six different tools. Send email, get emails, email reply, create a draft, get labels, and label emails. So in this case, it’s go to send emails. This will be the one tool that will be used that will be called upon when it needs to send an email. So if I go to credentials right here, all you have to do to connect your Gmail to NN is go to create a new credential. And just as we did for the Google sheet, we just have to sign in with Google. It will take you through this page right here. You can just choose which account you want to use. And that’s the one that will be brought back here and it will be connected automatically. Press delete. Let me go here. So leave this set automatically. The resource will be message because that’s the thing that we’re actually doing. The operation is basically what action are we taking. So we want to send in this case. And it’s asking us who do we send the email to? What’s the subject line? So email type, which is essentially either HTML or text. In this case, we just want to leave it to HTML because if we want to send a blog over email, then we wanted to have headers and all that sort of stuff. And the only way to have headers is to use HTML instead of text. And then it’s asking us what message. So what’s the body of the email? So in this case, we’re allowing the model to actually think through exactly and define who are we sending the email to. So based on so let’s say I say, hey, send the email to James. It will first of all get the contact, find the email and then it’s smart enough to actually think about um what email do we put here? In this case will be the email of the contact that we just mentioned. Subject line is the same. So we’ll think through the context that we give it. In this case, let’s say we we set it to write an email about going out for dinner. The subject line will be created based on that context. And the same thing with message. So let me test this one right here so you get a feel of sort of what it does just on this uh this right here. Let me execute workflow. Let me pull up Telegram. and we can say hey can you send an email to him. So in this case we’re actually testing the memory itself um saying uh you are fired. There you go. So let me execute the workflow. So it will think through what it needs to do. It will then know that it needs to use his email agent to send the email bring it back to telegram. So if I go to my email here, I can see that I sent an email to $100 million peanuts saying you are fired and the subject line was already chosen by the model. So that’s exactly what it does. So based on what it was instructed to do, it will choose which tool it will use. This setup is very much the same as the other tools. So if we go to get many, the connection is the same, set automatically, message the same. In this case, you want to change this from send to get many because you want to get the different emails that we needs to get. Uh return all, just let the AI handle this. it will define whether it needs to return all or just one um or what it needs to return in this case and then the sender. So defined automatically by the model and we also give it a description. So it sort of has the guardrails when he needs to think about uh who is the sender. So in this case it can be a sender’s name or email address when he needs to pull information. And then same thing with email reply. So in this case we have message then we have reply. The message ID will be obviously the message that we previously got that we’re replying to. And then we leave this as HTML just to make the email look pretty if it needs to in case you’re sending a blog. And then the message here will be the body. Turn this off because then we don’t have to see end on the email. Same thing with create a draft. So in this case, instead of message, you can put draft. Create for operations. That’s the actual thing that we’re doing. This is a subject line. So we let it define by the model. So we just press this button right here. Or you can simply add bracket bracket dollar sign from AI and then you put subject. this is the variable that we’re pulling in or you can just do this and then you can leave this as HTML and then message is defined by the model and then whoever sending the email to as a drop is defined by the model as well. Same thing with get labels. We’re just getting labels. So label and get many and return all will be defined by the model and then label emails as well. Um because this right here is a two-step operation because we’re first getting emails to then label the email. In this case, it will be the message add label. Message ID will be the ID of that specific thread of email. And then label names or ids will be the ones that will be pulled in from this right here because before this acts, this one happens before uh cuz it needs to again get labels before using the labels that it was given to then do the thing. Uh then we go to calendar agent. Very similar setup. We have the description, the prompt which is defined by the model. And we go here and we can see that this is a system message. So this is the instructions that we give the AI agent uh in thinking through what he needs to do. Again very very similar setup as the one we have before overview tools and final reminder. Uh and most importantly here we have date and time because again AI is just the worst at thinking through the times and the dates. And now I will think through what he needs to do and then it’s hooked up to five different tools. So we have create an event with attendee. So this is basically creating an event with someone right um which is exactly what I showed you at the start of the video. In order to connect your Google calendar to an endn you have to do is create in your credential. You go here, sign in with Google. It will take you through this page. Choose the account that you want. And this is will be the one that will be connected here. And then you want to put the resources event because it’s an event, right? Uh create because that’s a task that we’re doing. That’s the action that we’re doing. We’re creating something. The calendar will be your calendar. And then it’s going to ask you for the start and end date. So let’s say I tell it to schedule an event for tomorrow at 7:00 p.m. It will choose the start date and it will also choose the end date. So you see how before it chose the 8:00 p.m. 1 hour time frame. I didn’t tell it to. The AI automatically did it. Right? This is what it is. Default reminders if this is on because then Google calendar can choose its own reminders. And then it’s going to ask us who the attendees are. The attendees are basically the people that are going to be invited to that specific event that we’re doing. We’re also giving it a description and the summary as well. All defined by the model itself because it will be smart enough to know that it will give the email, right? And we tell it description as well. And the summary will be defined automatically by the model as well. And then let me actually do this. Let me actually show you just this mode right here. So you can see exactly the flow that it goes through. to just get contact and then do this. Let me go here and let me say, can you create an event for tomorrow? God, my spelling is horrible. Event tomorrow at 6 p.m. and invite him. Yeah, that’s it. Boom. Then I’m waiting for it to do. It will think through what it needs to It will create the event. It will then give me a response. If I go to my Google calendar, I can see that event with James Low was done at 6 p.m. to 7:00 p.m. Again, it was smart enough to think that it’s just a 1 hour slot. But of course, it was given it was given the context. It it wasn’t given a 1 hour thing. So, it will think through exactly what it needs to do. It will just choose the 1 hour and add it there. It will send me the invite as well. That’s cool. And that’s uh what this tool does. And the same setup is for create an event without the attendee. So everything’s the same apart from the fact that we just don’t add any attendees here. Get events is the same. So in this case, uh we’re just changing this to get many. So let’s say we go here to Telegram and we ask it uh let me just execute the workflow. We ask it what events do I have this week. So now we’ll think through what it has to do. It will then think through what it needs to use. It first it will get the events and bring it all back to Telegram. So right here it would tell me that I have the altco workshop this weekend James Low dinner in Rome and workshop again. So this right here is something that I had was it yesterday at 1:00 a.m. Yeah, yesterday 1:00 a.m. So that’s why it’s telling me that it’s from this week as well. And that’s how this tool works. So get an event and then we have deleted events which is again the same. The only thing we have to change is the event and delete calendar will be ours. Then it’s asking us for the event ID. It’s sort of the same as replying to an email because you need to know the email ID first of the one that you’re replying to to then reply. in this case is asking us what is the event ID? What is the event that we’re deleting? And what’s the ID because that’s unique identifier for that specific event. That’s what we need. So we want to define it automatically by the model which again all of these this right here wasn’t before. It wasn’t here before. But now because the models got smarter, we’re able to let AI actually do it and let it handle it. And that’s fine. And then we have update an event which will be same connection set automatically event which will be update in this case. Uh same calendar event ID which is the same as before. you use default reminders and now we give it a start and end date which is the same as before. Uh we’re basically saying hey this is a start and this is the end right of the of the time frame that you want to update. So that right there is for the calendar agent and then we go on to the content creation agent. So in this case we have description. So call this tool to create a blog post. The prompt is automatically decided by the model. It doesn’t require any outputs format the fallback model. We don’t need this and then we just have to use the system message which in this case is you are an expert blog writer. Use the appropriate tool to write a blog post. In this case, the only tool we have is Propexity, which should be used to actually do the research before we actually write the blog post. Um, again, this is exactly what I told it to do. And then some rules are that your blog post should be less than 500 words because we don’t want it to be too big. And also, it can’t send more than 500 words or I mean, I don’t know how much it can send. I don’t know what the limit is, but on Telegram, it can’t send a blog post to back to Telegram with more than X words. So, we’re just cutting it out. And uh, we’re also saying output the whole blog text. And then final reminder, we just give it the date and time in case it needs to know. So that’s right there is the system prompt that we tell the content creation agent to do. Then we actually hook it up to claude. So you see here we use open AAI, open AI, open AAI. Well, the reason why we’re using Claude in this case is because Claude is extensively better at understanding and making content. It’s much better at using words and creating words and creating feelings out of words. That’s like the best way that I like to think about it. So that’s the way you use Claude. If I go here, the way to connect your Claude is create a new credential. And all you have to do is you have to go through anthropic console. So let me go here. anthropic console. You want to log in and then you want to get your API key right here. Create a key. Name it whatever you want. So let’s do test n agent. Add copy the key. This will be the one that you use to actually set back here. Right? And then you’ll save it. So now you connected your cloud. And then you can leave this as claude for set. And now you want to hook up perplexity to do the research for this agent to make the blog post. So the way that we do that is press plus app perplexity tool and then we go here connected. So in this case the way that we connected is go here and then in perplexity we go here we can see that down below to the account we go to API API keys we can create a new key right or you can just copy here the ones you already made and this will be the one that you then copy paste in here API key to connect it set automatically message a model because that’s the thing that we’re doing. Uh, sonar pro is the model that we’re using. Um, you can use any other model. I think this is fine, relatively fast. And then the messages is what is the prompt that we tell the AI to do. So what is the thing that we tell it to research and we’re letting this define it by the model based on the context that we give. And then we’ll leave it as user prompt because the user prompt is essentially your task is to do XYZ and it’s fine. And then we have maximum number of tokens which will be automatically defined by the model which just means that when a blog is very very long and a lot of words come out of it. It’s usually token intensive which means that it takes up a lot of API credits. It’s more expensive right? Uh so we just wanted to uh let the AI handle the maximum number of tokens but we already told it to only do 500 words. So the tokens are already restricted as to how many we’re using them. So that’s fine and that’s the thing that we’re going to use for perplexity. So let’s actually test this because I haven’t tested the content agents. Let me go here. execute workflow. Let me go to Telegram. Can you send me a blog about why the Roman times were the best compared to now some random Okay, so we have here it will then think through what it needs to use. It will then know that it needs to use the content creation agent. It will talk to anthropic then perplexity to do the research. Again, it has different rounds. So it does different types of research and it does take a bit longer than the others just because it is content creation is more uh time intensive. Now it’s going back here. It’s thinking through what it needs to use. It’ll now it will now format it in the right way. So we can send it to Telegram. And if I go here I can see that we have a blog about why Roman times were better than convert. I’m actually interested to see what it says. Why the glory our age phones. Okay. It will probably say some some stuff that um like smartphones are bad for you and whatnot. Uh but yeah, this is the whole blog that we have all automatically within what just a few seconds. Well, I mean like 20 seconds, right? Uh so that’s what we get there. And this is the way that we set up the content creation agent. But essentially what this is again is a multi-step agent. It’s one agent that we talk to through Telegram through an input and an output that has a memory uh right here that has a brain which is the LLM. And then it has different tools. The tools are the things that it calls when it needs to do something. Right? In this case, if it needs to get a contact, it will talk to this tool again, head of department of contacts, head of emails, head of calendar, head of content, and then from there, it actually execute the task, sends a response, and sends it back here and then gives it to us in a in a very clean natural language English way. Right? That’s what it does. So, that right there is a full walkthrough of the AI agent that I built inside of NN that manages my contacts, calendar, emails, and even drops my content. In today’s video, I’m going to show you step by step how I built a self-learning AI agent inside of Nitn that stores long-term memory. It remembers past conversations from tools like Telegram and even improves itself over time by writing new memories to our database. All right, so the first thing I want to do is actually show you the live action of how it works. On the left hand side, we have Telegram because Telegram is sort of like WhatsApp iMessage that you text the AI agent for it to actually do something. On the right hand side here we have uh in the middle we have the AI agent in and right here we have the memory database. So database just stands for a place where you put stuff right in this case is going to be a Google sheet and this is where we’re going to store information for the AI agent to extract over time as it’s giving us answers. So I’m going to say well I mean I like football. My brother’s name is James. I’m from Italy. So, let’s do what sport do I like. In this case, it’s talking to the memory. It extracted all the information and now it tells us that I like to play football. Need some tips to want to talk to about strategies. What the hell, man? Okay, there you go. All right, cool. And we can ask any other questions. So, let’s say I wanted to ask um I also like dogs. So, let me run this first and then let me put the message here and let me press go. This will now this should add it to our database. You should see it right here. User also likes dogs. As you can see, it’s adding information over time about the user so that it comes to a place where you can ask any questions about yourself or whatever it is or even your business or your life in general. And it has context, right? It has a database full of contextualized information of who you are, what you are, and sort of what what it is that you’re about. Um, and different pieces of information like this that it kind of used to give you answers, right? Right? So, it’s much better than just a normal AI agent that has no context to you. All right. So, before I get to explaining the whole AI agent in Niten step by step, I want to go through and show you how this looks like in chat GBT. And you’re probably asking yourself, why is this even relevant? Well, the AI agent that we’re building today is an AI agent that has memory on you and that updates itself over time so that when it gives you answers, it has context. You don’t have to repeat yourself. Now, with Trabt, we can go to our profile. We can go to I believe it’s settings personalization. If you scroll all the way down, you can see here that it has memory. Right now it’s 89% full, which means that the memory of me that it has is 89% full and it goes to 100 and it can’t add more information. And if I go to manage, I can see now that it has different pieces of information right here about me that it extracted or that it got from the conversations that I’ve had with it. Now, this is really, really powerful because it allows it to reference save memories when responding and reference chat history as well, so that every single time you go to try, you don’t have to reexlain who you are, what you’ve done, what your business is, and so on. Uh, but the only caveat to this is that it has a storage, right? And a storage isn’t a crazy amount of information that you can add there. Uh, but it is still good to have when you want to ask JP any questions. So, I wanted to give you this as context when we explain how the AI agent actually works on any. Now I drew up this diagram right here which is the easiest way for me to explain all these concepts because it can get a bit overwhelming with all this database storage extract information XYZ but to put it in a simple way what it is it’s an AI agent that has an input okay so we have an input which is telegram hey can you do XYZ what it does as a first step is that it retrieves the information okay so we have this database right here which is called the memory AI agent which has different rows and all these different rows are pieces of information that has about us and this is what it will use to then give us or use as context to then give us the answer, right? And so that’s what this is right here. And when you hear database, it just means an air table, it means a notion, it means a Google sheet, right? Just so you can store data. Then what it does is that it sends the input plus the retrieved information. So the memory all to the AI agent and what the AI agent does is the follows. It looks at the information that it got and it thinks through itself. Is this something that is worth me adding to the memory database based on the input or is it simply just a question or statement that we just need to answer based on the context that we got. So let’s say I ask it like before I ask it hey what sport do I like to play right it says user like to play sports what it does or user like to play football the input is what sports do I play that’s a question it retrieves all the information from the database well clearly the AI agent knows that this isn’t a new piece of information this is just a question that we can simply answer using the database that we have here so what it does is that it goes straight here and it generates a contextualized answer contextualized just means that it has context in this case the context is the database of memory of right and gives us the answer and then the output is uh the output to the user. So in telegram we get an answer back saying hey or it just gives us the answer right like just like a general chatbot. Now there is that case where we give it information. So we can say hey my mom’s name is Janette or whatever it is we give it here. Now the AI agent will have to classify whether that’s worthy of putting to the memory database. If it is then it adds the new information there right and it goes here. And so what it becomes is like an infinite loop that it goes like round and round and round and it keeps getting smarter and smarter and smarter. That’s why we call it a self-learning AI agent because it self-learns, right? It self-learns based on the questions and and statements and the conversations that we give it. So in Nit right here, essentially how it works is that the first part is the input. Okay? So all these notes that you see are actually quite easy. I’ll take you through exactly what it is. Uh the first step is a telegram trigger. So this trigger right here is able for us to get messages. Right? So when I run this, let me go here. Let me execute workflow execute step. And I can pull up Telegram and let’s say I say my business name is JM Solutions and we help companies be more efficient um in their own workflows using AI and automations. I can press go. What this will now do as you can see it triggered which means that it send the information here for us to start the conversation because a chatbot or an AI agent needs to have an input right like what is the thing that we’re actually processing what is the information that we’re processing and then an output which is giving us the answer back. So right here in the schema version which is the normal person version we can see that the text here is my business jam solutions xyz. So now that we have this part we send it two different ways. So the first way will be to extract the memory from here because you’re always extracting it over and over again right so we have all these pieces of information that we give as context. This is the first step that we do. So we just connect it to the get rows in sheet which means that it gets all the rows from the memory AI agent to Google sheet right here. By the way, to connect your Google sheet, you have to go here, sign in with Google. That’s it. And then we have to do sheet one and leave all the filters alone because in this case, we’re just getting all the rows and then we’re giving it to the AI agent. Now, the only thing about this is, let me just pin this. So, if I pin this, I don’t have to rerun the whole thing again. The only thing about this is that it gives it to us in nine items. Okay, so for those of you who are not familiar with how arrays, iterating, aggregating works, it’s actually quite easy. So as you can see here what this looks like is that this has nine rows. So 1 2 3 4 5 6 7 8 9 right. These nine rows are the ones that we get right. So in logic if we tell to Google sheet hey can you get all the rows it gets nine. The only problem with that is that it then processes each row individually. And that’s not something that we want. We want it all to be in one place as in we get all these pieces of information all the rows and it makes it into sort of like a paragraph that it then gives the AI agent as context. And so to do that to make it into a paragraph or to make it into we call it we to aggregate it right we use the aggregate node. So as you can see here by the diagram we’re basically getting all these nine rows and we’re merging them. So we’re putting all in one place to then give uh to ChibiT as or to the AI agent in this case as context. So we use the aggregate node individual fields because we’re doing individual fields and then the input field name will be the memory because this is the memory. All I did here is I just drag this across right and so if I execute the step what it will now do is that it will take the nine items because before you can see here it’s nine items. I can’t see all of them in the same place. Well, see here we put them all together and now this will be the thing that we give to chat GBT or to the AI agent in order for it to get context before giving us the answer. Right? And that’s all we do. So that’s the first part and that’s what we give as the first input to the AI agent. The second input here is uh the telegram. So all this is is saying hey we can either give you text or we can give you audio messages, right? So if it’s a text we send it here. If it’s an auto message, we send it here. So the switch node, this is basically a node. So like a square that allows us to send the automation two different ways based on something. In this case, the filter or the condition is if this variable exists, which is audio, then we send it one way to extract the audio to make the audio into text and then send it to the AI agent. But if this variable exists, then what we do is we send it to the text way and it just simply goes straight to the AI agent. Now, how do we know what variables to use? Well, in this case, we know that whenever we do an audio, we get this variable. So, let me actually test this and show you exactly what I mean. Just so I’m not waffling. Uh, let me do this. There you go. I can execute the step. Why did not work? Oh, right. Cuz it’s pinned. Let me unpin this. Let me go here. Execute step. Okay. Again, execute step. Never mind. Again, execute step. Let me go here execute workflow. So we’ll now put a new message and let me go to telegram. Let me say let me put it here. Me say um hello hello hello hello. What this will now do is it will send the information from telegram to the switch node. And now you can see that this is green because that was a voice message. So we know it’s a voice message because this variable right here or here or here or here or here, right? These are only present if it’s a voice message. And the same thing with text. This variable is only important when it’s a text message. And so what we do here is we split it out. So we’re saying, hey, if it’s a text, send it here. If it’s an audio, send it here. Now, if it’s an audio, we have to get a file because it is a file. And the file has a file ID. So file get and then the file ID you can find right here. File to then download it to then give it to AI to transcribe the recording. So to connect your OpenAI, you have to go here. You need an API key. You can simply go to platform.opai.com. Go to is it dashboard? Yeah. Go to API keys. Press this button right here. Name it. So nitn test. I think I’ve made like 30,000 of these. Uh and then you can copy the key. And that’s what you bring back to the uh nitan. Important thing here is that this is not free as in you do have to pay, but lucky for you, this is not expensive at all. Um, you can add $5 of credits per your credit card here and just leave it as is this. $5 can last you a long while. Obviously, it depends on how much you use it, but this is like fraction of cents when you run it, so it’s not noticeable. Um, okay. Once you connected your OpenAI, now you can transcribe the recording and audio and the input data field name, which is what is the thing that we’re giving OpenAI to take as audio and turn into text. Well, that’s data because if I test this, I go here. So I put this we can see that the output is data and that is the input on the next node data. We just drag this across and we get this. So now if I execute the step I should be able to see hello hello hello hello. There we go which is the audio that we give telegram. And that’s the first input. The second input is simply text. And we turn this to text JSON message of text because because this is very important because when we send the input here and the input here we want the output of both of these to be similar or to be the exact same named variable. Right? What that means is that the output here is text. So we also want the output here to be text. So instead of message of text because this wouldn’t be present here in the audio, it would have to be something that we can manipulate here. text, right? So now we have both the inputs are basically the same variable but it sends it different ways based on the input that we give it whether it’s a voice message whether it’s a text. Now we have the merge node which merges so all possible combinations. What this does is that it takes this it takes the uh telegram input and now if I execute the step. So let me actually did it work? No it didn’t work. Uh so let me actually start from from scratch here so I can show you exactly what that looks like. execute workflow and let me unpin this go to telegram and I can say what is my brother’s name right now this goes here it extracts all the memory so you see how nine items went through here and only one came out because it it put them all together and now this went this way because it was text and in the merge node what this did is that it merged let’s from the emerged the text from telegram and also the memory. So these two pieces of information are the ones that are going to be directly given to the AI agent to do its own thing. All right, enough of that. That was the boring part. Uh now we get to the fun part which is the actual AI agent. So this is the thing that will think through its answers. It will then call the the Google sheet tool to add memory and uh yeah so the first thing we have to do is actually define the input. So the input in this case will be JSON.ext text. And this is the one right here because this is the one from Telegram. The one from Telegram is the actual thing, the user message because the user sent us a message and that’s the thing that we sent to this here. Now, we have the system message and the system prompt. Now, I’m going to show you at the end of the video how to get the whole system for free. So, don’t worry, you’ll have this whole prompt, but what it actually tells it is an overview, so memory handling, so some rules and stuff, response styles, the context awareness, and basically telling it, hey, you’re getting this memory. basically use the memory tool when you have to add a new memory. Don’t feel forced to use memories only when they add value. And that’s why we’re giving AI sort of that task to to think through is this worth putting in the memory database. If yes, put it. If not, then just answer the question and so on. Um, and then we give it a few rules, right? The example format and even the current date and time because AI is not good at determining date and times. So, we give that as well. So, again, you get the whole prompt for free at the end of the video, so don’t worry. But this right here is really the source of the whole system because the prompt is a thing that really gives the instructions to the AI agent. So if you don’t instruct it well then you won’t get the output that you want. All right. So once this is done we added the system message and the user message. Now we have to connect the chat model. So the chat model is basically the brain. In this case we have to use open AI. Again follow the same process before to connect your OpenAI. I mean if you connected it before you’ll have the same connection here. Uh the model you can use 4.1 Mini. That’s good enough. Then we have the memory which is able to remember the actual conversation on chat. This isn’t this kind of memory. Uh this memory is just for conversations on telegram. And then we have our nice tool right here which is connected to again the same exact database memory AI agent. And the only action it takes is just adding more and more and more and more and more. So you basically just feed it more and more memories more and more sort of details about yourself as context and the memory itself. So the values to send is just a memory and all we do here is just press this button because we’re letting any define what is a thing or how do we want to structure the input for example here I didn’t tell user also likes dogs I told you hey can you also add that I like dogs right and so what it did is that we let AI define what goes in here and AI define that it should put it in this way user also like dogs so that it’s easier for for the actual system to know exactly what I’m talking about right and once this is done we have the tool connected And this is where we actually add the uh the piece of information. So let me run this and I can show you exactly how this looks. Let me go here. In this case, what we can do is we can say I also own a MVA team called Dallas Turtis. Wish that existed. Uh what this did is that now I called the tool. So now I should see here that it says user owns an NBA team called Dallas Tories, right? And that is giving us context for the future things and that’s why we call it self-learning, right? That’s all it is. Self-learning just means that it learns over time. And so that’s the reason why we connect this tool right here to the AI agent given the context as well. And then finally, we connect this to the response of Telegram. So to connect your Telegram account, I didn’t mention this before, but all you have to do is you have to ask the assistant AI uh cuz it has a whole process. So these right here are the steps you have to follow. For the sake of time, I’m not going to connect it now. Um but if you follow these, you’ll be fine. And you just have to press this button right here. And now we can put message, which is what is the thing that we’re manipulating or changing. And the operation, which is what is the action that we’re taking. In this case, it’s sending a message, but you can do a bunch of stuff. And then the chat ID is the ID of the chat, right? Logically, that’s what it is. But the way that Telegram works is that every conversation that you have has an ID attached to it. Right? And so if we get an input from this ID, then we have to give the output to that ID. So logically, if we get an input from this ID, then we have to give back the output to that ID because then it’s in the same conversation. And then the text will be the JSON.output, which is the one here. So I just drag this across. So you can see here it says, got it, bro. I just added you um that you own an NBA team called Dallas. Anything else you want to add or chat about? What the hell, man? There you go. And everything else keep the same. So now when we get the output, this is the message that we come back to Telegram uh to do its own thing. And now you got to see exactly how it works. But this is a very simplistic version of a self-learning agent. I mean, we’re using Google Sheets. Typically, you wouldn’t use Google Sheets. You maybe have an Air Table or even a rag database, right, to store these different pieces of information. Uh but you got to see the the theory, right? The theory behind it, how it actually works, how it functions. So now you can apply this to any kind of other database tool to store information and have that retrieve it every single time that it gives you answers. Hey, I’m about to show you how I built an AI resume screening agent in Anen that allows applicants to put their CVs and apply for a job. What it does is that it then extracts the text from that CV. It then matches the text of that CV to another PDF which contains the requirements of what a good applicant looks like for that specific job. Then it uses an AI agent in order to score the applicant based on the different criterias. Then it sends a confirmation email to the applicant itself before adding it to our notion database. All right, I want to show you the full system first before we go step by step into how it works. Uh just so you can see the output. I want to press execute workflow and this would be the form that the applicant would fill out. All right. So, I just finished the application and also important to know that the job that we’re applying for is an investment banking form or job, right? Um, so bear in mind because the CV is tailored towards that job. I’m going to press submit. What this will now do is it will go to Google Drive. It will upload the resume. It will download the resume to then extract the text. It will then go to this folder right here which contains a document which basically outlines the qualification uh for that specific job before giving it to the AI agent. the text of the qualification plus the text of our CV before scoring it and sending the applicant confirmation email and then adding it to our notion database. So if I go to my email here, I can see that I have thank you for your application. Hi Mikuela, thanks for applying. We received your application and our team will review it shortly. We’ll get back to you soon with the next steps. Best GM solutions. Obviously, we can remove this which is the N10 attribution and I’ll show you exactly how to do that. But just so you know, we got it here. And if I go to my tracker, I should be able to see myself in the high ranking where we have Mike Torti, Mik Torti, email, phone number. Not only that, but we get to see the resume link. We get to see the strength, the weaknesses, the risk factor, the reward factor, which are all different pieces of information. That’s really, really, really important for someone to then go in and see exactly why they got scored eight out of 10. Why are they a high ranking applicant versus a medium or a low ranking applicant? Like what is that thing that differentiates them and gives us data based on that? Okay, so with that said, let’s go step by step into the system and how it works. And if you want the full system for free, make sure to check out the first link down below, which takes you to my free school community right here. Then you go to classroom, go to the templates vault, and then you’ll be able to see the AI ré screening agent. Press this button to download it and then import it into your own account. And if you have no clue how to do that, no worries at all. You can also go here, zoom in, and you will have a tutorial right here. And by the way, if you apply and you get in, you also get access to the AI automations 101 course, which is a comprehensive guide that takes you from a real beginner in AI automation to someone is able to build automations for themselves or for other businesses. All right, so let’s go through this step by step and I’ll walk you through my thought process as I wanted to build this. Um, I basically wanted a system that could process résumés, right? And so when we think of structuring a system, we always think in inputs and outputs, right? If I go here to my miro, which is where I basically map everything out, um the input in this case would be the application, but realistically it would just be the CV, right? Cuz that’s the thing that we’re that we’re going towards. And the output would be really data like results and data on this CV based on job, right? Qualification. So it’s basically saying, hey, we have a CV. How well did it compare to that job? uh from the CV that we have. So they input a CV and the last thing is this which is typically what a HR role is is just simply to look at the applicant are they good enough or are they not good enough. Uh now the next step here is to obviously extract the text. There’s a few steps before but extract text from CV then match against qualification and then we want to use AI agent to score right this is why I do this then we want to send applicant email to be connected this to be connected right here right here and then we get the results and data on a CV based on job clarification which will then be added to our notion database. Cool. This is important because this is how you structure systems like how do we think about doing things like what is that sequential order that we go through when building these automations. Now the CV itself has to be an input coming from somewhere. It can be a Google drive, it can be a Google form, it can be in this case an end to end form, a native form uh where someone can just submit it and just give us the CV which then kicks off the um well you could say the automation, right? And so the first step to this automation is a job application. It’s us actually getting the details. So if I go in here, I can see that we have job application. Please fill out this form right here. Uh we have the full name, the email, the phone number, and then the resume. So the resume is really the thing that we I mean we care about the others as well, right? Because we have to know their name. But the resume is the thing that we actually use to be able to then score the applicant based on the qualifications for that job. And so the way that we do this is make sure that the element type. So this is saying, hey, what is the kind of response format that we want from this field? In this case, it’s a file. It’s a bunch of fields that you can use. But in this case, it’s a file because we want a file from the applicant. Multiple files. This is saying, hey, do we accept multiple files? Honestly, I don’t know why I have this on. I’ll typically have this off because a CV is one uh and we don’t want multiple CVs to them because it’s one applicant. Um, and then the accepted file types you can leave empty to allow all the types of files. So it can be a PNG image, JPG, can be a H EIC, but it could also be a PDF. In this case, uh I would just like a PDF version because that’s the best way that we can use to then be able to extract the text and I guess compare it to the other one. Um and that’s it. So we have a form which looks like this. Full name, email, phone number, and resume. And resume, as you can see, makes you choose a file, and it doesn’t let you choose everything. It only lets you choose the things that are PDFs, which is great. All right, cool. Um, so once this is done, the first part is obviously connecting our Google Drive to Nitn. You have to go right here, create a new credential, and you need a client ID and client secret. For the sake of time, I’m not going to go into this, but you can check out this video up here if you want to um see how you can do that, which will take like 5 minutes. Uh, and then we want to do file upload resume because that is the name of the file that we get. The file name will be the person’s name / CV. And then you could add it to a a folder called résumés or uh new applicant rums. Right? For in this case, the root folder will be no folder. It will be anywhere in the Google Drive. But you could obviously put it in a folder if you want everything organized in one place. After this, uh in order for us to be able to extract the text from the CV, first have to upload it. Then we have to download it. So we’re downloading the file which you can find right here ID and that’s the thing that we use to then download the file using the same connection right and we get the data and this is what we’re able to then pull through to the next node which is extract from file so we’re extracting text from a PDF and fundamentally the reason why we’re doing these steps before adding it to the AI agent is because we can’t give the AI agent two files right which is why we have to download well upload them in this case download them and extract the text right from the PDF and in this case the operation which is what is the action that we’re taking is extract from PDF the input binary field because this is binary when a file is uploaded and is downloaded it’s binary uh that’s just a format and then the data itself is the data right which is this one right here always match this with this as you can see here the output will be text that will then be used right that we have here now once Once this is done, this is the first step when we actually have to extract the text from the CV that we’re getting from the applicant because that’s the first step. The second step is this. So we have this Google uh drive folder and this is where this part comes in, right? Matching against qualifications. So when you have to match a CV against qualifications, you can either add the qualifications or rules in the EI agent or you can simply just have another document which can be as long as you want that will then be used. extract the text from here of course and then we use to match the text of the CV that we then give to the AI agent to then qualify the applicant and give us the results right and so what we do in this step is we have the CV from the applicant we basically turn that into text then we have the initial job which is this one right here from this folder and the reason why we’re doing it in a Google Drive folder is because we can then add more files and we don’t have to change this one right here the prompt here because the prompt will be dynamic based on the um the thing here and we’re downloading it, right? Which is the investment banking interim PDF, which again is the qualifications like what does good look like for this job. We extract the text from here because we’re extracting the text to then have the second pillar because you have the CV and then we have what does good look like for that specific job. And then these two pieces of data because again here will be job description will then be used to send to the AI agent. Okay. And this is where we start to analyze the CV. So again, we get the CV text and then get the job applications, which is what does good look like for that specific job. It then turns that into text. So we have two pieces of text and then add all of that into the AI agent. If I go in here, I can see that the prompt that I have is a user prompt and a system prompt. The first step here is making sure that we have defined below because we want to define exactly what the input is. This is not a chat to the AI agent type agent. And so the user prompt in this case is like what is the information that we give the EI agent for it to actually think through through its system message what it needs to do, right? And so the prompt that we give it is a candidates’s resume which we pull in from the first extract from file which is the text right here. Pull it through and the job description requirements which you get which is one here and you put it here. Right? So we have the candle resume and the job description rs and we turn this on. So require specific output format and I’ll show you exactly why we do that. But the system message is really the thing that matters the most and this is quite extensive. We have the overview. So you’re an expert technical recruiter specializing in XYZ. The output should be in the following exact formats. So we have candidic strength, weaknesses, risk factor, reward factor, overall fit and justification for rating. So these are the different pieces of uh information that we want. from the AI to do. So it’s an extensive analysis of both the CV and the qualification of what it looks to be good for that specific job. And then we give the job description here which again is basically like a double input because we give it also here. Um I don’t think you have to give it in both ways but you can. Now one important thing is that I did tell it to give me the output as candidate strength which is one variable weakness another one risk factor reward factor and overall fit and justification. So, six variables. When we give AI the ability to give us six variables, we want the output to look like this, right? And for the output to look like this, we have to get it in a very, very specific format. And in order for us to get something in a very specific format, we have to make sure that we have a structured output parser. So, this is saying, hey, this is a data that’s unstructured. That’s a block of text, right, which contains weaknesses, strength, XYZ. And then we run it through this right here, this code, which is defined using JSON. And if you’re looking at this and thinking what even is this, it’s actually quite easy. Uh so don’t worry. But what it is, it’s JSON that tells us hey we want the output in description. We want the candidic strength. We want the weaknesses. We want the um the risk factor which is an object explanation which is a string. So these are all different types of variables and we give the explanation of what each one does, right? With the description, description and so on. And so what happens here is that it first talks to his chat model which you connect here. Go to OpenAI and then connect to OpenAI by going to platform.opai.com. You can go to dashboard right here. You can go to API keys. Create a new secret key. Make a key right here. And then you paste that key back into NN right. And then you press save and you connect it. GPT4.1 Mini is great. Once you have this connected, right, this is the thing that it will use to then think through exactly what the rating could be. Yeah, how I would rate the applicant based on the requirements for that job. And so again, we get two different pieces of information here. It then ranks or then rates this. And let me show you exactly what if we don’t have this pin this pin. I believe you can pin this. Okay, cool. Here I can execute step. Please unpin extract text and try again. Okay, I think I have to start from zero. That’s okay. That is okay. That is okay. I will start from zero. Let’s do it. Let me unpin this or let me extract that. Let me go here. Let me put a CV. Just submit this. Put some random email. I just want you to see exactly like what it would look like if we didn’t have this. Plus, when we do have this. So, it’s doing everything that we want. And now the AI agent will all right. So, you can see we got the output. And the output in this case, as you can see, is just a block of text. It’s a block of text that looks like this, which has all the weaknesses, all the strength and so on. So, something like this we can add into a database in notion, right? right or anywhere in Google Sheets, whatever it is that you use in a very structured format with each column. And so what we do is then we add this here, right? We are able to then um make sure the information is in different variables. The next step once we have this once you have the whole rating, weaknesses, strength, XYZ or we go to the next step which is sending an email. So we send a confirmation email. Uh this is a Gmail node. All you have to do is first connect your account. Sign in with Google which will take you to this page. Make sure you have the right account and then bring it back. It’s very very easy. And then we want to do message because that is the thing we’re manipulating. Send because that is the action we’re taking to. So who are we sending the email to? Well, this is something that we get from here. The email subject line. Thank you for application. And then we want to put the body um the text, right? And the way that we do that is through HTML. HTML is just the way that you make your emails look pretty. You could also not use HTML. I think it doesn’t really matter. Okay, we’re not adding any links or anything. Um, and the email is hey, so hey S in this case because S is a the full name. Let me go here for a second. Let me manipulate the uh the full name so you get to see what an actual full name looks like. There we go. Save. And here you get to see that the full name turns into a first name. And the way that we do that is using formulas. So the formula here the way that it works and this might look complex for someone who has never seen uh these type of formulas but it looks like this right and the logic that I go through when I make formulas is the following. So we have the full name which is Mike Torti and a full name ideally. So Mikuel Torti is separated into the first name and the last name and between the first name and the last name there is a a space. So if we split this and this by the presence of a space then we get this we get one then we get two and now if we want to get the first one then we just have to use first to then get the uh the first name. So the way that this works is that we’re saying okay this is the full name because this is the variable. Let’s split this by the presence of a space because this is the space and then let’s get the first one right and it’s actually quite easy once you actually break it down that way. But if you look at this at hand side you think what what the is this? Um but that’s what it means. Say hey Michaela thanks for applying we received your application and our team will review it shortly. We’ll get back to you with the next steps. um as well. We should probably be able to put this right here, which by the way, this stands for break. This is a new line, right? So, we have new lines here. That’s it. And then we have notion. So, the way that notion works is that we set up a workspace so that we have one database. So, this is the same exact database, right? This, this, this, and this. It’s just the way that we look at the database is different. So in here we have a filter which is like hey the low applicants are everybody that has a score less than five. Medium applicants are the ones that have a score more than four and less than seven. And then high ranking applicants have a score more than six. Right? And that’s it. But if I just took the filter out right here you could see that I have the applicant right here. It’s just because we have a filter that we don’t see the applicants. So that we’re able to just basically sort or filter by who are the low applicants, medium and high ranking as well. And then we have applications which shows us the amount of applications that we get over time. Right now you could use a Google Sheets for this. It’s not really a crazy amount of difference. It’s just the fact that we can filter and we can do so much more in notion than we can on Google Sheets. So when we set this up, the first thing you have to do is go in here. You have to make sure that you can create a new credential. I recommend that you ask the AI assistant for what to do here because it is a bit of a longer process, but actually takes 2 minutes. Um, and get the internal um, integration secret. By the way, the alternative of this is Google Sheets, so you can use either and it walks you through everything. Um, yeah. And then once you have that, make a database that has these columns right here. Applicant name, first and last name, email, phone number, application date, resume, strength, weakness, risk factor, reward factor, overall fit, and justification. And these are the fields. So in this case we have a title which is the name, first name which is the first name, last name, last name, email, email, phone and so on. And now we actually forgot to put the date. So we can put the date as now. And the way that that works is it’s asking me for a date. And I know that the the date in any is curly brackets because it’s inside a variable, right? So we have a variable here just like this. Inside we have to do a dollar sign now. And this is the output that we get. Now, ideally, we don’t want it in this output because we still have words. So, we put a format like this. So, we format it in this way, which will then be good to then send it to notion. And then we have the resume, uh, strength and weaknesses, and risk factor, reward factor, overall fit, and justification. So, these are all the fields that will go into notion to then rate the applicant. And that’s how we get everything to here, right? Applications, uh, high ranking, low ranking, and so on. All right, let’s start from zero and I’ll take you through exactly like the the data and so on which I did before but now we go into detail. I want to execute the workflow. I’m going to call this let’s say James low my email still phone number then my CV it’s not really my CV it’s one of my friends. So if you’re looking at this man we’ll break it out to everyone. Uh press submit and then this now goes to the to the Google Drive folder then downloads a file. It extracts the text. Right? Right. So we have the text. It extracts this uh PDF text right right here. It then uses AI then think through its output right here. And now it give me an error. So what was the error? Send email confirmation. Unable to sign in. Oh, okay. Cuz I put the wrong account. There we go. Yeah, I think this works. If I execute step. Yeah, send. And then lastly, we have notion, right? Which adds the applicant James Low should be able to add it to the high ranking James Low. There you go. with everything, even the date right here. As you can see, it’s different from this one because we forgot to add it there. We have the resume link right here. And then we have the strength, weakness, risk factor, reward factor, overall fit, and justification. That’s it. Now, something like this could be very, very beneficial for any kind of business that is hiring new applicants. And there’s so much more that you can do with hiring because stuff like these takes 10, 15 minutes or even 5 minutes for someone to match a CV to someone else or to another um qualification. And if they have hundreds of applicants and that’s hundreds of hours and they have to spend to actually doing this tedious tasks that AI could literally do in seconds and teams literally spend tens of thousands of dollars for people or team members to be able to do those tasks which is insane cuz now AI can actually do them for you. Hey, in this video I’m going to build an email classifier AI agent inside of NIDN that watches for your emails coming through. It then classifies them based on different criterias. It then uses a series of AI agents that will now write back an email which will then be drafted into our inbox. All right, so this right here is the email classifier system. All I have to do is send myself an email. I’m going to go here. So I said, “Hey, question about company. Hey Miklly, I have a quick question. What do you guys do and what is your service?” I’m going to press send. This should now come to this inbox. As you can see, we just got the email question about company. All I have to do here, I’m going to test this. I’m going to press X workflow. This will now get the email that it used. It classified it as a customer support email. It will now generate a draft email that we can find here. If I go to support, I can see that this email right here, question about company, it’s here. And we generated a draft email to that question that we can now double check before sending it to the customer who wrote us the email. And this is the exact same concept when it comes to high priority, promotion, and finance and billing. Right here, we have promotion, priority, and finance and billing. All right. So, let’s build the whole system step by step. As I always say, we shouldn’t build it first. we should map it out first to then have a strategy or an action plan when we build it cuz it makes it so much easier for us. I’m going to go here and for every automation that we do, we have an input and we have an output, right? So in this case, the input would be the email coming through. So watch emails. Then we want to classify the email, right? Cuz we want to have that first before labeling it and before writing a draft email that will then be drafted into our inbox, right? So we have this stuff right here. We have uh label email or was it classify email? Yeah, classify email. And we can classify it based on support. We had what was it? Priority. We then had urgent. No, that was urgent. Was it urgency? Promotion, finance and billing and priority. Yeah. Promotion, finance and billing. Right. So we are taking the new emails that come through from our inbox. We’re then sending it to an AI to classify emails based on whether they are support, priority, promotion, and finance and billing. Then what we’re doing at that point is we are sending it. Let me put it here. We’re sending it to the appropriate AI agent to AI agent to correct AI agent. No, actually no, we should label the email first, right? label the email and then we use AI agent to draft email reply and then we actually draft a reply to inbox. So that’s I think that’s the I think that’s what we want to do. Keep it simple, right? We’re getting an email. We’re classifying it. Then we’re sending it to the appropriate AI agent to do its own thing to label it first. Or you can do the you can do the inverse as well. You can generate a reply and then label it. But I like um it’d be easier to just label it first and then draft it. And then we actually draft a reply to the inbox. I do think though that when the email is urgent, we shouldn’t draft a reply to the inbox. We should send message to team on Telegram. Okay, because the fact that they’re urgent makes it so that we have to notify our team to do its thing to actually go there and and and check it and send it through um or reply themselves, right? In that case. All right, so we’re going to use this when we actually build the system. So, let me go to a new workflow. All right, I have a new workflow right here. I can put email classifier AI agent. And now the way that we start is with the first step. So, the first step is watching your emails. So, I go here and I go to Gmail because that is a provider. If you’re using Outlook, I believe that you can do it. Outlook or message received. Yeah. So, you can do it. Um, but we’re using Gmails because we’re Google folks. And then the first step of the automation is a trigger. So, the trigger is what is a thing that starts automation? Like how do how do we start it? Well, in this case, we only have one trigger, which is a message received, which is basically saying, hey, when we receive a message, in this case, a message is an email, then we start the automation. And the first thing we have to do is connect our account to Naden. All you have to do is create a new credential. You can press sign in with Google. This will take you to this page right here. Choose an account and then bring it back. I already have it connected which will be JM solutions email. And now we are given different options. So we’re given poll times which means do you want to check it every minute? Do you want to check it every hour, every day, every week, every month, every X? Custom. In this case, we can just do we can just leave it leave it blank. And the event itself will be message received, right? Because that is the action that we’re doing. We’re receiving a message and then we’re starting the automation. Simplify just means you want to simplify the data that we get through. And I’ll show you exactly what what that looks like. And that’s it. So, we’re going to need to test this by sending ourselves an email to the inbox of the email that you connected the Gmail with. So, I’m going to go here and send myself an email. Customer uh support question. Hey, what’s your return policy? I’m going to press send. I’m going to go to my inbox. All right. So, we have the email here. Customer support question. And now I can press execute workflow. So, this is now testing the the actual automation because when we build automations, uh even AI agents, I mean everything in general with N, we want to be able to test every single time. So we have this here. This is the data that we got. Hey, what’s your return policy? I believe this is because we put an apostrophe and this is how it um classifies it. I’m going to pin this so that when I go to the next steps, I don’t have to rerun the automation every single time. All right. Now, once this is done, I can go to the next step. So this is green to classify the email based on whether it’s support, priority, promotion, and finance and billing. I’m going to go here, press plus. I’m going to go classify text classifier right here is actually a pretty good feature. I’m not going to lie. Um because we are as in the system is set up so that we give a text which is the snippet which is the actual email and then what we do is we start adding categories. So categories would be maybe support and you put a description of what a support email is. So this is for support emails asking just general questions. Then category you can do priority can do email required attention action typically from key stakeholders clients ASAP immediate deadlines all that stuff. Then we have the next one which is uh promotions we go here promotions and then this will be emails related to marketing campaigns and so on. The description emails related to finance matters such as invoices, billing statements, payment reminders uh or expense reports anything involved transactions and so on. Okay. So again we have the support which is this and I’m going to paste the one that I had before because it is more sophisticated. So emails related to ongoing communication with current clients or including stakeholders including service requests feedback support tickets and inquiries keyword requests in so we give it a few examples of also keywords. Same thing with priority promotions and we have financing and one thing we also have is the system prompt template. We will leave it like this. I think it’s pretty good. Please classify the text provided by the user into one of the following categories. Categories which is the ones up here and use the provided formatting instructions below. Don’t explain and only output the JSON which is perfect. So now if I execute the step a model sub node must be connected. Right? I don’t know why I’m tripping but we have to connect the model to this because it is run by AI. Uh and feel free to choose anything even open AI is fine. In order to connect your OpenAI, make sure to go to platform.openai.com. You can go to the dashboard, go to API keys, make a key right here, and then copy the key and bring it all the way back to and then connect your account pressing it. Once this is done, you’ll have your account connected. You can use 4.1 mini. We have different models as well that we can use. I think 4.1 mini is great. In my previous video, I spoke about how you can use open router, which is the thing that allows us to be able to choose any model that we want without having to make a cloud connection, open connection, everything else. Check it out here. Um, good video. But now we use OpenAI. So now we can execute the step. This should now work. And we can see that these are all the branches that we have. Support, priority, promotions, finance, and billing. and it went down the support branch because the question was hey what’s the return policy? So that is a support question. So as you can see here we have different options right cuz we put different categories and each category represents a path that the automation can go through right priority promotions finance and billing. So what we’re going to do now is we’re going to go to the next steps which is not this this is green labeling the emails right and so if I go to here I can then add the node which is Gmail I believe this is add label to message same connection the resource which is what is the thing that we’re actually manipulating it will be message the action that we’re taking is operation the message ID it’s something that you can actually get down here so this will be uh ID and if that’s not the right one then we’ll change it later but I believe this yeah this is ID and then the label names or IDs you can choose from your inbox right here right now as you can see here I already have the different labels so if you don’t see them here it’s because you didn’t add them here so if I add let’s say test right if I press create now I have test if I go here I should be able to see test. Let me refresh. Actually, it doesn’t show immediately. There you go. Test. Right. So, it’s only because you don’t have them here that it doesn’t show up on NN. So, make sure to add your labels to your emails uh to then be able to see them in your automation so you can add them to the inbox. Cool. So, now this will be the first category which I believe is support. So, support. There we go. You can do label equal support. What we’re going to do now is we’re going to hover over this and we’re going to copy and paste. This will be priority. High priority. Yeah, priority right here. Change the name to priority. Same thing with here promotions and then finance and billing. You could you could put a Gmail label thing every single time, but just to save yourself those few minutes, you can just copy and paste. Here will be promotions. So, this will be promotions and this will be promotions and down here will be finance and billing. Finance and billing. And down here you can put finance and billing. So now in theory when it classifies it, it should classify it and actually label the email on our inbox. So if I pin this, I should actually no, never mind. Let me not pin this. Let me just run this execute workflow. This should now classify as support and this should be labeled as support. So if I go here, the email that we received, customer support question, this is now labeled as support. As you can see, it just changed. So which is good. And now that we know that this works, we can go to the next step which is um using AI to draft an email reply. So in order for us to draft a reply, we can use the AI agent because the thing is we can also connect it to the tool which is draft an email, right? So it does two in one. It drops a reply and also draft it in our inbox. So the first thing I have to do is create a chat model, right? And connect it to our chat model. One hack that we typically do with AI agents, especially when you have five or six is you connect them all to the same tool. You could just duplicate it here. You can just go delete and then choose Open AI. But for it to look less tools and less stuff on the screen, you can just drag it across here. So now this is connected to the chat model. Then we’re going to go inside here. We’re going to name this uh customer support agent. The user message will not be chat to node because we’re not chatting to it in this case. We are just defining it below. And now here I should add the text for the email. Okay. I think we’re missing something. I think we are because if I go here I don’t actually see the text. I see the snippet but the snippet is basically the the cut version of the email. So if the email is longer then it will cut it. It will give us a snippet of it. So all we have to do I think is simplify. Yeah. I’m going to run this again. Uh, I’m going to send myself an email. What’s your policy for returns and what do you guys do as a company? I’m going to press send. As you can see, we have the email right here. Uh, customer support. And now, if I go here to end it in, I can fetch test event. Okay, there we go. So, when I added simplify, it didn’t show me all these things, but we want the text. Like, we want the actual text. Perfect. Let me pin this. If I go here to the AI agent, I can give it the uh email text. and email from. Or maybe I do the opposite. Yeah, I do the opposite. Uh, email from and email text. Gmail trigger the email from. Let’s see if I can just go here from there. We go from and then the email text will be this, right? And this is what we give the AI as a user message because there’s two types of messages or prompts in this case. There is a user and there’s a system. The user in this case is like what is the thing that we’re giving it every single time as in variables that change. Then we have a system message which is simply the instructions, right? So we give it the information on user. We then give it the instructions on system so that it uses the instructions with the the variables that we give it every single time to do the task. And so right here I’m going to paste the prompt that I have made before and go here expression go big and then paste it. And so for the system message I’m going to go full screen. I’m going to say we typically structure our prompts with an overview. Then we have tools and then we have rules. Tools and rules. So overview would be want to say you’re a customer support representative named Kelly. Your job is to respond to customer inquiries in a friendly and professional manner. Then the tools. So what is it? What tool are you connecting to this? Well, in this case, we’re connecting the draft email, right? So if you go here to each Gmail, we can do draft message draft or was it draft? Yeah, draft here. Create the draft. The subject line, I’m going to let it do its thing. Like this basically means let AI define this based on the context that it was given. Then the message as well. let the model define this parameter. This is great for us because we don’t have to give it a variable every single time. We can just press this button which makes it so much easier for us to draft emails and reply things back uh because of this feature as well. And then we’re also doing the email to email two. And the email to will be the email that we get the email from which will be this right here. And also in addition to that we want the thread ID. Now the thread ID makes it so that when we go to let’s say support here. Yeah. You see how it replied on the thread. So the thread just means in the same conversation because the opposite of that could be that we have this just as a reply as a draft on a separate email but it’s not in the same thread. So this allows us to be able to have the same conversation. It’s sort of like a chat ID on on Telegram. Um it’s the same. So we can say uh thread ID and we can find a thread ID. Where can we find it? There we go. Thread ID. This will be the tool that we use that we connect all the tools to cuz again just like we can connect the child model to the same tool. We can also create a draft and email tool and we can connect that to all the AI agents who make the emails. So in this case we have customer support agent with a small G. I don’t know why it’s pissing me off. Um and then we have this is it. So I’m going to test this. I’m going to go execute workflow text to classify. Oh, okay. Okay, gotcha. Because we also have to change this. So if I go here text and then replace this again. Make sure this is not simplify because simplify gives you less variables. Um I want to press execute workflow again. This will not classifies it. It will label it as support and then it will use the AI agent to reply an email or to make a reply. I’ll put subject line. Now, the one thing that I don’t know why it didn’t do is it didn’t call the tool. I know why. Because we didn’t tell what tool it needs to call. So, I’m going to rename this draft email. I’m going to go inside. I’m going to go in the prompt and I’m going to say draft email. Use this to send an email reply to a customer. Always sign off as James from ABC Corp. And the rules is keep the emails concise. That’s it. Keep the email concise. Um I’m going to execute the workflow again so you get to see how it now calls the tool. It’s all prompting, right? Like AI agents are all prompting because if it wasn’t for the prompt, it wouldn’t have called this tool. The text right here, I believe. Yeah. Return policy. What’s return policy? And this is the answer that it gives. A return policy allows customer to do XYZ. All right. Now that we have this, we can now replicate this for pretty much all the other agents. I’m going to copy this. Going to paste this. Going to paste this here. Going to paste this here. The only thing we have to do is that for label priority. Let me actually see if I can change the order. Let me change the order here because I want priority to be first cuz priority goes to a different way. Let me go here and put a space. Paste this. then go back here and then this be the thing here. So I just switched it because I want priority to go to goes first and then support to go second. All right, cool. Now that we have this, we are able to then rename the agents. So the chat model here will be connected to here. This will be connected to here. It looks a bit messy because we need to space it out. So let me space this out a little bit. Let me go here. Chat model will go here. And now I’m going to add this here. Put this down here. It’s also important for you when you build automations for it to actually look clean or structured. Um, so it makes the I guess visual when you’re debugging it and so on a lot better. Um, and so now we have customer support. We can do promotional promotion agent. We can do finance agent. [Music] Let’s hook this up to the same tool, right? Because the only difference really is is the label, right? And then we make a reply, but and we do have to change part of the prompt, right? So, we have to go inside finance and say you are a finance support representative named Kelly to customer increase to finance increase. This will be promotional. So, you are a promotion no support representative to promotional queries. That’s it. And then this one will be priority and the message will be different. So I’m going to paste this. You’re an agent in charge of high priority emails. Your job is to summarize incoming emails and escalate them to the human. And the tool will change, right? So we’re not using the draft email anymore. We’re using Telegram. So in this case tool, we can search for Telegram. Telegram tool. And in order to connect to Telegram here, just follow the step-by-step guide. For the sake of time, I’m not going to be able to show you step by step how to do it. But if you follow these instructions, it’ll be good. And now you’ll have this. So the message is the thing that we’re manipulating. The the operation will be send the message. The chat ID, I don’t think we need it, right? To be honest. Yeah, we don’t need it. And the text itself will be defined by the model. I mean, we do need it, right? But we can define this. We can we can let this be defined or not, right? If I’m wrong, I’ll we’ll fix it. But there we go. Reply markup none. Okay. So, Telegram. And what I’m going to say here is you’re an agent in charge of hyperarities. And the tool you’re going to use is Telegram. Use this email to send the summary of the email once it’s summarized. Look at that. English. Use this email to send the summary of the email once it’s summarized. That’s fine. And now what we can do is test it. to test this right here. I’m going to go here. I’m going to press this little pencil right here, which basically manipulates the data. I can go. Okay, I think we’re cooked here. Received. Where’s the text? Text. There we go. Want to take this out and say, “Hey, there we have a client emergency. We She wants to know or they want to know how much we charge urgent. Well, actually, let’s not put this cuz that’s clearly obvious that it’s urgent, right? I’m going to press save. And now, if I execute workflow, this should send Telegram message, but it didn’t because the chat ID, I believe, was wrong. Chat not found. Okay. So, what we have to do here is this. Yeah. Yeah. Yeah. Okay. Okay. Okay. Cool. Cool. Yeah, cuz the chat ID here isn’t is a number. It’s not it’s not text. So, it doesn’t it doesn’t categorize it as that. Yeah. So, the problem here was that the chat ID it gave it as urgent emails, but the chat ID is numbers. So, that’s wrong. So, what we have to do is we have to use Telegram. Go here Telegram and follow me through here. There’s a clear thought process to why we’re doing it. Uh we’re going to um actually let me go back add another trigger telegram on message received on message un message. Yeah on message I can now go to telegram I mean we can see that the worked right like the email was sent. Um what I’m going to do though is I’m going to execute step. So this is now watching for yeah watching for messages. I want to say hello. Okay, with this here I can now get the chat ID. Okay, so now if I get the chat ID, I can then move this. I can hardcode it right here. So the chat ID can be the same, right? Because it can be in the same exact chat that we have. Um, so let’s try this again. Let me go to execute workflow. And here we should see an email coming through at any time. So hybrid email from authority a client emergency requires XYZ. And we can remove this. So we can remove this message was sent automatically with Nitn. I believe it’s here. Add fields append edit and attribution. We can turn this off. Okay. So we got to see the message was sent successfully. And now let’s try with let’s say finance, right? So let’s say we send ourselves an email. Say hey there. Can you provide us with the billing statement? Um James want to press send. All right. So we got the email billing statement. I can press execute workflow. They should now send it down here. Finance and billing. It should label it. It should make a reply a draft. And then I should see it right here. Finance and billing. Finance and billing. Right here. I can see that we have uh information. Now, one thing that you should be asking yourself here because if you’re not asking yourself this, then I don’t know. Uh this is obviously hallucinating, right? Like let’s be honest, like how how this can’t be accurate because we’re simply using AI which is not trained on any data. And so to mitigate this, what we would have to do is you can add a step right here where we can basically pull in information from a superbase. So you can have superbase back to the store which is trained on all our company’s data and then we can then pull the information and then draft the reply cuz then we have context like the the actual agent doesn’t just hallucinate because obviously this right here we’ll prepare a billing statement and send it to you shortly. This is obviously not true and so this just makes it up and so in real life in actual business you can’t have something like this specifically you would need an extra step here of pulling information from a vector database which is a basically like a Google sheet that’s better which you pull information from before sending it to the client before actually replying to the client because it actually is accurate right at that point. So that right there is a full email classifier AI agent built inside of N8N. In today’s video, I’m going to show you step by step how I built a full AI powered blog generation system inside of Naden that can write highly effective wellressearched blogs by a team of AI agents. All right, so this right here is the system. I’m going to run it from scratch and show you exactly how it works before we uh go step by step and show you how I built it. I’m going to press execute workflow. I’m going to put the post topic. Let’s do AI in finance and let’s do investment bankers. So the post topic for the blog is am finance. Then we do investment bankers. Let me just finance. There you go. And ton of voice will be direct. So these are the three different inputs that we give it. We press submit. What this will now do is it will send the information to the first AI agent which is a new letter expert which basically does research on the topic that we’re doing. Then what we do is we generate an outline using an AI step which will then be split into four different parts because the outline has four different parts of uh of the blog. We’ll have a research agent which is this one right here which will do more research on the actual topic that is written on that first paragraph or first section of the blog uh and second and third and fourth as well. Then what we do here is using the outline which is split up into four different parts. We send it to the research agent which is this one right here which is now doing research on each part of the blog using perplexity and it’s actually writing the snippet for that specific part. Then what we do here is we merge the output from here and here as well. We aggregate them which means we put them all into one place before sending it to the editor AI agent which in this case is an AI agent that will edit the actual newsletter. So that’s that’s going to be the final version and we use cloud here because claude is a better model to write content. Then we use just an AI step to generate a title and then we send the actual newsletter to our inbox. If I go to my inbox and on my inbox I can see that I have generative AI transforming investment bank operations and this is the full blog that we use. And a good thing about this is that it uses it actually references which sources. If you go here to two, it references the source that we’re using, right? Also, you can see down here first, second, third, fourth, fifth, and sixth. And this right here is just a prompting thing. Um, and now you have a fully optimized blog which gives us highly in-depth research from the top sources, from top credible sources that we can use. And a good thing about this is you can have this running daily cuz right now we have a form, but you can replace this with a Google sheet that will have different topics and then a ontime schedule, which means that it will run every week, every day, and so on. And you’ll have a fully optimized blog in your inbox. So with that said, let’s see exactly how this works and let’s go step by step. All right, so let’s go through the first step which is the form input. So we added a form. Again, this can be any kind of input, right? The form is just the easiest because we can just simply execute step and we can have access to this form right here, which is a very very simple form that we just create natively within NN. And for the forms itself on NN, we have the test URL and we have the production URL. Now bear in mind the test URL is just the URL that you use when you’re testing. Okay, hence the name test URL. when you’re going to production, which means that you are turning this on, you’re activating this, that’s when you use the production URL. So, in theory, what this would look like is you wouldn’t have to go inside here and press execute step and run the whole thing. You would just activate it. You would use a production URL, and that’s the thing that you paste into your browser when you’re doing whatever you’re doing, right? As you can see here, this is not activated. So, this is deactivated. Um, so we can’t see it. Then, we have authentication right here. here and authentication can be used to basically add a password between the person that wants to fill out the form and actually filling out the form because if you don’t want anybody or if you don’t want everybody to have access to the form then you want a password. Well, in this case we can just leave it blank um cuz this URL is pretty unique. Then we have the form title in this case newsletter form and then these are the fields. So the fields is what are we asking the user to fill out? In this case, we are asking the post topic which is in text field and a placeholder can be VI and finance. Placeholder just means this, right? So if you execute a step, this is a placeholder which means what is a thing that they see and typically you add this as inspiration for what they could add. Right? Let’s make this a required field actually. Target audience text required field and then tone of voice drop down. So we have three different choices. So we have authorative uh tone, humorous and direct. These are the three different choices. So this will be the input again when we press execute workflow. This will execute the actual workflow. So I can do AI in computer science target audience 50year-old men tone of voice can be authoritative. And then we see here that this is the answer that we get. Okay. And this is the variables that we then pull into the next step. Now I’m going to pin this so I don’t have to rerun it again every single time. The next step we’re doing is we’re setting variables. Now honestly you don’t have to do this. I don’t know why I did this to be honest. Um, you can go without this, but I just wanted to set the variable topic, target audience, and tone of voice for no reason actually. So, we can actually delete this. Uh, but because this is connected to all these, then it makes sense to have this. I typically have this just to have things organized. Um, and basically what this looks like is we’re replicating this these variables to just have topic, target audience, and tone voice. And typically why you do this is because on the form submission, we also get the submitted at form mode, which is extra variables that I don’t want to see. But at the same time, you can go without this because I mean these these fields are only two fields, right? There’s not a crazy amount. Um, but we usually use set variables when we have an input, which is a ton of different variables. I think you use like API or any of these softwares, they give you like a 100 variables and then you basically want to extract the variables that you actually need and that’s where you use a set variable. In this case, it didn’t make much sense of why I used it, but you can still use it cuz we don’t get charged by step, we get charged by execution. Then we have the first AI agent which is a newsletter expert. We can use a tools agent. There’s three different types of agents. OpenAI functions agent which uses OpenAI to just do its thing. Conversations agent so you can talk to it. We leave this as tools agent because we are using tools with the agent. Uh the source prompt which is what is the input that we’re getting. In this case, if I execute the previous nodes, I can see that the input is this. So we give it the prompt user message because every AI agent has two different types of prompts. Okay, it has a user prompt and it has a system prompt also assistant but the main ones are user and system and the user prompt in this case would be what is the variables that we’re feeding into the actual AI agents operates to do its thing and a prompt user message here is what are the variables like newsletter topic tone of voice and target audience which we’re pulling in from here that it uses to actually do its thing right so that’s for the user message and then we have the system message now the system message is a prompt that gives it the instructions, right? The instructions for the thing. It doesn’t actually give it the variables because the variables go in the user message, but we give it the overview, the context, the instructions, the tools that it uses, um, examples as well, input, output, input, output. So, these are assistant prompts because we’re giving it an example here, example here, example here, example here to make it, I guess, to give it more context as to what we want to do. Uh because sometimes AI it’s so creative sometimes that it just spits out what it wants to spit out. So if you give it a few example, it sort of like guides it. It narrows down the the focus that it needs to have when making the blog for you. Um and so this is the full prompt and again at the end of the video I’ll show you exactly how you can get the whole system for free. So don’t worry. Uh but you can also take a screenshot of this and drop it into chatbt and ask it to extract text. Uh that’s what I used to do all the time. And now you have the system message right here and you have the user message. And we can see we ran this before and this is the output that we get. Of course, this is cut. But if I go to JSON, I can see here that this is a full thing. So table of contents. So we are generating table of contents for the newsletter, right? And we’re using perplexity as a tool to do so. Why is because you want to do more research on the actual topic to then give it proper table of contents. And table of contents is like okay, what’s going to be in the actual newsletter? What’s going to be in the blog? Once we have this, let me pin this. Then we go ahead in the next step which is generate an outline. And here we’re not using an AI agent. We’re just using a simple step. Now to connect your OpenAI to NDN, all you have to do is press create a new credential. You can go to platform the openi platform.openai.com. You can go to login, choose your account, and then you want to go to dashboard. Get your API key right here. Press this button. Get a key. you can copy and paste back right here. Bear in mind this is not free as in you still have to pay for this. Um and you pay for this using something called an API credit. Now the API credit is something that you can see where is it billing the left hand side and you will add money here. It is very very cheap. So it will only cost a tenth of a cent when you run this. Um so but make sure you have about $5 cuz that is the recommended amount that we use. All right. Now that we have this, we have connected our OpenAI to end. We can use text because that is a thing that we’re manipulating. The action that we’re taking is messaging a model, which means that it’s sort of like we’re going to chat GBT and we’re typing something to get an answer back. Then we’re using the model 40 mini because it is the um we’re going for like speed and quality, right? And a 40 mini is great. And the prompt is this. Your job is to split out the table of contents into an individual item for each section. I’ll put each section separately in a field called newsletter sections. When doing so, keep in mind that the newsletter target audience is this and the tone of the newsletter is this. So now we’re pulling in the variables from here separables. Here’s a table of contents. So what we’re asking it to do is this. We’re asking it to basically get the table of contents which is a block of text and then output an array. Right? An array I’ll show you exactly what it is. An array is a something right where it contains different items inside that something. So in this case it contains the four different sections. Uh each section has a title and has a description. Title and description. Title and description. Why do we do this? Well you can simply and by the way this whole system you can simply replace by just using one prompt from TGBT to make a blog. But because you want to make it higher quality, right? And go through basically generating an outline and taking each bucket of that outline. What I mean by this is taking each newsletter section and then giving it to AI to do research and then making it more optimized and then making it better, right? And so what we’re doing here is we’re asking it to take this text which is unstructured because it’s a block of text which doesn’t make much sense to us and we can’t really do anything with it and then giving it to AI and saying hey take this block of text that we have here. So this is the input and basically split it out. So I want you to split out an array which is something that has different items in it. And you know it’s an array because typically has a square bracket. Square bracket. Yeah. Square bracket here and here. And inside the square bracket there are a bunch of items which is this and here. And then this and here and this here as well. And same thing with this, right? And so these items are all pretty much the same. And those are the four items which means that there are four table of contents, four different parts of the blog that we want to iterate. We want to split out right each one and then use each one for research. Use each one to write the blog and use each one to make the blog better. So once we have this then we can spit out right. So I mentioned that we let me pin this. If I press this you can see this is now four items. Why is because the array itself is best for us to use when we want to get the array which can be found here. So if I go here new set section this now will split up four different items first, second, third and fourth and that’s exactly what we then feed into our AI agent which is a research agent right here to do more research. So the input of course is a tools agent because you’re using tools. Uh the source prompt is user message which we’ll define below. And then the user message itself which is what are the variables that are going into the AI agent for it to use to do its thing are the section title which is this section description which will be this right here. Where is it? Generate outline. There we go. Description newsletter target audience which should be this right here. The target audience. There we go. And newsletter tone of voice. And so we feed all of this in so that it has context as to what the actual section is, right? And so this being the user message and this is a prompt that we use for the research agent. And so we have an overview which is you are an AI agent responsible for delivering only the final content for a newsletter. Then we have context uh which is all necessary details including the section title, the description, the target audience and the tone will be provided. then the goal and the content must be supported by research and then we give it instructions and this is usually how the the actual prompt goes right we have overview context instructions now in this case we have tools it’s only one tool because we’re connecting this to perplexity to do the research and with that said we have citations examples so we give it examples and SOPs as well and this is a very very good prompt as in it has markdown formatting which is the hashtags which is basically saying hey this heading one, this is heading two and so on. And then it has a bunch of stuff as well. So rules, guidelines, all that stuff that he needs. And from here we start using claude comparison to OpenAI right here because claude because now we’re actually writing content, right? And Claude is the best at content. And to connect your cla account, press create a new credential anthropic console. And then you can go to get an API key. You can go to create an API key. Just name it whatever you want. You get a key that you can then paste back here. Now 3.5 set is one of the best for content. Let me actually search it up. Um, which cloud model is best for content? I believe it’s 3.5 sonnet. I think so. Not cloud cloud. Let’s see. Cloud. Showing you guys the full raw content. Uh, because that’s what it is. Claus Opus 4. Okay. Cloud Opus 4. Do we have that available to us? I don’t think we do. Yeah, we don’t have an API version. So, let’s do API model because not all models are given to us for an API. Um, Cloud 4 generation, Opus 4 and Son of 4 are hybrid models. Opus 4 is the most scalable. Yeah, son of 4. Son of 4 um is designed for speed plus quality as well. And since we don’t have four here, we’re just going to use 3.5. And that’s the thing that it uses as its brain because again an AI agent usually has a brain which in this case is LLM and then it has tools that is connected to which are in this case perplexity the thing that it actually uses to take action. And if you want to build your first AI agent from scratch check out this video up here. Once we do here is we run this what this will now do is it will go through each section one by one. So four different items at the same time. Not at the same time obviously separately. And it does research on each one. And the reason why we’re adding two different inputs is because the first input is the actual research that it does. And the second input is the description. All right. So now we finished the actual research. And bear in mind that each section of the blog will be researched, right? And that’s what this does. So I’m going to pin this so we don’t have to rerun it again cuz it does take a while. Obviously got cut in the video, but I’ve been here for about 4 minutes waiting. Um and now with the merge node what we do here is let me press execute step. This will now get the output of the research agent but it will also get the title and the description. So the merge node is usually combining right two inputs because you have one and two and we’re putting them all together. So you see how it went from here, here, and here to all three right here. And these are four different items, which means that it does it for every single section of the block. All right. Now that we have this, we can then aggregate it because we don’t want to send four items individually to the editor AI agent. We want to send all together, right? Because we have four items. Let’s put them all together. And as you can see by the diagram here, this node right here is to take all the different separate items and put them all together into one paragraph. So let me go here execute step and here we get all the titles and we get all the outputs because again four items for the four outputs in this case for the research agent and that’s why we put individual fields the input field name will be title because it’s title. Same thing with output which is this one right here and that’s what it takes to merge the list. Again merge list just means merge everything together like this. So, we’re able to then feed it into the editor AI agent which will be the thing to actually write the blog, right? To actually put everything together. Um, it will be a tools agent. The prompt will be the list of titles and the list of article content which we get from here and here. So, we’re giving it, let me show you this. We give it this a full user input. So, it’s going to be a big prompt plus we give it a system message as well. So, the system message will have an overview. So, you’re an expert editor specializing in creating and planning content to output a high quality formatted article. You’re given a list of titles and outputs and you will use these to create a newsletter tailored towards the defined target audience. Create a section in the article for each title with a hyperlink source in each section based on the content. So, when I was making this workflow or this AI agent, I thought of the fact that obviously you want to have insight, what’s it called? Hyperlink um yeah, hyperlink um citations. So for example, when you go into the actual word and then when you press that word, it goes directly to the source of that news. And that’s exactly what this is. This is a fancy way, a HTML way of saying, hey, this is the URL that we’re giving. And this is the name of the actual thing that when we press this, it takes us here. And so that’s what it is. And we have the objective as well to create content. Uh we have the citation management. We have the source section. We have the output format. We have a ton of stuff in this prompt right here. And then we want to output a thousandword maximum or else the automation breaks right because there’s a limit. Uh and today’s date is this. Why do we give it to today’s date is because sometimes within the actual blog it needs to sort of site um it says tomorrow, right? Like how does it know what today is? AI is not the best at this. So that’s why we give it the actual date. So now with this prompt right here, I can press execute step. This will now give all of this and these uh this prompt right here to be able to give us a final optimized sort of blog that we can use to send ourselves an email. All right. So, we have the output right here. You see here with all these lines and and P’s and A’s and H2. This is called HTML. HTML is basically the way that we make our text look pretty. You know, when you see emails, when you get emails with headings, you get with colors and beautiful things. That’s all HTML, right? And so we want to do that because of the fact that we want headings, we want a text when you press on it, hyperl, right? You press on it, it goes to the source, all that stuff to make it look pretty and to make it look more formatted. We use HTML. And then we use another AI right here, which is an A step. Again, same connection. Message a model for mini, which is fine. And the prompt is create a title for the incoming newsletter. The tone of the newsletter is authoritative. The target audience is 50-year-old men. And here’s a newsletter. So, we give it the full newsletter. And then we say only output the title in plain uh in plain text, no quotation marks, and capitalize the first letter of each word. Example, is artificial intelligence a friend or foe. So, basically, this is making the title for the newsletter, which we can then feed into the subject line of the email that we’re making. I can press execute step. This now gives us the actual content, which is the title of the blog. quantum computing and AI transforming the future of technology and that’s the thing that we would use to then be able let me pin this to send ourselves an email so in the email section just connect your email and go here and sign in with Google connect your account bring it back and you’re all good and then the thing that we are manipulating is message the action that we’re taking is we’re sending the email that we’re sending it to of course is my personal email the subject line in this case will be the title here right will be this right here content we bring it across here and this is Now the title that we use and then the email type because again Gmail gives us two options whether you do text whether you use HTML. Well, in this case, because we wrote the email in HTML, then we get this, right? We get a full thing, which is the thing that you saw in my email. And then we want to turn the append attribution off, which just means that usually when you send yourself an email, at the end, it will say NN send this or sent by NN, right? We want to take that off. And as well, we want the name of the actual person to be daily newsletter, which is why we add here sender name daily newsletter. All right, we can just test this execute step. What this will now do is it will send us another email. I go here and refresh quantum computing and AI. And this is a newly written email with hyperlink text that I can go here and I can go to the actual source of the research which is amazing. And it has headings. It has more research. And the citations are coming from credible citations, right? Which are great to have. And at the end we have sources as well. here. And now this you can use as a way to keep yourself updated but also to post it on your you can say on WordPress or any of the sites that you make blogs in, right? Because you have a ton of research, a ton of value that you can get because this workflow right here is a series of AI agents. And the reason why we do a series of AI agents is because when you break things down and you actually go in depth into each topic or each section, the quality is is just much better. And so as I mentioned before, you can have a form which is the input which is the thing that what do we feed in to the actual system, but you can also have a Google sheet that you can run through every single row and you can then add a you can say on the schedule right here at the start which runs maybe every day right so every day and then it runs and then it takes the topic from a Google sheet and then it runs through the whole system step by step. Now, within our agency, we’ve implemented these sort of systems, especially with blogs and content into tons of businesses just because of the fact that businesses know they need to make content, yet they don’t have the time. They use AI anyways. So, might as well automate the whole process and save them a ton of time and make it actually valuable and and with actual research and with good prompting so they can actually get results. And so these systems right here are perfect for them because it allows them to have such an efficient process to generate this content that can either be sent to our email that can either be sent to a WordPress. WordPress is just the way that you host your website. You can have blogs on your website, blogs on LinkedIn, blogs on whatever platform you use. Uh that is highly effective, highly researched, well researched, right? Cuz if it is well researched and so this system is great because it saves the company tons of time into making content and we know it’s good because we have good prompting. which companies usually don’t. Hey, in this video I’m going to show you step by step how you can build your own research AI agent inside of Naden. And the best part is that it actually takes less than 5 minutes to set up. So I’m going to show you exactly how it works, how you can set it up, and how you can use it within your automations. So if that sounds like something that you want to learn, let’s dive in. All right, so fundamentally we have an input and we have an output. This is the same exact structure as a normal AI agent and the input could be research XYZ. Then the AI agent has system prompt or instructions. System prompt just means what is the thing that we tell the AI agent to do. Um and it can be hey research this or if this happens then call this or do something else. And the output would be the actual research. Now between the input and the output the AI agent now it’s hooked up to open AI which is basically chat GBT and that’s its brain. That’s how it thinks. And then for its tools, cuz tools are like the things that the AI agent calls that it sends the request to when it wants to get something back. Well, in this case, we’re using perplexity because perplexity is the research LLM. LLM stands for large language model. It’s like Chad GBT, Claude, they’re all LLMs. And this right here is specifically done for research. So I can go to Perplexity here. I can show you that this uh LLM is like Chad GBT. It looks like it, but it’s known for research. So I can say find the latest news on AI. What this will do is that it will get sources. It will start getting all the sources and it’s known for because it’s really good at finding research and it gives you the full breakdown of everything even giving you all the sources that it used for that specific research which is insane cuz it does research over 20 30 40 research papers all within seconds to give you an answer. Something that Chad GBT could do but isn’t meant or prompted to do. And so that’s what we’re going to use to connect to the AI agent in order to do the research. And again, we’re doing it automatically. So, we’re using the API version just like we’re using the API version for OpenAI. So, we’re just creating an AI agent that is hooked up to perplexity to do research and then we get the output. So, if I go to N, I can go to N workflows. All right. So, I’m currently in N10. I can go to create a workflow. As you can see, we have two options. And if you want to watch the video of me building it with AI, check it up here. But we’re going to press add first step. We can go to agent. Just press agent. And this is how you add an AI agent in any. So this is where we start configuring things. And so we’re sending the chat here. This will then send a signal to the AI agent. If I go inside, I can see that the user message, which is what is the thing that’s going inside the AI agent? It will be the chat input, which I’ll show you exactly what it looks like. And then after the user message, we can add an option. We can have a system message. The system message is the instructions. This part right here. And so that’s what we add here. We can say your helpful intelligent assistant that does research. I’m going to give it a better prompt later, but for now we can leave it this. And now, as we mentioned before, we have the chat model, which is what is the brain of this LLM? In this case, it can be openai, which is the one right here. And I can connect OpenAI to my account. The way to do that is to go to platform to openai.com. I can go to dashboard. I can go to API keys. And the API key is sort of like a password that says to an A. You feel free to use my API key for my account in OpenAI. In top right, create a new secret key. and name it. So it can be end. You can create a new secret key. Leave everything as is. No restrictions. And now you have this key that you can paste within any 10 and name it. I can name it Mikuel 15th of October. I can save it. And now I have my account connected. Bear in mind that this is not free. So you have to go to here to profile to billing and add money here. $5 is more than enough because it’s only taking on one/10enth of a cent, right? So, it’s fine. All right. Now that we have this done, we have this connected, we can choose 4.1 mini. This is basically the brain again, how it actually thinks. And now we can connect it to a tool. Now, we also have a memory here. And the memory is usually used when we are using the AI agent sort of like a chatbot like this. We want it to remember the previous conversation or the previous answer or question that we gave it as context for the next steps. Well, in this case, uh we can add it. So we go here I can put simple memory and we have context window length which is how many past interactions does the model receive as context. You can leave five that’s fine. And now for the fun part is perplexity. So this is how we actually do the research. So I can go to perplexity. You can go to perplexity tool right here which is talking to the API of perplexity and generating um responses with citations. I can go in here and we get introduced to this. Now you will not get introduced to this because you will not have an account. All you have to do is press create a new credential. And now you need an API key. So all you have to do is go to Perplexity.AI up here and you want to make an account. Once you make an account, you can go down to account. You can go to API and I believe that you have API keys on the left hand side. Right here you can accept terms and generate a key. I can do nitan research agent test. I can create a key. I can now copy it. and paste it here. I can say Mikuel 15th of October. Put it here. There you go. And press save. And now you should be able to see it here. And you have successfully connected any to perplexity. But as we mentioned before, just like OpenAI, this is not free. So you have to go to API billing. So you would have to buy credits. I think I put $5 on a few months ago and I still have it. $4.17. So it’s very, very cheap. And once you have this now you can actually use the API for tool description we can set automatically operation which is what is the action that we’re doing is messaging a model and you can do custom API call but in this case messaging a model just says hey I’m going to automatically go into perplexity I’m going to automatically type something and get an answer back and now we have the different models I’m going to go to perplexity API models to see the difference each one there you go models so here we have all the models and we have the search models mod which are inherently the models that you just use uh to retrieve information just like a general searching model which is the one that we’re going to use. We have reasoning so more for multi-step tasks and research. So this is really for conducting in-depth research. The only thing about this is that it does take a lot longer than uh something like sonar or sonar pro. So we’re just going to use sonar in this case. I’m going to try both actually. Um but let’s start with soner and then we can put it there. Can go inside and now I can change the model to again soner. We can use sonar pro as well. And now we have the user prompt. So the user prompt is what is the thing that we’re giving perplexity. So the sort of input right that it uses when it’s doing the research. So in this case, if we press this button right here, what this will now do is it will let the model define this parameter. So the AI agent is smart enough so that it decides what goes into perplexity for it to actually do the research for and then giving us the output. So I’m going to press this and we can leave everything as is. All right. Now we have this, I can test it. So I can go here open chat and I can say what is the latest news on why 95% of AI products fail. I can press go. What this should now do is it will talk to the uh perplexity tool and it will talk back to the openi to structure the output for us to get it back on the chat. So we can see we have the research here which is in-depth research. So you can see it’s pretty good research compared to something like chat GBT. The key reasons why 95% of a products fail, poor data quality, lack of business alignment, execution, cost, privacy, hype versus hard work. Uh, and then the 5% of a products that succeed typically is XYZ. So, we get a full report or full answer researched, right, which is actually pretty good. This is the thing that Perplexity is giving us back, right, which is the responses. We can see the prompt tokens, uh, the amount that it took us. So, 0.006, which is very, very cost effective. And in citations, so the citations that he uses, it actually goes to YouTube videos, which is interesting. Who is this? Let’s see. The AI bubble, why 95% of AI products fail, 1.1 million. It’s cool. Um, and we have more search results, right? Which we can then use as citations or as more evidence as well. And the content is what is the actual message back that it gives to the user with all the citations. You can see 247 obviously refers to um citation 2, citation 4, citation 7. So that’s pretty much how you can set up an AI agent uh that can do research. Now I’m going to apply this to a business use case. So let’s say we had a business which had a form on the website which you’re going to make and the form on the website asked someone to add their website, right? So they say, “Hey, what’s your name? What’s your email? What’s your phone number? And what’s your website?” Right? And so what this does is that it takes the details from someone filling up the form on the website and then it uses Plexity to do the research on that website before giving us an answer that we can add to our CRM. So let’s build it. This right here is going to be um the same because it’s pretty much standard. Uh I’m going to change the prompts a little bit, but apart from that it’s fine. And I can do on form submission because we’re making a form and this will be the first step in this case. I can go inside and I can put a name for the form which is website form. By the way, don’t worry about these. Test URL is just the URL that we use when you’re testing. Production we use when we set the automation to active. Authentication is if you want to put a password, but we don’t want to. Uh we have the title and this is please fill out the form with your details. Then we can add form element which is saying hey what are the questions? In this case we can ask them actually full name. Yeah. And we can say company name. We can say uh company website which is the thing that we’ll actually use. I believe that it has date checkboxes. No or email only. Um and that’s it. Right. We can just ask three different questions. Of course, a company would probably want to know what is your budget, what are you looking to to do and so on. But these are three simple questions. So I can execute step and I can say Mike authority company name is jmolutions my website is jmsolutions.com submit. This should now send a signal here with the details that we can then use for the next steps. So I can pin the information which means that now I don’t have to rerun it again every single time that I want to run the automation. And now the only thing that goes into this is not the chat input because you’re not chatting to it anymore. What we’re doing is we can define the user message below and again user message is the thing that we actually give to the agent every single time that is different. In this case it will be the company website and what we can do is actually do company website company name actually and then company website. Company name. There we go. Here company name. And there you go. company name and company website is the thing that goes into the AI agent for it to use when making research of that company. So I’m going to say you are a helpful assistant that helps to do research on new companies that come through. You could say that, right? Assistant. Yeah, you can say that. Uh and then let’s say uh for rules. So I’m going to say we are or actually the the research that we are looking for from the company should contain target audience and let’s do offer. So we want to know the offer of the company and target audience. That’s it. I believe this should work. Uh let’s see if it doesn’t. If it doesn’t, we’ll change the prompt. And now this will be the same. Yeah, this will be the same. Let’s test this out. Let’s go here. Well, actually, no. Yeah, we can’t use the simple memory because the simple memory only works when we using a chat model. So, when we’re chatting to it, like a chatbot. But in this case, we’re not doing it. So, we’re just using um these two. Let me press go execute workflow. You see how I didn’t have to fill out the form every single time. Now, it’s doing research. And then at the end, it gives us James Solutions targets SMBs looking to improve operational efficiency through innovative workflow automation solutions XYZ. Cool. Which now we can add to our CRM. So I can just make a new Google sheet. I can name it say CRM new website leads. I can say company name or full name. There you go. Full name. Company name. Let me zoom in so you can see here. Go X. I can do company website and research. I can make this black, white, bold, and reset to row one like this. I can still see it. Cool. And now I have to connect Google Sheets to any. And to do that, I can go here. I can press plus. I can go to Google Sheets. I can then append a row in a sheet. Append just means you’re adding a row into a sheet. Connect your account by going here. Just press sign in with Google, which will take you to this page. You can press your account that you are connected with and once you’re connected you can go to sheet within a document append a row because that is the action that we’re taking. The document would be CRM new website leads the sheet will be sheet one. Yep. And then the values to send. So this is saying hey what do we want to add here here and here every single time that it runs. We would like to add the full name which you can get on the left hand side on the form. So full name, company name, company website, research, and something more that we want to add is submission date. So submission date because we ideally want to know exactly what date and time they submitted the form. This now refreshes because it saw that I changed something within the sheet. I can then add submitted at right here. But the problem is that if I go if I press this to go full screen, this right here is very messy. And so what I want to do here is actually format it so it’s readable to a normal human who has no clue what t01 all of this stuff is. So what I can do is I can go in here and I can put dot to date format I believe and I can say what is it? Format date format. Yeah. Okay, cool. Let me go into the formatting guide so I can see how to make a date look normal. God, this is horrible. Let me see here. August 6th, 2014. This will be DD. All I have to do here is just put DD. There we go. 16th of October, 2025. And this will be the format that we add the date inside of the Google sheet. So now I can pin this data, which means that I don’t have to rerun this again. I can just press go. What this should now do is she would send the information here to the Google sheet. Mikuela James solutions with the website with the research which it’s very long. Let me make this a bit bigger. Why not go here you can then read about offer and who they’re targeting and submission date as well. So you get to know exactly when they submitted the form. And there there is a use case that you can use the research AI agent for to do research on someone when they come through from the website or some sort of input from somewhere else. And we built this type of system for a company before uh a bit more extensive. So a bit more stuff um but it did research on new leads that came through the website and then it looked at their social media, it looked at their website, it looked at everything that they had to then give it to the sales reps right in their CRM before the sales reps actually called the lead, right? Because they had more information. they were more prepared um before actually going out and selling to customers. In this video, I’m going to show you exactly how I built a voice agent inside of 11 Labs and connected it to Nitn that allows us to be able to send emails, get contacts, and schedule calendar events. All right, so on the left hand side, I have the voice agent in 11 Labs. On the right hand side, I have the AI agent in Nitn. I’m going to press execute workflow, which is now waiting for the voice agent to send information to the AI agent. And I’m going to go and talk to the AI agent here. Hey, my man. How’s it going? What’s up, brother? Um, can we schedule a calendar event for tomorrow at 5:00 p.m. with Michael James and just say that it’s for celebratory meeting? All righty. I’m setting up that celebratory meeting for you with Michael James for tomorrow at 5:00 p.m. Boom. Your celebratory meeting with Michael James is also for tomorrow at 5:00 PM. Is there anything else I can help you with today, you magn? That’s it. Magnificent. What? Magnificent. There we go. So, we have a calendar here and the name celebratory meeting scheduled for this email, which is Michael James, which you can find right here in our database with Michael James in this email as well. There you go. All right. So, we’re going to go through the whole process step by step. The first step is actually going to 11 Labs and seeing how we actually set this up. So, if I go here to the actual homepage, so when you make an account on 11 Labs, you will have this dashboard right here. All you have to go is here and you go to agent platform. So typically you’ll be in the creative platform which is for voices and so on. In this case you want to go to agent platform. Want to press agent new agent right here. When you press a new agent you’ll come on this page right here. And this is where you start adding all the settings. So the first message is what is the first thing that the AI voice agent will say. In this case as you can see by or as you could have heard uh by the voice agent it said hey my man how’s it going? And this is important because it’s the first thing that the AI agent says. Then the assistant prompt in this case is this. So, so we said you’re a friendly and funny personal assistant who loves helping the user with tasks in an upbeat and approachable way. Your role is to assist the user with sending emails and scheduling calendar events. When the user provides details like who the email is for and what it’s about, you will pass the information to any end tool and wait for its response. If the user tells you that he wants to schedule a calendar event, then you will pass the information to the N10 tool and wait for its response. Once you get the confirmation from any that the email has been sent, truthfully let the user know it’s done and ask if there’s anything else you can help with. And I can also add something else here. Once you get confirmation from any that the event was created, truthfully let the user know once it’s done. Now basically the way this works is that we have the voice agent that we speak to sort of like a person and when we give information to the voice agent what that does is that it sends information to our AI agent in any sort of acting as a back end to then do the actual thing that we told it to do and then send back a response right to the actual voice agent saying hey everything is good. It’s sort of like you have the CEO who talks to the head of sales. the sales guy in this case does the action then he goes back to the head of sales saying yeah everything was good and then the head of sales talks to the CEO right the CEO doesn’t actually talk to the um the actual sales guy because there’s a intermediate step there’s a step in between and so this is the exact same thing here between me and N10 it’s 11 laps is me talking to 11 laps which then speaks to the backend system which is N10 and so what we have here again is a prompt dynamic variables leave this blank llm I use Gemini 2.5 five flash cuz it’s pretty cheap plus fast. Uh the backup LM configuration, leave this as default. You can leave this as default. The thinking budget is fine right here. We don’t need to control any internal reasoning tokens. The temperature right here is basically controlling how creative do you want the AI agent to be. The higher the temperature, the more creative it is. The lower the temperature, which means it’s deterministic, so we can determine exactly what it’s going to say. It’s less temperature. Now, for voice agent, you want to be careful with this. You want to make sure that it’s not too creative because then it goes outside of the instructions that you give it. But you also want to make sure that it’s not too deterministic, which means that it’s not too fixed into the instructions because then we’ll have the problem that it starts sounding like a robot. Limit token usage. And so we’re basically predicting or we’re limiting the amount of money, the amount of tokens which equals to money credits uh that we’re using for the LLM. LLM just stands for large language model. is like chat GBT, Claude, Gemini, Grock, all these are LLMs. Then you can also add a agent knowledge base in case you want to add documents that you want the AI agent, in this case the voice agent to have access to when giving you back the answer, which is great. And now for the thing that we really care about is the tools, custom tools. So this is how we connect custom tools to any or how we connect voice agent to any. So if you can just press add a tool, you will get to this page right here. You have to put a name. In this case, you can just put N10. And the description is use this tool to take action upon the user’s request. And then the first thing we’re doing is adding a web hook. Now, for those of you who don’t know what a web hook is, a web hook is a URL, which in this case looks like this, which in any way to set it up is go here, add a trigger, and then a web hook call. So on the web hook call right here. And now this is a thing that is used when we want to receive a signal. So from the voice agent, we say, “Hey, can you do this for me?” It sends all the signal to the automation to actually do it. And that’s what a web hook is used for. Make sure this is post because post is the way that we send information. Get is the way that we get information. By get, I mean get here. Now, I’ve made a full video showing you exactly web hooks, HTTP APIs, all that good stuff. You can check it out up here. But that’s what we use to send information to the actual AI agent inside of N10. Response timeout is how long to wait for the client tool to respond before timing out. The default is 20 seconds. This is great in case your actual workflow, your AI agent inside of N10 has an error and it doesn’t actually send back the information. And so we’re just putting some precautions saying, “Hey, if it doesn’t send back the information, just let the user know. Leave this all as is. Leave headers the same, path parameters the same, query parameters the same. And finally, we have body parameters.” So body parameters are the thing that we say the instructions or the variables that we send to any AI agent for it to actually take action. So in this case there are three things that we have to send over. As you can see by the description I said ask the user to provide the name of the email recipient and what the email is about unless they already provided the information and ask them for the calendar event date and time if they’re looking to schedule an event. Now in terms of properties we have to send different variables to the actual workflow. Why? As you can see here, if I go inside the web hook, which is the thing that we use again to send the data, once we said, “Hey, I want to schedule a calendar event with Michael James, call it celebratory dinner at 5:00 p.m., what it did is that it sent the body parameters.” So, who are we doing the thing for? What is the event description? And what is the calendar event time? And so, these variables are crucial in making sure that the AI agent in N10 understands what it is that we want to do. and as well who are we doing it for or what other variables need to be taken into account when actually doing the actual thing and so in 11 labs we want to start adding properties. So the first property is two which is who the email is going to or who to schedule the event with or for yeah and make this required because we’re going to need this either way and leave this as an imprompt because we’re leaving AI to decide this variable right here. The second one is email content so what the email is about. I made sure that this is not required just because sometimes we want to schedule a calendar event and we don’t need to send the email content. So this is not required. Leave this as LM prompt because it allows us to let AI define this as well. I didn’t mention this but string just means text, right? In this case you can do integer number object array. We just want to keep it simple. This is literally just text that’s going into the web hook. So leave this as is. This is the name of the event for the calendar. Now that I’m thinking of it, this doesn’t have to be required because sometimes we just want to send an email. We don’t want to schedule a calendar event. And then finally, calendar event time, which is what the event time and date is at, which is not required, which is used when we want to schedule a calendar event. And leave the last thing as is. So that right there is just setting up the tool, which is all we really need in order to connect 11 Labs to Nitn. Now, once we have this, let’s go to Nitn and see exactly how it looks. So this right here is the AI agent that we’re using. In case it’s your first time looking at the AI agent inside of Niten, stop this video, watch this video up here where I show you the AI agent fundamentals. Trust me, it will make much more sense once you watch that video. Um, but essentially an AI agent is consisted of an input and an output. In this case, the input can be who are we sending the email to or who are we scheduling the calendar event uh for. Then we have the event description or we have the email content or we have all the different variables that I spoke to you about based on what the user wants to do. Then we have the output which is a message that is sent back to the voice agent saying yeah everything was good. Then we have the AI agent in the middle which is the thing that actually takes action right then we have the brain which in this case it’s open AAI it’s the way it actually thinks and then we have the different tools which is what are the softwares that are connected to the AI agent for it to actually do the thing that it needs to do. So the first thing is a web hook. We want to make sure that this is post because that’s the method that we use on the 11 labs. And when you get the data here, you will see a ton of variables. Honestly, I have no clue what any of them are. But the only thing that you really have to care about is the body. So the body is the actual variables that we get from the voice agent for us to use when we want to actually take action on whatever it is. And so we get in this case to Michael James event description celebratory meeting and calendar event time tomorrow at 5 p.m. And that’s all you need to then send to the AI agent with a user prompt which is usually a message that we give to the AI agent that changes every single time cuz in this case we have the prompt user message and we have the system message. The system message is more so for instructions. So we say hey here’s where you are here’s the instructions just follow this and then here is where we give the variables that change every single time. Now as you can see this is code right here but what this means is the person details so who are we sending the email to which you get from here if I make this smaller two if I drag this across I can see that is JSON.pbody.2 Email content is not something that always shows up depending on what the user wants to do. And calendar event time and event description is something that we add here. Event title and uh calendar event time as well. And so we drag these variables across right here. And again, if you want to add this right here, you would have to run the voice agent and tell it, hey, can you send an email? And that will send an email here. And it will give you this variable because this variable is only available when you want to send an email. And that’s it for the user prompt. So very, very easy. We just give it the variables and now we get onto the system message which is the instructions. Now if you get the full blueprint for free you will be able to have the whole prompt. So don’t worry um or else take a screenshot of this and then put it to chat GBT and tell it to extract the text from the image. But what we’re doing here is we’re using the typical prompt format which is overview. So you’re a friendly witty personal assistant who helps users send emails get contacts and schedule meetings XYZ. Then we give the tools. So the tool name plus the description. It sends an email only when instructed or when email content is provided. So when the variable email content is given and then schedule calendar event and so on and then instructions the rule and finally current date and time. Now the reason why we give the AI current date and time is because AI isn’t the best at guessing or knowing the date and time of today. So with this prompt we’re then able to take action right and the next step we have to do is connect our AI agent to the brain which is in this case is OpenAI. And to connect OpenAI, you have to go to platform.openai.com, log in, make an account, and then go to dashboard. You can go to API keys, go to create a new secret key, name it, get the key, and then bring it back to nan right here, which is basically a password that says, hey, you can use my OpenAI account, and then you press save. Now, leave this as GBT 4.1 Mini is more than good for what we want to do. And then we have the tools. So, we connected this to three different tools. The first tool is Google Sheets to get contacts, which is this right here. Then we have Google Calendar right here to schedule calendar events, which is this right here. And finally, we want to send emails to our Gmail, which is this right here. And so the theory behind this is that if you noticed, I didn’t actually give the voice agent an email. I just gave it a name. And so that’s why we have the step of retrieving the contact email from the Google Sheets here where we have the name and then we have the email. So if I said to the voice agent, hey, can you send an email to Michael James? I instructed the AI agent to know that it has to look at here first to be able to get the email to then take the action, right? And so it will go here. It will say Michael James, Michael James has this email. And this is the email that we’re going to use to be able to schedule the calendar event or send the email to the actual person. And so we go in here to connect your Google Sheets. All you have to do is create your credential, sign in with Google. It will take you to the standard um login with Google page. Once you connected your account, make sure to have sheet within document. You want to get rows, which is the action that we’re taking. Again, get rows just means get all the rows from the actual Google sheet, which is that one right here as mentioned. So, it gets all of them, and then it decides who is who. Then you want to choose the exact Google sheet. Uh, contact database USB. And then the sheet within the Google sheet will be sheet one. And finally, that’s when you get the actual output, which is row number two. The name is Michael James. the name is John Lori, James Low, James Arthur with the emails as well. And based on what the user added as a um sort of input, it will then choose the corresponding email. So if it’s Michael James, he will choose this. If it’s John Lori, it will choose this. If it’s James Low, this James Arthur this. And that’s for the first tool. Then we have schedule calendar event. Again, same exact concept. Go here sign in with Google. So you can connect your calendar tool description set automatically. The resource, which is what is the thing that we’re manipulating. In this case, it will be the event. the operation which is what is the action that we’re taking. We’re creating an event. The calendar will be my calendar and then start and end. We can simply just press these two buttons which basically means that we’re letting the model we’re letting AI define these two parameters. We want to turn this on so that we don’t have to do it manually which is the beauty of AI agents. Then we have two different fields that we want to fill out. The first one is attendees which you can find here attendees and then you simply do the same thing here which is just pressing the AI which in this case the model itself will send the attendee email over right here and then the summary you can pull from the where is it event description over here and that will be the title of the actual meeting and that’s how we get the calendar event to look like this where we have the title and it sends it to the right person and then finally we have the send email so if I go here same exact concept just go here send sign in with Google set automatically the resource that we are manipulating will be a message the action that we’re taking is we’re sending a message the beautiful thing about any AI agents to set up tools is that we literally just have to press three buttons and that’s it so we’re letting AI define who are we sending the email to what is the subject line and what is the message and what we could do here as well is turn this off append attribution so that at the end of the email it doesn’t say this was sent by anything and finally we use a respond to web hook node which responds with the first incoming item, which is this right here. The celebratory meeting with Michael James has been scheduled for tomorrow. If you need me to send an emails or add more details, then let me know. And that will be the thing that’s sent to the actual voice agent in 11 Labs. So, think of this as a boomerang, right? We have the voice agent here. It then goes here and then it brings it back to the voice agent, right? Sort of like again, we’re talking to an employee to the head of department. Employee back to the head of department to the CEO. All right. So, I’m going to test this again. And in this case, let’s do sending an email. And we can send the email to James Arthur. So, right here, I can call the AI agent. Hey, my man. How’s it going? What’s up, brother? Uh, can you send an email to James Arthur? And can you say that we are disappointed in your work? You should have done better in yesterday’s meeting. And that you are almost about to get fired. All right. I am sending that email to James Arthur right away. Oh, there. I found a James Arthur with the email mish.cal5gmail.com. Should I send it to that address? Also, that message is a bit strong. Would you like me to help you rephrase it a little more gently? Nah, you’re good. Just send that email over. Understood. Sending that email now. No holds barred. Oopsie. It seems like there was a little hiccup and I couldn’t send that email. Don’t worry, it’s not you. It’s probably just a glitch with my system. Can you try Can you try again? I’m on it. Let’s try sending that email one more time. Oh, dread. Seems like I’m still having a bit of trouble sending that email. Okay, so there was trouble sending the email. Let’s see why. I thought it was because it needed to confirm, but in this case, let’s let’s go inside here. And we actually did get the email content. So that’s weird. So I think that is within the prompt itself. Uh send an email only when instructed or when email content is provided. M interesting. So in this case, what I would do, I would just test it again. And it might have been a hiccup on the 11 lab side. And by the way, when you go live, you don’t have to execute the workflow every single time. just for testing purposes, we do, which is why when he was trying again, he said there was a hiccup because I had to rerun this again and I didn’t give enough time for me to press run and it actually sending the information. Uh, so let’s test the AI agent again. Hey, my man, how’s it going? Yo, can you send an email to Michael James saying that we have dinner tomorrow at 5:00 p.m. Uh, and just send it through. All right, I’m sending that email right away. Oops. It looks like I need a little more information to send that email to Michael James. Seems I didn’t get the full email content or a clear event title. Could you please tell me exactly what you’d like the email to say? And if you want me to schedule this as a calendar event, what should the event be called? Uh just just name the email. Um the email is about just having dinner tomorrow and it’s to Michael James. And no, we don’t have to schedule any calendar event. Got it. Just the email then. Sending it off to Michael James now. Oh no, it seems like there was a little hiccup. The email didn’t go through. My apologies. It looks like I’m having some trouble connecting right now. Could you perhaps try again in a little bit? Or is there something else I can help you with in the meantime? Yeah, try again. Try again. You got it. Let’s give that email another shot for Michael James. Well, shucks. Seems like I’m still getting a bit confused. All right. So, I think it’s because I don’t have the variable here, which is called email content. So, I’m going to add this there and try again. Hey, my man. How’s it going? Yo, can you send an email to Michael James saying that we have a meeting tomorrow at 5:00 p.m.? All right. I’m sending that email for you. Consider it done. I’ve sent your email to Michael James with a message about the meeting tomorrow at 5. Is there anything else? Great. So, we know why. Now, if I go to my email, I can see that we have the meeting reminder at 5:00 p.m. from JM Solutions, which is the email that I connected to NATO. Now to explain the problem that I just got because you’re going to have a similar problem as well. Uh is that inside the prompt I actually told in the rules that you should only send an email if you actually receive a variable called email content. But here I actually had this deleted and I didn’t have the name for the email content. It was just the actual email content. And so by adding the name it then recognizes that we got this variable which means that now it’s allowed to send an email. So that right there is how you can make a voice agent inside of Lemon Labs and connect it to our AI agent inside of N10. In this video, I’m going to show you how I built a trading analyst AI agent inside of N10. You can chat to it on Telegram and ask it to check any stock. It’ll find the chart, study it with AI, and tell you exactly what it sees, like if it’s going up or down, and how strong it looks. It can even compare two stocks and tell you which one looks better. All right, so the AI agent is divided into two different parts. We have the AI agent here and then we have the tool that we call which is the next workflow which is this one right here which is made to then get this sort of chart analyze it with AI and give us the answer back. All right. So I just turned this on. So it’s now waiting for a message. I can say can you analyze Microsoft then go what this will now do is it will talk to the AI agent which again is prompted with instructions. It then starts calling the tool right here which is this right here. So if I go here to executions, I can see now that this is running. So there’s a current workflow running, which means that it’s giving us the answer and it’s getting it back. And then it’s going to be able to then give us the whole analysis back on Telegram. And now it’s going to give us the actual analysis over here. So overall trend, recent price and action, support and resistance levels, MACD, which in case you don’t know, I also don’t know, and volume analysis, overall market sentiment. So basically a full breakdown of the stock because traders go look at this pretty much every single day, right? They look at this, they look if it’s going up or down. And so this AI will do that for you, saving you that time of doing it yourself. And one more thing that it can do as well is it can compare two different stocks. So I can say here, can you now compare Apple with Microsoft and I can go play. What this will now do is it will send it again to the actual tool. But the only difference now is that it will do it twice. So it will send the first item which in this case it will be either Microsoft or Apple. It then analyzes Microsoft. It will get the graph then we’ll get the graph of Apple and then it will give us the full analysis of both stocks together. As you can see it was smart enough to know that it already sent us the graph for Microsoft. So what it did is it sent us the graph for Apple right here and it then gave us the actual analysis of overall trend recent price MCD volume analysis support and resistance and current market positioning for both Apple and Microsoft. So now you’re able to actually compare each one individually in all the different uh categories right here which are about six and we have the key takeaways as well. And to me this is insane because now we’re able to analyze stocks individually but also compare them and have AI do the whole thing for us. With that said let’s go through step by step exactly how it works and how we set it up. So this right here is a typical structure of an AI agent. Right? We have the input, we have the output. Now in this case the input will be Telegram. So the first step is actually connecting our Telegram account. You can do this by going here, press this button, let AI tell you step by step what you have to do. It’s a longer process than than I would explain in just two minutes. And as you can see right here, this is the output, right? And the output in this case is update ID, message ID, from ID is bot, first name, language, all these things we don’t really have to know. The only two variables that we really care about is chatter ID because this allows us to actually send back a message in the same thread. It’s sort of like you’re having a conversation with, let’s say, your friend. You don’t want to be sending a reply to another guy, right? You want to be sending the reply to the same exact conversation. And so this right here is the conversation. It’s just numbered. And then we have the text. So the text right here is the actual text, right? It’s the actual text of what we ask the AI agent to do. And that’s what it will use to then send to the AI agent which is instructed, it’s prompted to do different things uh to then take action. We connect the input to an AI agent which has a prompt inside. So I’ll go through that in just a second. But the AI agent in this case is connected to a brain which in this case it’s Claude. And to connect your cloud account, you have to go here, go to anthropic.com console, login, go here, create a key, put a name for it. So let’s do N10 add. And then you’ll get this key that you’ll then paste. If you go back here, then choose the model. In this case, we have different models. Cloth 3.5 sonnet is fine. We usually look for uh quality plus speed. But for something like this, I think quality is more important than speed because it is quite a technical sort of topic. So we want to make sure that it actually is good. Then we have the memory. So you connect this right here memory which in this case is just a simple memory tool which is N and it ends memory tool and we give it the context window of five. Now what this means is that it takes the previous five conversations or the previous five messages sent by me which is great because like you saw I told it hey now compare Apple with Microsoft. So it remembered already that we already analyzed Microsoft. So what it has to do now is just analyze Apple. And it’s all because we have this exact uh memory tool. And one more thing that we add here is a chat ID. This is so that it remembers the actual chat that we’re having with the AI agent. And then finally, we have a tool. Now, before I get to the tool, let’s go through the prompt inside here. It will be a tools agent because we’re using tools. Define the find below, which is a user prompt, which is what is the thing that we’re telling the AI agent to do, which in this case, like I mentioned, is the text right here. So, we drag this across. And then we have the system message. So, if I go here, this prompt is quite extensive, as in it’s pretty detailed. And by the way, if you want a full blueprint, I’ll show you at the end how you can get it. And right here, we’re not doing any rocket science. We’re using the exact same prompt structure that I mentioned on my video up here, which is prompting AI agents. And that is using an overview. So, you are an AI agent specializing in XYZ, giving it an identity. Then, we have context. So, things that it needs to know, and then instructions, because it’s important for it to know exactly step by step what to do. Then we have tools. So tools is very important because then it knows what to call what action to take based on what we tell it to do. Then we have examples which is the assistant prompt which means that we give it a few examples so it has some context when it actually does the thing and in this case we give it three examples and then finally SOPs which is pretty much the same as instructions and final notes which are some final things final rules to give it. And so in this prompt, what we basically say is, look, the user is going to ask you for a stock to analyze. What you have to do is just call this tool when you want to analyze any stock. And so this tool right here, what it is, it’s connecting or it’s calling a different workflow inside of any tech, which is the one right here, which I’ll go in in just a second. And so this isn’t a typical AI agent where you just connect a software directly here and it takes action on the same workflow. This is an AI agent that calls a different workflow and then gets a response back just like a boomerang. Now, if I go inside here, the only thing we have to do is name it. So, get chart. And the reason why we added get chart on the prompt is so that it knows that this is the get chart tool. And now that I think of it, I think I called it I think I added a space in the prompt. So, let me go here and edit it. Uh, get chart is fine actually. Get chart. Okay, that’s fine. Make sure that the name of the tool is exactly the same as the name in the prompt. So get chart and then the description which is what does it actually do in this case call this tool to get an analysis of a requested stock. Please return the URL from this tool in marked on formatting for example this URL. And the reason why we ask the image to be in this format it’s so that it can then send it over to us on telegram in a format in a way where it actually makes sense. Then we have the source. So this is saying okay we’re calling this tool which is calling another workflow which in this case is here called anything workflow tool and right here we give it a description of the workflow and then we have source and source and workflow just means what do you want to call in this case we want to call the name of the workflow which we have right here. So to set this up, you have to make a completely new workflow and make sure that you have this node right here which is I believe uh when executed by another workflow which is the one right here and so you’re sending the data and then you’re getting the data back which in this case the from list it will be to technical analyst agent because that is the name of this right here and again I’ll give you the whole blueprint for free so you can just play around with it and so with this done what we get in the technical technical analysis agent. If I go here to executions and I go to the previous one and I can press this button, copy to editor, which will show me exactly the data that I previously mentioned before, we get this. Now, for those of you who are new to the trading world and stocks, it actually isn’t that hard. If I go to Apple stock, I can see that Apple stock isn’t actually called Apple. It’s called AAPL, right? NASDAQ, which is again the boss of all the different stocks in the US. And then we have APL which is in this case called a ticker which is a short version of Apple ink right and so when we want to send it to the actual thing to make the chart and so on we have to give it in a way where it actually understands. So we can’t say Apple ink we have to say AAPL which is why we call them tickers. once we receive the ticker from these AI agent right here. And so what would happen here is that we give it a can you now compare Apple with Microsoft and it will know that now Apple needs to be turned into a ticker which will then be sent here to the tool which will then be sent here which is the actual workflow and which is this and then this will be the thing that we now use to actually make the chart and download it. Now the question you’ve been asking yourself is how do we make charts like these? How does this happen? We have to go to a platform called chart/image.com which is the one right here. chartsimage.com and you want to be able to make an account. So, sign in. And this is completely free. The only caveat to this is that we have a daily limit of 50. So, you can only call this 50 times. The next step you want to do is go to the API documentation, which is just a documentation that says, “Hey, here’s how you can use it.” Right? on the left hand side just understand that the base URL which is a URL that we have to call this is always sort of like a link that you say hey server do this for me this is the start of the link and then to actually be able to call the right exact graph because we have tons of graphs that we can’t call we can get this we can get this we can get all these in this case we have to choose the right one so if I go here to the graph that we want if I go under I can then see something called a curl now a curl is something that we just literally just paste into a HTTP node which is a just a square inside of Nitn that will do everything for us. So all you have to do really is copy this curl right here. Go to Niten and then be able to just add a HTTP request and then all you have to do here is import curl. So you go here, you paste this and you import it and you will have this. And that’s when you start filling things out. Now, if you get the blueprint, you won’t have to set this up, but at least now you know exactly how it works. And right here is where we start adding everything. Now, one thing you have to add is / storage because then it allows us to be able to get this as a URL format and make sure everything’s good. Make sure this is posted so that we send the information of the ticker and then we get something back which in this case is a URL of the actual um stock. And then we have to put the X API key. Again, the API key is something that you can find here. API key generate a new key here and then copy it and then content type. Make sure this is application/json because all in all you just want it to give you the right format right and then finally the thing that matters the most is this right here which is what are we actually telling the the server to do. As you can see here this is the body. We call this the body which is what is the instructions that we tell the actual server to do like what stock are we asking it to to get. In this case, you can see that we have a symbol which is NASDAQ colon ticker which we get from the actual previous steps. Now, as I showed you before, the way that the stock is represented is NASDAQ colon apple, right? Ticker. So, we want to do the exact same thing right here. NASDAQ colon ticker. And so, with that said, what it returns to us is the URL of the actual stock right here, like I’ve showed you. And then finally, you want to put response format JSON because we added up here that we want the content type to be JSON as well. So just make sure you have this and you have this here. So you’re able to get the URL of the actual stock. Once this is done, then we want to be able to download the chart. So download the actual URL because this isn’t publicly available so that OpenAI or AI can actually go inside the image and analyze it. So the next step is just using a simple HTTP request to get the link and download it. Execute the step which looks like this. We get it in a binary format. Binary is just the way that an image or file is represented in the web. Which then goes to the next step which is stock analysis which is an AI. So we choose OpenAI and the way to connect your OpenAI is just by going to platform.AI.com. You can log in. You can go to dashboard on the left hand side. You can go to API keys create a new secret key right here and then put a name and then create the key like we did for claude. Bring it back here. put the API key here and then make sure you choose image which is the thing that we’re actually using and the action that we’re taking is analyzing image the model can be GBT40 that is good enough and then we give it a whole prompt so text input which is telling it hey you’ll be given an image now just assess the image analyze the actual chart based on the candlestick analysis MACD analysis volume support actionable other observations that it then uses based on the binary data data here data data that we give it as an input. So you want to make sure that this is binary. And I remember thinking that binary was such a complex thing, but what it actually is, it’s just literally a way for the web server to represent files. And so what we say here is we say, hey, here’s the input, which isn’t a binary file. And the name of the input is data because that is the name of the variable that we get. So just put data here. And in detail can be auto that’s fine. And now what it does is that it takes the actual stock and then it gives us the output which is this right here which is candlestick analysis. If I go to JSON I can see the whole thing right here. Potential breakout zone. The price is approaching 270. It’s giving us a whole breakdown analysis of that stock which we keep for now. And we go to the next step which is Telegram. And if you have the connection that you made before use the exact same connection. In this case it will be message which is the actual thing that we’re manipulating or changing. The action that we’re taking is send a photo because we’re sending the actual graph. We’re not actually sending the explanation first. And the chatter ID is a thing that I mentioned that we called or that we had right here. Chat ID schema chat ID. This is only a one time thing, right? Because once you copy this here, it will send everything to that specific conversation. So once you copy this from there, you’ll then be able to have the photo URL be sent from here URL which is a thing that makes it look like this in Telegram. And then finally the actual thing that goes back to the AI agent here for it to actually finish is the last step of the workflow which in this case is here which is response. And the response will just be the analysis that we get from uh where is it stock analysis here which is a content right here. And this is the thing that then goes back to the AI agent inside here as an output. And finally, we made the graph. It sent to our channel. It then sent the analysis back to the AI agent. It formatted it in a way where it actually makes sense. And finally, it sent it to Telegram right here with the child ID, which you can get here, chat ID, and the output, which in this case is here, output, and make sure that this is message, and send a message. So, let’s try this out one more time. I can go here. I can say, can you analyze Amazon? And by the way, not all stocks are going to be recognized here, right? Like something like Samsung isn’t part of NASDAQ to my understanding, to my knowledge. Um, and so if you put Samsung or something like that, it will not detect it on the next workflow because it is not part of that subset of stocks. And so make sure that whatever stock you ask it to do is within the category that we added when we asked to make the chart. So now it’s giving us the chart which did it in the other workflow. Then finally here it give us the actual trend. Now I’m going to do something interesting that I haven’t done before. So let me actually execute the workflow again. Let me go here and let me ask it can you now compare Amazon with Apple and with Microsoft. I go here. I’m interested to see what this does. if it remembers this, if it remembers the other one as well and what the output will give us and it seems like it doesn’t actually call the tool because it already analyzed the three of them which is amazing brilliant because now we have the full analysis here so overall trend Amazon Apple Microsoft recent price action MCD analysis so let me say which one should I buy when I go enter let’s see which one tells me that I should buy based on this anal analysis right here. As you can see, we have this here. As an AI assistant, I’m not able to provide specific investment advice or recommendation. Fair enough. Yeah. So, I guess we’ll just have to look at this right here and decide for ourselves. There you go. All right. So, this right here is obviously a very cool use case. Uh, but it should give you ideas for other use cases that you can build, right? And the ability for us to call different tools within our AI agents and then bring it back all in one place. And that’s the beauty of tools within the AI agent because you can talk to it as if it’s a normal human, but it can take actions on different things. And again, it all depends on what tools there are out there, like the image chart tool. Because if it wasn’t for this, we wouldn’t be able to actually do this. Hey, I’m about to build a live Instagram paraset system right in front of you that scripts post from the top AI news Instagram account in the world, rewrites them your tone of voice using AI, and turns them into a stream of content that you can post automatically. All right, so this right here is a system. I can press execute workflow. This will now run the automation. Ideally, we run this every single week. Uh then we scrape the Instagram post from the top AI news account in the world on Instagram using Apify. As we can see here, this is currently running. Then we wait 5 seconds before actually getting all the data and then looping it through. So, we only let 20 posts at a time. In this case here, we’re checking whether it’s actually relevant to our target audience before sending it to the next AI to actually rewrite the post and then adding it all back to our Google sheet database. All right, we can see it just ran successfully. I can go to the Google database. I can see here that we have the username of the account. In this case, it’s the same. The date when the post was posted, the post URL we have here. We can always look back the original post and the rewritten post using our ton of voice, target audience, and so on. So, we have every single week a stream of content ideas. So, we can then post automatically that are repurposed using our tone of voice. So, now let me save this. Let me make a new automation. All right, we start from scratch. And again, the first uh step of always building the automation is not actually building it itself. It’s going on Miro to map things out, to break it down step by step before we actually go out and build it. So, if I go here, I always look at an automation as an input and an output and then in between there’s different steps that we have to just figure it out. Well, the input in this case is I guess someone else’s content because we are doing a parasite system and parasite just means that you that you just steal someone else’s idea and then you just repurpose it for your own uh target audience. In this case, if I wanted to get the latest AI news and I wanted to use Instagram, I have to find an account where they posted the latest AI news and it was the top in the world. So initially what I would do is I would go here and say what is the top AI news Instagram account in the world and then I would get this right here evolving AI. So go here. Let me see what they have. Yeah. So they’re pretty big Reddit users go viral after revealing prom tricks and try to almost feel like cheat. Yeah I think that’s pretty good um sort of new AI news and they’re posting really regularly. I mean this is 4 hours ago 6 hours ago. Okay. So they post like twice a day. Yeah, three times a day. Four times a day. Four times a day. Um, which is great because now we have a lot of news, a lot of content to then repurpose. So the input is this. So we’re going to put input uh in this case post from evolving AI. That’s for Instagram. We put a note here Instagram IG. Now the next step after this is actually extracting the text from the post. So this is called scraping. We want to go here to let’s say this post right here every single week and we want to take this whole text and this is what we’re going to use to then repurpose which means that we’re going to change the tone of voice but the message is the same. So the overall information is the same and we’re going to make it our own content. So the next step here is scraping post text. Now for us to actually scrape the post text from Instagram we would use a platform called Apify. So, Apify is I mean the way that I have it represented is just the Amazon for scrapers. The Amazon for all of these things that a smart dude in the world created using code. Uh but of course we’re not using any code. We’re just using it automatically using our no code platform end to end. Um so if I go to go to console, you have to make an account and you go to API store on the bottom you get to see that you have usage which is $5 because API actually gives you $5 for free every single month that you can use. And so let’s go to an example here. We can see this is in the back example. Let me go here. Yeah, that we have the scraper. So this is the thing that we use to actually scrape. And I’ll I mean if this looks complicated, don’t worry. I’ll break it down. And we have to use $150 or we have to pay $150 for,000 leads. So, if we get $5 for free and we have to pay 150 4,000 leads and this changes every single scraper depends on what they are, then do the math there and it should be around 4,000 leads if I’m right. The math dudes in the comments, let me know. But that’s how much you have to pay. So, ideally, what I would do is I would go to the API store. Again, it’s like you’re looking for a product on Amazon and the product that I want is a product that is able to scrape IG posts. Okay? So, I want to split scrape uh or let’s just do Instagram post scraper. And we have two options. Instagram post scraper and aify. Instagram post scraper. So, aify is the actual platform name. So, typically I would go for something that’s aify based because again it’s a platform. 50,000. I think that’s pretty good. And $2.70,000 post. That’s a bit steep, but I think it’s fine. Uh I mean, we’re not going to scrape a,000 post. I think we’re going to do maybe 50 a week. So, it’s basically free because we get $5 a month. And this is what the the sort of UI looks like. So, on the top we have the name of the scraper. Then we have the description. Then we have the input. So, there’s two different ways that you can run the scraper that you can actually use this. You can either go in the platform and run it here. So, run the um start the actual scraper or you can use the JSON, you can connect API to end and then be able to run it automatically within the no code platform. And if that made no sense to you, no worries. I’ll explain exactly what it is step by step, so don’t worry. Um, but we can see here that the inputs are uh, well, there’s really only one. There’s one input, which is either an Instagram username, a profile URL, or a post URL. So, if I go to what was it? Evolve AI, I think. Yeah, there we go. Evolving AI. If I go here on the top is a URL, and this is the post URL or the profile URL that I get to paste here, right? And this is the I mean the thing I already had pasted but it’s the input that we have that we give API saying hey here’s a profile URL just scrape these posts on this time frame this many posts for this many post in this time frame it says extract post that are newer than date so the input that has to go here is the URL of the of the actual account which you can change with your own URLs if you want then the number of posts that we make or that we scrape and then we scrape um we’re only scraping the posts that are newer than this date right here. So again, you can run this. If I press start, what this will basically do is it will now say it’s running right here. And over time, it will start giving me results. So results are just basically here. Here’s the output. As you can see here, the actor is getting your data. All right. So we’re already seeing some outputs come up. These are the different uh text posts that we ideally want to be able to then repurpose using our tone voice. We’ll name the post URL, which comes from here. So this is the text that it extracted and we get a bunch of them, which is great. All right. So I mean ideally you would have to run this. Let me abort which means that you stop the automation. Well it doesn’t really mean that in real life but in the automation context it is but now we stop the scraper and we said hey stop scraping but now we have the different text post that we would like to use. So we know this works cuz we get the output. So all right cool scraping IG post using Apify. And then the next step would be using AI to check if it’s relevant cuz it’s great that we get all this AI news, but are they actually relevant to who we’re targeting and who our audience is? Um, so in this case, we use AI. Well, we can say chat GBT, but I think that’s fine. And then we ideally want to rewrite the post using our tone of voice. and then we would add it to a Google sheet. Now, this right here, this automation, we ideally want to run it every single week. So, the first step actually is run automation weekly on a Monday. So, we have fresh new ideas that we can post. So, run automation weekly on a Monday. Post uh from involving AI, which is an account on Instagram. Scrape IG post using API. Use AI to check if it’s relevant. Uh and then we rewrite the post using our tone of voice and add it to the Google sheet. So in this case the output is a Google sheet full of content. All right we can get to building now. All right let’s go to end and the first step that we have to do is let me just do a trigger manually which means that just to test but later on we’re going to replace this with a on schedule which we run every single week. Uh so we do trigger manually right here. So the first step is to scrape IG post using API. So how do we do this? Well, we have to connect API to end. I can go here to API and I have this node and I can now run an actor because again these are all different actors that we have within the actual platform. This is an actor. So I can run an actor and then in order for us to connect API, we have to go to create a new credential. We have to go to API key. I believe that the API key you can find on settings. Yeah, API integrations and then you can copy this right here. If not, you have to create a new token and I think when you’re new to API uh then you paste it right here. Let’s do 100 million connection and press save and we’re good to go. Then the resource is actor because we’re running an actor. The operation so what is the action that we’re doing in this case is running an actor and then the actor source recently used actors is fine. Now, one important thing here is that if you go to the actors, so again went to Instagram, we can also go to runs because we already run this already. Apify, Instagram. Yeah, this one right here. Aify Instagram post scraper. In order for us to see it here, in order for us to have it in our list of scrapers, we already have to run this in a platform. So, if you don’t see it here, it’s because you need to press start and save and it will start the automation. It will start the actual actor. You have to run it once in order for then for you to see it right here, which in this case is uh Instagram post scraper aify Instagram post scraper. Cool. So now it’s asking us for the input JSON. So the input JSON is essentially what is the thing that we’re feeding to the scraper saying, hey, do this and then give us the data back. Well, in this case, we can either do it manually or we can use JSON like I mentioned. So for us to use JSON, all we have to do is copy this whole thing and we delete this and paste it right here. So I’m basically saying, hey, I’m running it automatically. I’m using the JSON that we have to use. And that’s it. And now what we’re going to do is we’re going to be changing the date. So first I’m going to run this just to get some test data. You can wait for finish. This means that we’re waiting for the scraper to be done. Let me execute step. We go here. I can see that on the runs now this is running. This is starting the scroller which means that it’s starting to scrape. But what I was thinking here is because this is saying, hey, only get the post newer than this date. We want the date to be dynamic. We want it to be the date that we’re running it minus 7 days from the last week. So we only want to run post from the last seven week. Are we finished? Yeah. Yeah. Yeah. Yeah. Cool. Okay. So we got the data. In this case, we didn’t actually get the post, but we got something called a default data set ID. Now, Apify, the way it works is that we run the actor, and then we don’t actually get the post there. We have to give it to another node in API which is called the get data set items. Yeah, right here. And this node right here will be the one with the same connection that we then do a data set get items and paste the data set ID that we have from here which in this case we can get from here default data set ID. So drag it across. This will be the thing that we use to then extract the data. So if I remove the limit, I think you can remove it. Yeah. Yeah. I can pin this, which means I don’t have to rerun this again in order to to do the whole thing. I can now execute the step and this will now give me the post. So the caption for all the different items that we have and this is a long long list. Uh yeah, we can see it in schema, we can see it in JSON, in table as well. All right, now that we got the data, now we can move on to the next steps. And by the way, all we did is run this run the actor sent it here to then get the data. So all the different post text that we want for the next steps and that’s it. Uh let me go here to mro. This right here is good. This right here is also good. And now we have to use AI to check if it’s actually relevant. So the next step right here is to add another node. In this case is an AI step. We’re not using an AI agent. We’re using an AI step which in this case I think OpenAI is I think pretty good at this. We can now message a model. In order to connect your OpenAI, you have to create a new credential. You have to go to platform.openai.com. You have to go to dashboard. Go to API keys. Make a new secret key. Name it whatever you want. You will have a code. And you will then paste back here as an API key and press save. Now bear in mind this is not free. Like all of this is not free. You have to pay for API tokens which you can find in your profile billing and then put some money here. I think $5 is more than enough. It I mean it lasted me 6 months so I think it will last you hopefully. um unless you’re completely bombarded with with different scrapers but that should be fine. Now once you have this connected the resource is text the operation so what is the action that we’re doing in this case it’s message a model the model that we want to use is mini 4.1 mini because I’m going for quality and speed which is fine so again for prompt we have a system prompt which is you are a helpful intelligent xyz assistant and paste this I go here full screen you can see the whole prompt you’re helpful intelligent precise Instagram post classifier for an AI focused audience people who build with or want to learn AI uh understand cool news that come out of it and that actually strike and have an interesting take. I think this is a pretty good overall. I mean, you would have to change this with your audience and who you’re targeting. Um, and then for the second message, we use a user message. For the user message, I’m going to paste this. If I go here, zoom in, I can say, hey, classify the Instagram post for an automation focused audience. Return only verdict relevant or not relevant. It’s relevant if it’s something interesting news on AI that come up. not relevant if it’s a motivational, personal, non motivation, coding, crypto, politics, finance, or tool discounts or vague hype with no build/impact. And then we want to output this as JSON. Now, what why do we use JSON here is because we only want the output to be either one of these items. We wanted to say relevant or not relevant, right? And we toggle this on. Output content is JSON because then we’re basically saying, hey, I told you to do is JSON. Now, I’m telling the system that the only output that it can do is JSON. That’s fine. Uh now we have to write the actual data that we’re giving the um the AI which in this case is the caption. If I go here I’m basically saying hey here is the Instagram post to analyze. It gave me an output but it’s because I ran it when I shouldn’t have run it. Uh and now I can drag this across [Music] and have this as a caption. So the caption is basically the text of the post. Let me execute this step again. So this is now running. And now it should give me like an accurate answer as well. And let me rename this while it classify God. Classify relevance. Rename. Did it run? No, I didn’t run. Cuz I renamed it. All right. Well, now it’s running. And I actually forgot to put one step in the middle because ideally we’re doing 20 items now because in here we’re telling it, hey, only get 20 items. And we can put this to 100. Whatever it is. Let’s put it to 100 cuz that’s more realistic. Um I mean they post four times a day. What is it? Four times a day. Let’s do 30 actually. Or 50. Let’s do 50. Yeah, we don’t want to send all 50 here. Maybe we want to send 20 at a time. And now we can see that we start to get the different outputs. So not relevant, not relevant, relevant, not relevant, relevant, not relevant, not relevant, relevant. So it’s good because it’s not giving us all the information that’s relevant. It’s only uh filtering out the ones that we actually care about based on our audience. So in order for us to actually not send 20 at a time and we can do we can batch it. So instead of because I put 50 here when we run this now it will give us 50 posts. I don’t want to send all 50 post through. I want to basically loop over it. So which means that we send only 20 through. Then at the end of the automation we bring it all back and we do another 20 and do another 10 until it’s finished. So in order to do that we have to use the loop robot items. This is saying, so we connect this to this. By the way, you can delete this and delete this. You’re basically saying, hey, after this, loop over only 20 items. So, I only want to send 20 posts through at a time. And the next step is here. And then at the end, the last step of the automation, we bring it all back to here. So, it takes the ones that are remaining. Now, one thing I also forgot to put here is the date. So, if I go here inside, so now I can manipulate the data. So here um ideally it’s telling us hey this post have to be newer than a date. Well in this case I want it to be the date that is running minus 7 days. The way to do that is to put square brackets put now I believe dot minus 7. Let’s see if I got this right. days. No it’s giving us the actual text. We don’t want that. So in this case what I would do well actually I can do format. I think that works. Yeah I think that works. So we’re formatting the date. I mean first of all we’re minusing. So now now is today then we’re removing or we’re subtracting 7 days from now. So last week the past week and we’re formatting it as y mm dd which uppers this as this. So let’s try this out. I mean could or could not work. So we’ll see. We only the only way to know is to actually test. So, let me unpin this and let me execute the step. Okay, cool. It worked. Cuz if it didn’t work, it would give us an error. Perfect. Okay, cool. All right, we know this works. Let me stop the automation and let me uh yeah, pin this. It’s fine. And now, after we classify the relevance, which in this case, this step. Now, we want to be able to rewrite the post using our tone of voice. So, first step before we even go there, we have to set different variables because I want to extract the variables that I actually care about from the data set items because there’s so many variables. I mean this overwhelms me. Ideally I want to get um the like count, comment count, views count and some other stuff as well. So in order to do that I can go to edit fields. I can then go to I think I have to run this. Yeah, I think I have to run this. Maybe not. Let me try this. There we go. Little hack. Um, and now I can put the comment count. Let me actually one quick hack. Instead of you putting the name, you can just drag it across and it’ll put the name itself. And then I think it’s like views if I’m not mistaken. View. Yeah, video view count. Put it here. And then I think it’s likes likes count. And then I think that is pretty much it. So likes count, comment count, views count, and a full text. and date posted. Yeah. So, full text and date posted. The full text in this case will be the caption and the date posted will be the time stamp here. Yeah, this one. I think it should be this one. Yeah. Yeah, it is this one. But I don’t want it in this way. So, later on, we’re going to change it. But it’s fine. So, for now, we can set we can actually leave this here. So, we can set the variables and then go to the next step. And this will make more sense once I once I actually show you later. But essentially why I’m doing this is because later on when I want to pull information here from the let me run this from here I don’t have to go all the way into here and then start finding information I can just simply go here and find the things that I need right so in this case the caption we can leave this as is but I feel like I want this here caption and I think this is fine. The next step is in your automation to be able to then filter filter based on the ones that are relevant. Some are relevant, some are not relevant. So I’m going to put a filter here. You simply have to press filter. And the verdict has to be equal to relevant. So the filter is saying, hey, only let the ones that are relevant to the next steps. So if I if I pin this and again amazing feature and then I run this now I see that out of 20 only 12 went through which means that only 12 were accepted and were actually relevant. Once it’s done now we can uh send it to an AI in this case Claude because Claude is better at making content be able to rewrite the post using our tone of voice. If I go here bot anthropic in this case we can generate no messenger model which again you can find I don’t think you could find it anthropic down below there messenger model and you go inside and now to connect your collad you have to go to get the API key you can go to anthropic console to console.anthropic on public dashboard and then get the API key. You can create a key, name it whatever you want and also make sure to add money into your billing because it’s not free but again just like OpenAI this is very very cheap. All right, cool. So now we can go back to Nen and we can paste the API key. We can connect it. The text will be text operation will be messenger model. The operation which is what is the action we’re doing again message model. The list we can actually use. I think 3.5 hey is good. Let me actually go to CH. That’s good. Which model is good or is best for content? I mean this is realistic what I would do if I didn’t really know and not will tell me. It depends. No, not complex. Yeah, 3.5 Sonnet. So, we can use Sonnet 3.5 Sonnet. Yeah, it’s fine. And now we have to put the prompt. Now, for the sake of time, I’m not going to write the prompt from scratch. I’m going to paste the one I had before, but it’s fine because you get to have the system for free. And I’ll show you exactly how to get it. So, don’t worry. Um, now this has the overview, which is you are helpful intelligent writing assistant. And now that I think of it, this should probably be a system prompt because as I mentioned, the system prompt is the prompt where you tell it, well, that’s why. Okay. All right. Take my words away. Uh there’s no system prompt option. So, we just leave it in the user prompt and you are a helpful intelligent writing assistant. The task is to rewrite the Instagram post that I’m going to give you in a way that encapsulates uh encapsulates the original theme but uses different words. I’m targeting an audience that are people who build with or want to learn AI and they are always fascinated by new discoveries or news that actually make an impact. My results over the last year I’ve generated six figures, worked with over 40 businesses and taught 17,000 people and I got to do a bunch of fun stuff like travel, enjoy my life, etc. Rules use a no fluff young tone when rerunning the Instagram post only up the Instagram post and that’s it. Perfect. Now on a uh technical level, the prompt right here where we use hashtag this is called markdown formatting. Markdown formatting you know when you go to docs right and you type something when you write an essay you have the title which in this case is heading one. So title, let me have heading two. Let me have heading three, right? Let me have heading four. And I believe text, right? And so the same thing one one of this I believe that it’s a title. Yeah. Then this right here is heading two. This right here is heading three. And same thing with heading four as well. So this is why we add markdown formatting in our prompts because then AI can basically it knows the hierarchy of the actual prompts. So it looks so it knows to look at the overview first the task and then my results and rules as well. All right. Uh and now we can add another user prompt I believe which is the IG post because we wanted to give it the post to actually rewrite and say hey here is the IG post to rewrite. I can go I think yeah it’s here edit fields and put a caption drag it across and a good thing is that we actually get to see the output before it’s even run which is great um okay cool so this is good simplify output is good now we can run this press this now this should run so again we only send 12 items yeah 12 items we’re we’re ready to go okay cool in the meantime let me make a Google sheet which is a database where we actually get to store all the content. And I believe I want the username, repost URL, the original post text, and the rewritten post text. Okay, cool. Make this white this middle. Let me freeze up to row one. We’re good to go. Let me make this a bit larger. So now it’s going to be a bit bigger than that. If I go back here, I actually see that this is not over cuz it does take a while cuz cloud is timeconuming. But now it’s finished. We have right here. Yo, this is actually insane. Apple just dropped a game changer. Your AirPods Pro can actually now be your personal translator. Just tap both stems and boom, it picked up your foreign language. Custom noise. I didn’t know I could do that. All right. And now we bring it all back to the sheet. So this right here, it’s all good. And look at how I’m actually structuring the automation. So I mapped it out. And then every time that I finish something, I go here to green cuz I’m iter. It’s called iterative testing. So we test every single step to make sure that it’s good. And then we want to make sure some sort of confirmation checklist that we can then um say yes, it’s good before going to the next step. So the next step here is adding everything to the Google sheet. Let me rename this IG. Again, not ideal. Let me do IG. And then here, let me do Google Sheets. I can append a row in a sheet. Append row just means add a row. To connect your Google Sheets, you have to go here and sign in with Google. It’s just a simple page. You can just choose your account and so on. Um, that’s fine. Once you’re done with this, you can do sheet within document append row because this is the action that we’re doing. The document will be IG GG. Choose the right account. Yeah, there we go. The sheet will be sheet one, which is this one right here. And now we want to be able to map all the fields. So mapping just means that we want the username to be somewhere from here. We drag it across post URL, original post, and rewritten post as well. So the username I believe we can find I mean what was his name? Evolving AI. Yeah, there we go. Owner full name. I can get across. Now why do we actually want this is because what if we change the URL of another person later on. We still want to know exactly where the post came from and then we want the post URL. Post URL. There we go. This right? Yep. It’s good. Uh and now the original postex is I can get from the man if any beginner actually used end for the first time I get so confused here. There’s so much to so much to look at. Then the caption is this. It’s good. And now the messenger model which is the text the rewritten post. I like how we just translated it in our own tone of voice. Yo this is actually insane to this is wild. I like that Apple just dropped the game changer. All right. Cool. Um, all right. We can test this as always. We can pin this, I think. Yeah, we’re good. So, now we should see this. It’s going to be formatted weird or not. Yeah, it’s good. Uh, what I’m going to do is I’m going to make this smaller. So, we get to see the username, the post URL. Perfect. The original post and then rewritten post. I like all of this apart from this. Yeah, like this. I mean, this is obviously not us, right? Yeah, this is not us. So let me go to AI edit rules. Do not use any CTA at the end. Not the best change in prompt, but it’s fine. We’re going to run it from scratch um again. So don’t worry. But now that we’re finished with this, so we said, hey, okay, we run this actor, we got the data, we set the fields cuz it’s easier for us to actually map later on. I mean, this should work when it’s running. Um then we said okay we maybe we can get 50 posts but I only want to run 20 posts at a time. So we run 20 post here classify the relevance if it’s relevant then we go to actually make the post then we add it to the sheet and then we go back here and we run the next 20 and the next 20 until it’s finished. Well in this case it’s 50, right? So it will run twice and then it will run three times on a third it only get 10 finish. So let me unpin all this. There we go. Let me save this. Let me refresh the page. And now I should be able to run this. Yeah. Yeah. Execute workflow. I can now wait. If I go to the post scraper, I can see that this is now running. And this usually takes about 24 seconds. It can be a minute depending on how many results you want. 46 seconds. Yeah, it depends. You can start to see the posts that are being scraped right now. And we only get the data. Okay. Oh, it’s 19 19 posts. Okay, cool. We get the data when it’s finished. So, it goes here. Now, it’s going to classify the relevance. Let me check in here. Yeah, that’s good. I guess it only found 20 post uh from the last seven days, which is fine cuz we did put a time frame, right? It’s going to rewrite them and then put them into the IG GG database. Now, the reason why we we give it like, hey, you can script 50 posts, but in the past 7 days, they only had 20. So, uh it didn’t find 50. We can see here that the content is now being added to the Google Sheets. So if I go here, I can see that more content has been added. I mean this is 24 and we made 11. So 1 2 3 4 5 6 7 8 9 10 11. So these 11 are the ones that have just been added, right? Which is great. And we have more content. As you can see, there’s no CTA changed it compared to this. There is a CTA. So we made that change. Perfect. Um, all right. Now, only thing we have to change for this automation is that we have to run this every week. I can delete this. Now, I can go here on a schedule. I can say weeks, one week. We can trigger this on a Sunday at midnight. Just Oh, actually, no. I said Monday. Let’s do Monday. Uh, Monday at 6:00 a.m. Yeah. Just who wakes up before then. Um, and then press save. And now you should have a working automation that runs every week. It will script the different post. It will get the data set items. It will then send the nodes or set the variables. It will then only run 20 at a time. It will classify whether this is actually relevant for our target audience. It would only send the ones through that are actually relevant. It will then rewrite them. So, let me rename this to rewrite post before adding them to our Google Sheets database with all the content right here. Hey, I’m about to build a live Twitter paraset system right in front of you. that scrapes tweets from top performing posts on Twitter based on a keyword that we give it, rewrites them in your tone of voice using AI and turns them into a stream of content that you can post automatically. All right, so I’m just going to run it and show you exactly the outcome that we get. We have a form where we can add a keyword. So in this case, let’s just put AI agents going to submit. This now starts the automation. It calls a scraper on Apify. So it can scrape the top 100 tweets on Twitter based on that specific keyword that we give it. If we go here, we can see that this is running. It’s got 80 so far. So you can see now it went to the wait because we’re waiting 5 seconds before adding it to the next API node to get all the data to then add to the first AI step which will classify the relevance of the tweet whether it’s it’s actually good for us to actually post it or whether it could be considered a good content idea. And we’re only letting 50 items through at one time because we want to make sure that we don’t give all the AI all context and all 217 tweets. This now sends only the relevant uh tweets now to the other agent or to the other AI step which will rewrite it in our tone of voice before adding it to the Google sheet. All right. If you go here to our Google sheet, we can see that we have the AI agent keyword, the original post, so the original tweet and the rewritten tweet that we take in order for us to then be able to post it to our platform. All right, so let’s dive in. I’m going to go to a new workflow. Workflow personal right here. And we start from zero. Now theory, I would have to go to Miro, which is a platform where we actually map out the automation before actually building it. We’re going to start strategizing behind what is it that we want. Right now, initially, a paraset system is using someone else’s content to be able to repurpose it for our own. And so because we’re talking about Twitter, Twitter operates with keywords, as in like you give a keyword and you can get a bunch of tweets. So the input has to be a keyword right the input is a keyword that’s the input now the keyword can be can be a form can be a button can be a message it can be different things um we can sorry we can give the input in different different ways a form a message whatever it is an email but in this case because we have notion uh sorry nitn forms integrated within n andn we can use the form right here actually let me just put nitn form here and this will be the keyword that will be like the only question that will be asked now After we have the form uh with the NN keyword, we would be able we should send it to a scraper. In this case, we use APFI. And I’ll talk about which one’s the best, how we actually find them and all sort of stuff. Uh but in this case, we so scraper scrapes tweets based on keyword. Scrape tweets. Actually, just put scrape tweets based on keyword. Let’s make bigger. And now we want to be able to send it to an AI because not all tweets that come from that keyword are relevant to what we do. So use AI to check if to check relevance and then if it’s relevant, we want to rewrite it. Okay, rewrite relevance tweets. Okay, so that’s exactly how it’s going to go. And then we’re going to be adding it to a Google sheet. Then on form script tweets based on keyword that we have using the form. Then we use AI to check the relevance. Then we rewrite the relevant tweets. Uh so this will be a filter in here. There’ll be a filter whether it’s actually relevant or not. And then we can rewrite it and then add it to a Google sheet. Okay. I think that’s pretty pretty it’s pretty standard pretty easy. Um the first step here is N form. So let me actually make that on NN. And again this is step by step so you’ll see everything. The first step right here I can press add. I can go here and now I can have different options. In this case, it will be on form submission because we’re using the N andN form right right here. So if I press this, I will have this page. Now again, N&N end forms, we have a test URL, we have production URL. The test URL is something that we use when we’re actually testing the automation. But once this button right here is turned on, where we actually activate the automation, so we don’t have to keep executing a workflow every time manually, uh we will be using production URL. But in this case, let’s leave it here cuz we’re testing. Authentication, we’ll leave it. Uh we don’t need any password. Authentication is sort of saying, do you want a password to your form? We don’t need it. Uh the form title can be Twitter parasite system. Yeah, there you go. Uh I don’t know, for some reason I always put the Y instead of the I. And then here you can add please add a keyword to activate this system. And now we can so this will be the form description as in what you’ll see on the form. And now we can add we can start adding the questions. So we if we add add form element this just means add a question. Uh the field name will be keyword. It will be a text and placeholder. Let’s just put an example AI automation. Okay. And this will be an example thing that they see before they even write it to get an idea of what they have to put. And we put required. Then it’s asking us respond when form is submitted. Yes. Because you want the trigger. We want to send information there when the form is submitted. And that’s it. Uh so let me execute the step. Let me test this out. Let me do AI agents. I submit. And now here I should be able to see the output and it’s green. All good. And the keyword is AI agents. Tells me the date the form mode which is in test mode, right? Because we’re using the test URL. Uh so that’s good. So that’s the first step done. Now we get on to the next step which is the Apify. So scrape tweets based on keywords. Uh let me delete this. We’ll go to Apify from scratch. I go to apify.com which is a platform where it’s sort of like a Amazon and the thing the products that you’re buying are scrapers. Okay. And scraper and the Amazon products someone makes them you just use them. Okay. So in this case that’s exactly what this is. People make scrapers you just use them to do whatever. Uh and it’s all code in the back end right? Again we don’t want to use code. So that’s why we use SL assistant. Um, so typically when it comes to to scraping, like the first thing you do is go here and search up the thing that you want to do. In this case, it’s Twitter scraping. What’s there? Usually I would look at the reviews. Like that’s the first thing I would look at. Reviews, reviews, reviews, and the ratings. And then I would go out and look for the price. Now because I already did this um I have on home this this scraper right here which is if you want to if you want the actual thing just copy this X data/ Twitter X scraper you can copy this you can go here aify store you can paste it and you will have this one right here. Okay so this is the one that we’re going to use because of the fact that it’s actually very cheap. So Apify actually gives us $5 to anybody who signs up every month. Okay and we have 8 GB. This is more than enough to be using this scraper which is 35 cents per thousand tweets. If we scrape a 100 tweets per keyword we have to do and that’s that’s what that’s very that’s not even not like that’s not something to even mention right in terms of price. So it’s basically free. Um so you can use it as much as you want. Obviously again not infinite right because we still have 35 cents for,000 tweets we have $5. So with that being said, um we have basically the scraper tells us that the input in this case can either be a start URL. It can be a URL of a tweet or whatever it is. It can be a search term which is a keyword or it can be a Twitter handle. Okay, in this case we want to be able to add a keyword because that’s the thing that we’re inputting, which is why we add So if I press X, I can add here. Let me do AI automation, whatever it is. And for you to actually see it on end, you have to actually start and run it once, right? To save. So I already did this so I don’t have to do this again, but you can start and then save it. And then maximum number of items output. That’s good. All right. So let me go to NN and actually cuz I have the scraper already. I’m going to go to API right here and I’m going to run an actor because the actor is the scrapers like the scraper itself is gonna actor. Uh so if I press run on actor it gives me the option to um to actually connect api to end. I press there I can now put the API key which I can find when I go to settings I go to API integrations and this will be the one here default API token. I copy this and I go out here and I paste it. this. So now let me put 100 connection 100 connection second September. Press save. This will now save. So you can see here you can’t see it cuz I’m there but uh it will be credential successfully created. If I go here now I will have the connection. Okay. The resource will be actor. The operation will be run an actor because that’s the action that we’re doing. Actor we can be uh actor source recently used actors. You should do API store actors in case you haven’t used it yet. From the list now you will have a list of actors that you’ve probably used. If you this is the first time you will see none of them. Um but you I mean you will see the one that you just you just ran which is the one that I we just spoke about which is the one here. So this is the one that you have to use. Look for the handle X data Twitter scraper or look for the name XCOM uh X.com Twitter API scraper. If I go here I can then look the thing right and it tells us the name. So we know that it’s this one. I’m going to press this. And now it’s asking me for a few things. It’s asking me what’s the input JSON. So how do you know the input JSON? Well, you can actually scrape on API using two different ways. You can scrape on the platform. So you can go here and actually put the keyword and run it and get the results manually and download as a CSV or whatever it is or you can actually use it automatically. Use it automatically. You need the JSON here. So this is the manual process. In in case you want to use JSON, we have to press this button right here. And now it gives us the JSON that we can copy, right? And the only thing we have to change in this case is a search term, which is the variable that we get from the form that we fill out. Okay? So if we copy this whole thing, we go here, we paste it back. Uh, okay. So if you do this, we just copy it. And now the only thing we have to change here because the search term is the thing that’s dynamic, we have to change the search term which we get from the keyword. So if I delete this and I pull this across keyword in the middle right make sure that it is in the middle make sure that is uh that is not here make sure that it is in the middle between the two quotes. So this will do is this variable right here will be changed. Okay, it will be dynamic will be something that changes as the form submissions change. So what I do here we created the actor we connected the actor. We said okay this actor is fine. Then I went to API said okay if this is the manual way of doing things with these with these settings a automation 100 and so on top the JSON for it is this top a automation 100 and so on. Right? So you want to copy this, you want to paste it here. And then the only thing you want to replace is the actual keyword that you use u to actually script the tweets. And that’s asking us for um wait for finish. In this case, yes, we want to wait for finish. What this means is that we can if we toggle this off, we can basically send the data to the the actor, but it will run. It will say it’s successful as in like it won’t give us the the data back. It will just run it. But if you press wait for finish, what it will do is that it will send the information to the actor like this. It will wait for the actor which in this case can take 45 seconds to finish and then it will give us the data. Okay. So in this case that’s exactly what we want. Uh timeout we don’t need timeout. Memory is fine. That’s fine. So let me actually test this. Uh in this case I can press execute step I believe. Yeah. So what this will do is it will go here. You see how now it’s running. So it’s running a new search term uh based on the keyword AI agents which we just ran before. Again executes that. The good thing about NNN is that you can actually test it using the data from the previous steps. So now it’s waiting. So we’re we’re actually waiting for the data to come back. We script 60 so far and now I believe we have to wait at 20 more seconds for it to to load. Um but this right here is is basically what’s happening. It’s giving us a whole log of the whole of everything that’s happening within the actual platform and how it scrapes. All right, cool. So it’s finished. If I go here, I can see that I get different data, but we don’t actually get like you can see we don’t actually get the tweets. What we get is a bunch of fields. And the thing that you really have to care about is this right here, default data set ID. Because this right here is the thing that we’re going to feed into the next node, Apify, for us to actually extract the information. If I copy this code and I go here and I put another API node, API, in this case, it can be get data set items. So, let me I mean, I actually just find it there. We are right here. Get data set items. So if I go to get a get data set items, what this means is that the only thing that we have to feed it is the data set ID. So if I paste this manually in this case it will have to be automatic. If I execute the step now this will give me all the data just 50 items 50 tweets for that specific keyword where we can that we can go through. I go in table I can see that it’s a bunch of data and it’s divided into pages. This is how we get the data from API. This actor runs we wait for it to finish. Then we get the data set ID which we feed into the second node which will get all the data from that data set ID. And then we can go out and uh and use it for whatever. Now the limit we can leave to 500. So if I go to execute step now we see 179. It was 50 because that’s a limit. Um or that was the limit. Data ID with that’s the thing we have to replace. So in this case you can go here to default data set ID and you want to drag it across here and the connection is the same. the resources data set operation is get items uh offset limits and that’s all good. All right. So now that we have the data we can go to the next step. So if I go here to miro uh the next step is to use AI to check the relevance. There’s only one problem here is that we’re sending 179 items to the AI step which you can’t do because sometimes it can’t overload which means it’s too much information and will not run. It will error out. Uh, so in this case, in order for us to actually be able to send, let’s say, 50 and then 50 again and then 50 again until it finishes, we have to use a loop over items. So I go loop over items. And now it’s asking me for a batch size. So batch size is saying, okay, what is that number? How many items do you want to send through before we loop back and get another? Right? So in this case, we can do 50 and leave everything else as is. So in theory now, it will get 179 or whatever it is it needs to get. It will send it. It will only send 50 through based on here. And then it will go back 50 again. 50 again until it finishes. Okay. So I’m going to delete this. Let me delete this. And now I can start adding the next steps of the automation. So in this case again is the AI to check the relevance. So we can go here loop to AI. You can go to OpenAI message a model because we’re messaging a model. And now in order for us to connect our OpenAI to uh NN we have to go here to create a new credential. We have to get the API key. Now the API key is something it’s sort of like a password that says hey and then you have access to my account you can talk to it you can talk to the GPTs whatever it is you have to do automatically in order for us to get the API key we have to go to here to platform the openi.com we can go to uh you have to sign in of course go to dashboard go to API keys on the left hand side you can create a new secret key on the top right uh name it whatever you want we can do and then workflow when you create a secret key this now will be the API key that you will use when you have to go back to end and paste it here. Okay. Now, make sure you don’t share this API key with anyone because it is um it is something that if someone else has access to it, they will start spamming your money. Um so, don’t do it. So, copy this, bring it back here, paste it, and then you will have the connection sorted. Now, once this is done, you’ll have the connection here. The resource is text. The operation will be message a model. The operation is sort of saying what is it that we’re doing. Uh and then from the list, the models, we can just use let’s do 40 latest. I think that’s fine. or four or mini. I think four or mini is 4. Yeah, 4.1 mini. That’s like we’re looking for something that’s like quality plus speed, right? Um so 4.1 mini. That’s fine. All right. So we have the prompt right here, which is in this case a system prompt because again we give it an identity. Uh if I go in here, let me just zoom in and you say you are helpful precise tweet classifier for an automation focused audience. uh people who build or learn automations and then make.com Zapier uh APIs and web hooks, AI agents, RPA workflow ops, integration patterns, real build tool releases that impact automation work. Now, this will obviously be replaced with whatever you’re doing. Um so you can change this to to your kind of audience. Uh but for me, it’s AI automation. And now I’m going to start adding the user and assistant. So for the user, I’m going to add a prompt that allows it to say user uh to say whether this is relevant or not. So again system is for you are a helpful intelligent XYZ. So it knows it’s that thing. So if it thinks it’s that thing is going the output quality is going to get better uh because you gave it an identity. And now for the user prompt we say hey classify a tweet for an automation focused audience return only verdict uh relevant or not relevant. So this is using JSON we’re saying hey only output this. This is the key. This is the value relevant or not relevant. um based on these rules. Relevant if it contains actual automation content, how-tos, real builds, API, web hook, interpretations, agent, RPA workflows, templates or ops patterns because in this case we only want things that are actually relevant to what we do and then not relevant if it’s genetic AI tech news, motivational, personal, no automation coding, uh politics, finance or tool discounts or vague hype with no build impact. And we only tell it to output JSON only. Okay, because that’s the only variable that we want. We don’t really care about anything else. We just want to say hey is this relevant or is this not relevant? Uh once this is done now we can give it the tweet. Um so if I add another user message so in this case I have to I believe I have to run the previous steps. Yeah I have to run previous steps for me to see here I have to execute previous nodes. In this case it’s running. So we have to wait about 40 seconds but then we’ll be able to pin the data and then we can we don’t have to rerun everything again. All right. So it just finished running. Um I mean now we’re using AI but we have the variables on the left hand side we can use to actually add it here. I’m just going to stop this. There we go. Okay. Now all we have to add is this. So we added you are a helpful intelligent or um whatever assistant and the prompt is you need to check whether the actual tweet is relevant or not. U but now we have to give it the tweet. So last user message will be here’s the tweet that you need to classify. And now we have to find the tweet here. So if I go to not loop over items, it will be get a data set items for sure because that’s where the data is all at. If I scroll, something you have to do with these sort of things. There’s so many fields. Most of them don’t matter. Okay. Okay. Yeah, it’s definitely description. Description. That’s the closest thing that looks like a tweet. Yeah, description. So now we can drag this across. Not loop of Adams. This one right here. We can drag this across. Make sure it’s API right here. And now this will be the thing that will be used to actually check whether it’s relevant or not. So here we can rename this to relevance agent. Although it’s not really an agent, right? Cuz it’s just a step. It’s an AI step. All right, cool. So once we do this, now we can um we can go to the next step which in this case is actually filtering. Okay, so we want to actually run this because we want to make sure that we have the data to test. Uh, but I actually forgot to do one thing. So, this agent is going to run, but I forgot to do one thing, which is turn this on. Uh, output content is JSON because we tell it, hey, output this as JSON. So, we have to turn this on to let it know the output is JSON. That’s all it is. Uh, so now what it’s doing is it’s uh running through 50. So, I mean, we still get the data and I’ll show you exactly what it looks like. U, but now it’s running through all the prompts. is checking every single person or every single Twitter um post that’s made and that’s the thing we’re going to use to go into the next steps. All right. So, you can see now uh it’s null. There’s no data. So, now we have to turn this on. Output content as JSON. And let’s rerun it again. Let’s execute the step again. Now, it will take the data from these steps. And now it will run it again to make sure that we can now actually test the data or test the step to make sure that we we have the correct things. All right. Cool. So now that it’s finished, I can see here schema. Okay, why did it error out? Why did it not work as we expected it to? Okay, this is part of the process. So let’s see. I think it might be because of it’s not actually the author description, it’s the text. So let me just press text here and let’s see what I get. It should be full. Okay, that’s why. Okay, full text. I think that might be it. Yeah. Yeah, I think that full text is the full text of the Twitter post. So, let me execute the step again. And again, this is part of the process. I mean, we we mess up. We have to see we have to check the variables, not check the variables, see what works, see what doesn’t work. Um, and if I didn’t show this part of the process, I’d be lying cuz that’s always what we go through when we build automations. I’m just going to wait again until it finishes. All right, cool. So, now if I go in here, I can see that now we have relevant, not relevant, and so on. Now, the next step here is to add a filter because we’re asking to give us the relevant and not relevant so that we can filter out the ones that are not relevant and only send the ones that are. So in this case to add a filter we just press plus and put filter remove items matching a condition. This case the filter would be if the verdict is equal to relevant then we send only those one through. That’s it. That’s what we’re doing. So if I run this believe that it will do it. Yes. Should do it or run it. Oh it’s going to run it again. Okay. I forgot to pin the data. Okay. I should have pin the data. So they don’t have to run it again for always always remember to pin the data cuz then you see how now to rerun this to only run the step I have to start everything again and I have to wait like 40 seconds. Um so lesson learned uh we’re going to pin the data in the next uh in the next round. All right so it just finished and you see how of the 50 that went through only 27 stayed. Only 27 were relevant. Now let me pin this data. I can drag it across and press B. So now if I wanted to test this again, I would just um have this finished. And now to get on to the next steps, uh we have to go to the rewrite relevant tweet. Okay, we’re still going to use an AI, but in this case, we’re not using OpenAI, we’re using Claude. Now the reason why we’re using Claude is because Claude is extensively better at writing content. Okay. So if I go here and I write claude anthropic I can go to generate a prompt. Zoom out. Now to connect your claude to the uh NNN we have to go here create a new credential. You have to get the API key. So we can go to anthropic console um get the API key. Create a key right here. You can name it whatever you want and then you can add and you’ll get the API key. Once that’s done you bring it back and you will paste it here. All right. So now that you pasted and now you connected your API key to claude, the resource is text. We’re going to message a model. The list uh let’s do 3.5. Hu. That’s fine. I think that is one of the best at writing content. Or is it sonnet? Okay, let’s just do in this case. I think it’s like the fastest. It takes the most context uh the most amount of words. Uh, and the prompt in this case, let me just copy it from the automation I made before is the one here says, “Overview, your helpful, intelligent writing assistant. Uh, rewrite the tweet that I’m going to give you in in a way that encapsulates your original theme, but uses different words.” So, that’s what parasite just means. We’re taking something and rewriting it in our own words. I’m targeting this audience. My results uh are this. So, I worked with over generated just under six figures, worked over 40 businesses, and taught over 17,000 people, and I got to do a bunch of fun stuff like travel, enjoy my life, etc. The rules is use no fluff young tongue when rewriting the tweet because that’s me young. Um and then only upload the tweet and that’s it. That’s a pretty standard prompt. That’s a pretty good prompt. It has overview. It has task and it has my results. Now what you see here is hashtags. Hashtags are in MAC. They’re used for markdown formatting. So this right here means it’s heading one. This right here is heading two. Heading two. Heading one. Okay. We do this because that way the GPT knows what’s the title and it can it can basically categorize or has the hierarchy to what to look at first. All right. All right. So now that this is done, we can now prompt the same model to uh we have to give it the tweet essentially for it to actually do something. So we can add a message user. In this case, we can say here is the tweet to rewrite rewire. Rewrite. All right. And now we can pull the tweet from uh was it full text? Yeah, full text. There you go. All right. So now that this is done, we can I believe test. Yeah, we can test. Let me actually let me pin this as well. This as well. So I don’t want any problems having to run everything. Uh let’s uh let’s execute the step. So now it’s actually running. This is running. Taking the data from here and from here. And it’s going to give us an output which you then need. All right. In the meantime, uh once we finish this, we have to make a Google sheet. Okay, so let’s make the Google sheet right now. Let’s go to sheet new. Let me copy the headers that I had before. Keywords, original post, and rewritten post because again, we want the I mean that what I wanted here when I actually thought of the system was the keyword. I want to see exactly what uh where the comment came from the keyword, the original post. So in this case, it will be the original tweet, rewritten tweet. Okay, that’s fine. All right. So you can see this is taking a bit long but that’s fine because it is taking I mean it is clawed and it’s 27 items as well to rewrite something. So that’s uh that’s normal. So now let’s rename the sheet to Twitter Twitter system because I already name this parasite system Twitter system. The sheet is one. Uh let’s put this to new tweets ideas. And now, okay, we have the output here, which in this case is rewritten uh rewritten tweets that we can use. And now we want to store everything in a Google sheet. So I’m going to go here, press plus sheet, Google sheet, add a row. So append a row. Append just means add. And now you have to connect your Google sheets. You have to go here, create a new credential. You can sign in with Google. It will take you to a page. You can just press the account. In this case, this is my account. Press okay. Successful means all good. You can go back to N. Name this cal connection and then the date. Press save. That’s fine. The connection’s made. Now we want to do a sheet within a document. We want to append a row. Again, operation just means what’s the action that we’re doing. And the document is Twitter system. Twitter system. Cool. And the sheet is new tweet ideas. We’re going to leave this as map each column manually because this is the manual step. want to basically map the variables to the columns so that they change and they add every single time. In this case, the keyword is or can I find the keyword somewhere here? No, I think we have to run this. Yeah. Yeah, we have to run this. Execute step. Okay. Wait, let me get the let me get the link. Execute step. AI agents. Now I have this. I can pin this. So that here I think now we’ll have access. Okay, I think I need to rerun. Oh, not here. Here. Yeah, I’m going to have to rerun all the steps in order to get the data. That’s fine. That is okay. That is okay. It happens cuz I definitely need to get better at pinning data and making sure the data is not we don’t have to rerun the whole thing and we can have previous steps pinned so we can use it for the next steps and alerting process here. So that’s fine. Okay. So this is done. When this is done, we have to pin this. Uh we’ll be able to access this variable right here, I believe. And then we can add everything to the sheet. All right, cool. So now it uh it ran successfully. Let me pin this as well. And here uh at least one value has to be added. Yeah, that’s fine cuz we didn’t add any keywords. Uh here I should be able to see the keyword. Perfect. Original tweet. This is the text. So full text. Let me do something actually because I keep after looking at this. Let me just put a set set variables node. Like I’ll show you exactly what it is, but um let’s do keyword. It just makes it so I don’t have to go back to here and and find everything. But if I put keyword here and I put uh get data set items, I put text. This is like the tweet original tweet and this is re written tweet. I can go to claude and get this. Now if I go here to to Google sheets, let me run this. Using the item method does not work when painted in this scenario. Please unp get this time and try again. Okay, so we’re in a bad position again. That’s fine. Let me just do AI agents and then I can change this later. Let me just start this pill filter. Okay, cool. Then this runs. Okay, I just wanted the data here so I can I can just send it here. Okay, now you see how I don’t have to go back and forth in the form. Find it here. Find it here. Find it here. I already have it here. Keyword, original tweet, and rewritten post or tweet. Okay, so it’s much easier for me to uh to actually use it. And now if I go here, I need to send this back to the keyword. Okay, I don’t know what I did. I don’t know why I did that. There you go. It’s here. Keyword. So that’s fine. Because again, we’re mapping it from from the previous steps. And lastly, I’m just going to run everything from scratch to see how everything works. And one more thing we have to do is this right here. When it finishes, we have to get back uh here. to make sure that we get the rest that are finished because we have 100 uh 215 only 50 go through all this. We want to go all the way back to get another 50 until it finishes. So, let me unpin this. Let me unpin this. I’m just pressing P, hovering over it, pressing P. Now, we’re going to start the whole thing from scratch. Let me reload. Let me get this whole thing good. Let me execute workflow. Let me do MCP. Um, yeah, I think I think it’s fine. I think it’s pretty it’s a pretty hot topic right now. So, submit. We can go here. So, now it’s running the actor. So, if I go to Apify, I can go to running and I can see here that is running, which is great to see. I guess most most of the times when you’re building automations, things don’t go your way and things don’t work. But it’s about figuring it out. That that’s how you really become the system architect. uh when things don’t go your way, you just build, you iterate, you just get better. And now we can see all of this is running, which is great. Um how many recorders did it get? Okay, we got 97 so far. All right, now it went to get the data set atoms, it then sent it to the first AI step to check the relevance of the agent. And again, as you can see here, only 50 went through. And also, if you’re asking what the done is, this just means once everything is looped and everything’s fine, what is the thing we do? In this case, if you leave it blank, nothing will happen. Uh but you can maybe send an email to yourself saying, “Hey, uh we just finished looping through all the items.” In this case, we don’t it’s not really necessary, so we don’t have to do it. All right, so it’s good. Out of 50, only 27 went through. Now we’re using claw to rewrite the post, which will take about 40 seconds uh before we’d add everything to the sheet. All right, so now it finished, and now it’s going to the Google sheet. Now it’s going back to get the other 50. So I can see here that I mean it is a bit messed up. So if I go here and I actually format it, I can see that now the keyword is MCP. This is the original tweets. This is the rewritten tweets. Now I can use this for whatever it is I have to use, right? Which I have a stream of content ideas just come through based on the top tweets based on that topic in uh in Twitter that I can use. Hey, I’m about to show you an AI system that I built that scripts YouTube comments from any video and turns them into fresh high converting video ideas posing real feedback from your audience or even your competitors so you can see exactly what people want, what they’re confused by, and what they’re asking for next. All right. So, this right here is a full edit and automation that I built. Uh, and by the way, if you want the free resource, the whole template you can download for your account. All you have to do is go to my free school community, go to classroom, go to templates vault, and right here you’ll see the latest video that I posted with the resource that you can download. And if you’re unsure as to how to import it onto your account, there’s also a tutorial right here that I made, which is important to end. All right, with that being said, let’s dive in. So, the automation itself is is a workflow. So this is not an AI agent and there’s a very specific reason for that and we’ll talk about that in just a second. But it’s separated into six different steps. The first step is list of YouTube channels. So we have a list of YouTube channels in a channel ID. So we have a channel ID from each channel. From each channel we took the 15 posts that are most recent from their feed. We scrape comments from those posts, the most recent ones. Then we check with AI if it’s relevant to what we do and who we help and who we serve. Uh if it’s relevant, it makes a title for that idea or comment. a YouTube title, a video idea that could happen based on that comment. Then based on if it’s relevant, we also generated a hook and an outline and we store everything in notion, which is where we store everything for YouTube ideas and so on that we can then use to actually draft it and post it and so on. All right, cool. So the way it’s going to work, I’m going to run this. Um, so typically you would have this running every month, but I’m going to add a manual trigger. So I’m going to go here, other ways trigger manually right here. Connect it. So I want to see I want to show you exactly how it works and how it looks and everything around it and then we can go into step by step how it actually uh works and all the settings and stuff. All right. So I’m going to execute workflow which starts the workflow from the start. It ran over here. We script the YouTube channels. Now it’s using Apify which is an external software to be able to scrape. Scrape just means extract comments from those videos. It is going to take a while just because it’s 14 items. So it’s 14 uh videos that it has to scrape right for each each time. As you can see right here, the actor is running. So the automation is running. So we have to wait until we get the actual uh result back from here. Okay. Then once it’s done, which took about a minute or two, uh it goes to the wait because we’re waiting until we get the results back from API. And I’ll explain exactly what that means. And then once we get the actual items and the results, we in this case we have 505 comments. These 505 comments will go to the first agent. So in this case, it’s an AI step. It’s not really an agent that checks whether it’s relevant. if it’s relevant, it makes the title for our video and then sends it through here to be able to then make the hook and the outline, right? Uh in this case, we’re only passing 50 items at the time, which is why we’re using the loop over items, which means that out of 500, it doesn’t send all 500 at the same time, it sends 50, right? And then we do 50 again and 50 again until it’s done, right? Um to make sure that we don’t we don’t time out, we don’t get we don’t exceed exceed the token limit, which is something that happens with AI when you add way too much text or way too much information. Okay, now that it’s done, it only passes through the ones that are valid. In this case, it’s only seven. So from those seven, we generate the hook and the outline to then send it to notion which is where we add we store everything right here. As you can see, the topics are being added right now where we have the content idea, we have the hook and we have the outline, right? So let’s take an example. So we have how to automate meta ads inside and manage unlimited videos. Then here I have the hook. So based on this idea, we have I helped over 40 businesses automate their AI and referrals. Uh today I’m going to show you how to automate meta ads inside of manage. So this is a very simple hook. It follows a very specific framework that I use uh which is credibility and then talking about what we’re doing. And then we also have the outline right here, which is basically giving you a structured outline for the video that you can’t make uh from 1 to 8, which is great because when we’re filming YouTube videos, it’s sometimes it’s hard uh to think through an outline or you take some time to think through how you can position the video, how what you can talk about from step by step. Um instead of just going on the camera and just just speaking out of nothing, right? Um so that’s exactly where we’re going the outline as well. And now what it’s doing is that it’s going back here. It’s then doing the whole process again until all the 505 comments are being passed through. Okay, in this case only 100 went through and as you can see more and more being added to notion, more and more come. So you just have a stream of video ideas that you can use for your channel which is awesome especially for I’m on YouTube game so I’m I always do YouTube and that’s what I that’s what I do right now. Um so this is awesome. I’m using this myself to be able to just figure out what people want, what people don’t want. I feel like you don’t really run out of ideas in the AI space, but it’s still good to know what people want, what people are struggling with, um the sort of problems that they want solved, the sort of videos that you can make based on feedback from other videos, uh other comments that they put on videos, right? Which is such an underrated strategy. So, as you can see now, I have a list of topics, and again, this is running until it’s finished, until all the 500 items are finished. So, I’m just going to skip to the part where it’s done. So, because it will take about 5 to 10 minutes, I’m going to stop the automation. So it’ll take too long. Uh but as you can see now what it would do literally was based on this one channel. So only one channel went through. It took all their videos. It scripted all the comments from those videos. It sends it through here to check the relevance if it was relevant to us what we want and what we do and who we serve. Then it make the hook and the outline. Then it sends it to our database. And then it goes back here to get through all the comments. And then once that comment is done, at least all the comments are done, then it goes back and does the second channel and the third channel or how many channels you put. So, it’s a whole repetitive loop that you don’t have to really do nothing apart from adding the channels there. And you can run this every month and this just runs automatically. Um, and you just have a content ideas to just have here with the hook and with the outline. You can then obviously review, approve or or reject, right? Whatever you want. Okay, cool. So, I’m going to save this. I’m going to refresh. Um, we can go through step by step how I actually built this. This is, I would say, one of the more complex automations, but it actually is very simple once you break it down step by step. and go through the logic of what you have to do when you’re building. So again, the first step would typically be uh an on-time trigger typically every single month because you’re only scraping 15 videos and 15 videos is typically what someone uploads every month if they’re on it, right? Um which a lot of YouTubers are, which is great. So we get to pull comments from their videos or even our videos, right? This can work for our videos or their videos. So on time trigger would be the first thing. So we would have with this really on a schedule. So the schedule will be once a month and then the the first step here is to like the logic here is to have a list of YouTube channels that you can then run through each one and then go through go through the whole flow, right? Um so this node right here is for us to actually set the channels. So when you want to set the channels um you don’t necessarily you don’t have the you don’t have to put the link to the channel. You add the channel ID, right? Which is what we’re adding here. And I explain exactly what this is um what an array is and all that sort of stuff. But when you go to YouTube, let’s say I go to Alexa Mosi, right? Alexer Mosi right here on the URL, he has subscriptions and he has this long code. So I can if I just pull everything in, I go to my so I can show you exactly where the ID comes from. Okay, the ID. So we have the fixed part which is where this one and then we have the ID which is this. So we would need the ID for each channel to be able to actually scrape the channel. Okay. So when you go to the YouTube um and you want to use a channel for this in this case you would just copy this or I mean copy only this part right which is the ID of the channel and then you would add it here. So the channel ID now the reason why we are and these are three different channel ids of different competitors that I have in the space and the reason why I have this as an array is because when you want to run three different things at three different times you need it to be in an array and then split it out. Split it out just means that it takes an array which is a list of different items inside here. For example, let me show you. It will give you three different things. So, schema, channel ID zero, channel ID 1, channel ID 2, and then take each one individually and start running the automation. It will split it out, start running the automation uh individually, right? It’ll go through the first one, then we’ll go back second one, go back, third one, right? Um, so again, we have this, which is channel IDs, which is I just added channel IDs of my competitors that I can go through every single time. If I wanted to add or remove, I can just simply remove this or add. Right? In this case, if I wanted to add Alex or Moszi, all I have to do is go here bracket channel ID and then with a small L and then you add the the code and now this is pretty much set. Now these right here are called key value pairs. This is a key and this is a value. Okay, the key is channel ID, which is the same for each one. And the value is what is the actual thing. Yeah, you need a space. There you go. Okay, cool. So, that’s how you do it. Um, and this is JSON. So, the JSON has an array. And that’s sort of the the technical part to this. But if you just had an array, you have three different things. You can then split it out. So, the next thing again is splitting it out. So, we have the array. The array itself, it doesn’t run through each one individually. It doesn’t run through them cuz the array only has one thing, which is channel IDs. In this case, we want one, two, and three. Right? If I go here, execute step. Now, we can see that we have three items. So on the table, you can see that we go through the first one, then we go to the second one, and then we go through the third one. Okay? So now we’re able to actually run the automation one first, second, and then third. Okay. So what are we doing here? The settings here are basically channel ID because that’s the variable that we’re using. In this case, channel ID, which is the one here. Channel ID, channel ID. It’s all the same, right? Which is why we’re able to split it out. Include no other fields. We just want this which is where we take these and then take one individually run it second individually run it and third individually run it. Okay, so that’s why we do it. Now the reason why we’re using this loop items is because um Natively runs three of them at the same time, right? Obviously in three different things, but it runs three of them at the same time. We don’t want that. We we want to run each one individually. So to be able to only run one at a time, we have to use loop over items so that we can run this and then at the end when it does everything, it goes back. So that’s what this is. It goes back to here and runs the second one. So when we add batch size, which means how many items do you want to let through? In this case, it would just be one. We have three. You can see here three items, but we just want one, which is why we put one here. Uh once we did this, we can then edit field. So this in this case, we just have the channel ID. This is not necessary, but I just wanted to extract the channel ID so I can so I can have it. Um, let me execute the notes right here. And now I can just drag this across and put it here. So I have the channel ID to then feed in to the next step, which is where we actually scrape the videos. U, but this is something that’s not necessary. You can just simply add this to the next step. I just wanted to have something that’s more clean. So channel ID right here, which is just mapping field. And now we go to the list of top 15 videos that we have to scrape. Now, in order for us to scrape something, we typically would use Apify. So, let me go here. Apeify, which is basically a platform where people make their own scrapers. So, they code scrapers. They do the hard part. We do the easy part, which is just using it, right? And the good thing about Apify is that we um it’s actually free. So, not necessarily free because we still have to pay. But if I go here to the one that I actually used before, and I’ll explain exactly what this is. We can see that for this scraper to scrape 1,000 results, which in this case is 1,000 comments, we have to pay 40 cents. Okay? And we’re basically scraping about 20 comments, 20 30 comments per video. Uh, so we’re paying nothing really. And we have $5 for free from Apify. So if you do the math there, you’re basically paying nothing. So that’s why we use Apify here. But for the YouTube videos, we also can use something called an RSS feed. Now the RSS feed is basically a way for you to tell the web like hey using this URL go out and scrape go out and find um the YouTube videos that we can use. Now in order for us to set up the RSS feed we can go here RSS feed and then we go to this page right here and then we have to add a URL. So the URL is something that is fixed. The only thing that changes is the channel ID. So we go through here within channel ID 1 we script all the videos. Channel ID two script all the videos. Channel three until we finish all the videos. Now, how do we know this URL? How does this happen? Well, if I just go to Google and I search up um RSS feed YouTube channels, I can see that if I I usually go to Reddit or you can see here as well that you can use this. So, https w youtube. So, this is just a format for the YouTube videos. If I go here, I can see that this follows a very specific format. It follows the https.youtube.com feed subscriptions and then the code. Right? In this case, it would be this. uh it wouldn’t be subscriptions. Yeah, it would be feed. So you go here, you copy this, you would paste it here, right? And then the only thing you have to change is this part right here, channel ID here, which is where we pull in the variable from the previous step to here. That’s exactly what I did. So in this case, if we execute the step, we can see that now we I think this is next arrive. Yeah, next arrive. We um we scraped the videos from Nick’s arrive and we have 15 of them. So 15 items means that we have 15 videos and this only scrapes the top 15 videos. If you wanted to scrape more, you could use Apify um to scrape a list of 100. But I feel like for the most recent ones are good because they are the most recent ones. So they’re on top of they’re on top of like the the most recent ones, which is great to scrape. Uh which is exactly what we want. So here you can see the 15 videos, right? Why automation beginners should start this platform and all this sort of stuff. So that’s what we want to see and that’s what this does essentially and if you change the channel ID you change the videos that you’re scraping. So it’s very very easy and you can see we just ask Google and it give us the URL. Okay, if I go here then what we want to do is and this is comes from testing a lot of the videos that people post not a lot of them but some of them are shorts they’re not long form videos. So we want to be able to filter based on whether it’s a long form video or a short form video. So if I go here, I can see that the link. So the link right here. Yeah, the link right here. If it’s a short, it will say it’s a short. It will add the the name of shorts here. Okay. And this will tell us that it is a short. Now you can’t see it here because this is a long form video. But if it was a short, I think it would say https youtube.com watch I think shorts something. Uh and that tell us that it is a short. Okay, you can’t see it here just because this is a long form video. But bear in mind that we’re just saying, hey, don’t let any shorts through. I just want long form videos because they’re more validated like that’s what they’re actually posting and usually shorts are just a way for people to repurpose their long form videos and then bring them to which is exactly what we do right so okay so JSON link we’re saying hey let me drag this across if the JSON link does not contain shorts then send it through okay so there are cases let me go here so see how 14 items went through is because let me go here and show you I think there there has to be a short here because only 14 went through there we So you see how on this URL Y uh Y saturation doesn’t matter. This is a short and if I go here I can see just cuz something this is a short from next arrive right and this comparison is a long form video. So we basically don’t want any shorts we want the long form videos. So and the only difference between each one is that the short comp contains shorts here. All right, so the filter is done and then we go through the apify. So third step is scrape 100 comments from the videos. So if you go to apify and you go to actors. So again, apeify is a way for us to be able to scrape. Scrape just means extract different information from the web um for the YouTube videos that we’re that we’re talking about. We want to scrape the comments. So typically what I would do is you would go to actors or API store, sorry. And you can search for actors. Actors again are just different pieces of code, different different scrapers that you can use to scrape whatever you want. So if I added YouTube comments scraper, what I would do first is I would look at payment method because I typically want the pay on results uh or pay per output, right? Like 40 cents per thousand comments because then I have to pay. Some of them make you have to give it a subscription for API, which is the ones that we don’t want. But let’s say I go here. This is two uh $240 for,000 comments. This is Yeah, this right here is $20 per month plus usage. So, we typically have to pay for the scraper. So, we don’t want this. Uh 50 cents for,000 scrapers. That’s fine. And then 25 a month. So, we definitely don’t want this. I found a scraper. What was this? YouTube comment scraper. So, grow social grow social media YouTube comment scraper. So, if I go here, let me search it up. Yeah, there we go. I found one that’s 40 cents per thousand results. Okay, so this is right. You just have to copy this. You can copy grow media YouTube comment scraper and you’ll find this. This is the cheapest that I found and gives me the best result, right? And the thing that we can add to this uh that we can actually the fields right itself are the YouTube view URL and the maximum comments. So what’s the video and how many comments you want to scrape? So if I go to Apify, if I go here back to NNN, I can add a run an actor. So run an actor just means we’re giving you the the actual video go out and scrape, right? So we scrape it and then so let’s say I go to execute step. What this will do is it will take the URL from here it will give it the JSON link and it will tell you hey maximum comments is 100. So if I go here to runs now you can see that it’s running and we got 45 comments so far and these are all the comments right we can have a lot of comments from these videos which is exactly what we want when we are scraping videos and that’s exactly what we have with API. Now to connect your API account you just have to go here create a new credential and then you need an API key. The API key you can find I believe it’s settings API integrations and you can have yeah this right here default API token. You can copy this and then you can paste it to right here and you can save it and you have the connection and then you have to choose the actor. By the way, you have to save the actor first. So if I go to actors uh YouTube, you have to save it. So save here or start it at least make a test run to be able to see it here. That’s one of the the things that I struggle with at the start. You want to run an actor. That’s the action. Recently used actor. That’s fine. Actors here. And then the input JSON is what we get from here which is basically saying hey what’s that thing that’s going into the actor. So we put this and now we’re waiting for the feedback or for the actual output. So if I go here to runs I can see that this is still running. Um I believe we got it back or I think okay I think it’s going through all the 14 items. Okay I know why. Let me just stop this. This will still keep on running. The reason why it kept on running is because we go through the 14 items and it’s going through all the 14 videos which is why it takes quite a bit. Uh it takes like one to two minutes or two to three minutes based on um yeah the type of video it is. Um okay so once we have that we can add a weight because of the fact that here the output yeah it isn’t the actual comments we get a database uh data set ID. So if I go here to save execution so I can see the previous one that I had. Okay I went to one that I that I did yesterday. If I go here, copy to editor, I can see that this one it ran. It gave it to API. And as you can see here, we don’t get the actual comments. So we don’t get the comments anywhere here. There’s a bunch of stuff. What we need is this. What we need is default data set ID. So default data set ID is a thing that we then feed into the next node which is get data set items which needs the default data set ID. So what we do here is we go to the run after. We then look for default data set ID which is something you have to do every single time with API. It’s just the way it works. So we drag it across and this is a thing that is now going to use to be able to get the results. And now this is giving us the comment ID, common text, like count replies, all that sort of stuff, right? That we want. Once we get the actual results, what we want to do now is because of the fact that we get let’s say 500 comments like you saw before here, which is the output of the actual get data set items, we don’t want to run through 500 items all at once. We want to be able to batch them. So basically saying just like before, we don’t want to run through all the channels at once. We want to say, hey, we have 500 comments, but I’m only letting 50 through. And this is where the relevance and title come in because now we’re using a loop item again, which is where we’re saying, hey, I know we’re getting all these comments, but I only want to let 50 through. And then you can run it back and get the others that are left and do it all and over and over again until the comments are finished. So loop items once this is done is we add it to an agent. I mean in this case it’s not an agent it’s an AI step to connect your um OpenAI to NN. You have to create a new credential. API key. You can find it at platform.open.com under dashboard API keys. Create a new secret key. Create it. And then you can paste it right here. You can save it. Now once this is done, this will be text message and model. Uh the model will be 4.1 mini. Uh because I usually use a mini because it doesn’t it can take more information, right? And because right now we’re giving it 50 comments at once all at once in the AI it will take a while to process. Uh and the prompt that we give it is first assistant prompt which is a prompt that we get that we give the AI when we want to say hey you are a helpful intelligent whatever it is in this case is you are helpful intelligent content writing assistant. So we give it an identity. So the AI thinks it is that thing and it will the output will be higher the quality and then the user prompt will be below is a YouTube comment for one of the videos. Your task is to determine if the comment is relevant and if it includes any questions, inquiries or suggestions that we can use w as an idea for future video. Return your output as JSON and then we can um add a few examples. So in this case you would have a system a user prompt and then to give it a few examples you give it a user and assistant. Okay. So what this means is that we give it hey if I give you this comment this will be the output. Okay. So the user is me giving it something. the assistant is what’s the output that you you want to have and I’m giving it two examples in this case or three yeah three examples so the first example would be um is there any reason to use an AI agent node instead of basic LLM chain which is an actual comment that someone put in a video and here it will be relevant so content idea is AI agent versus basic LLM node when should you use each one that could be a solid content idea or something else this is a video from Nate uh Nate Herk um someone said a small request can you please make a video on a client on boarding. So these sort of things is exactly what we want to see, right? So someone’s asking for a client on boarding for N&M projects, the content idea in this case would be how to onboard your clients for N&M projects and this is relevant. But if someone puts thank you cuz they put thank yous and you’re great and all that sort of stuff, we don’t want to put it as a as a relevant idea because no idea here. Okay, so that’s what we’re doing. We are giving it a system prompt. So saying you are helpful, intelligent, whatever it is. Then here we’re saying hey this is what you have to do and then we want to be able to add the comment first. what’s the output that that I want comment output comment output. So it has three different examples. One that’s relevant, a one that two that are relevant and one that’s irrelevant. So it knows exactly sort of where to go. And then this is the comment. So the last u prompt which is the user prompt which you can add message here uh will be the after comment. Yeah. So we’re using JSON here because of the fact that we want the verdict and we want the uh content ID as separate variables that we can then feed in to the filter and the other steps. Okay, so in this case 502 went through in the filter only 199 went through based on the 502 based on the response from the actual uh AI and the filter in this case it’s if the verdict is relevant so if the variable verdict is relevant let me add a uh in this case it would be verdict relevant and then content idea how to make a NN agent from scratch. I’m going to pin this and then this is basically what it’s going to see. It’s going to see verdict which is the one that I put here and then it’s going to see the content ID but in this case we’re saying only if this is relevant then send it through. Okay. So once this is done we can now add some fields. So these are the fields that will be added to the hook and outline. You can, this is again is an optional step, but I just wanted to add fields cuz I like adding fields to be able to separate information. Uh, cuz again, we what we did is we scraped 100 comments. We sent it to the AI and we said, “Hey, only run 50 at once.” The AI checks whether it’s relevant or not. If it’s relevant, it will send it through to the hook and outline because it’s a relevant comment. It’s a relevant idea. Um, we could use it. Now, we want to generate the hook and outline, which we did before here. Hook and outline, which is why we’re using this AI step. But in order to generate the hook and the outline, it needs to sort of understand what we do. So what I added here is two variables which is social proof which is basically uh some results that I have and what I do and some tone of voice of direction. This is the tone of voice and direction. And this is what I feed into my next AI step which is an AI step that generates the hook and the outline like I mentioned before. And this the settings will be the same. The system prompt will be you are helpful intelligent content writing assistant. We can also write intelligent hook and outline YouTube hook and outline writing assistant. That’s more contextual to what we’re doing. And then we’re saying your task is to generate high quality engaging hooks and outlines for content ideas. You receive a content ID in JSON and you will return it in the following format. Hook string outline string. And then these are the different things that we give it. So you can see this is the projected output that we get. And now we give it a few examples I believe. Yeah, we give it a few examples. So in this case the content idea will be build a rag agent inside of nnnn and the assistant will be this. Right now we’re giving it the content ID and because we give it to we told it to give it to us in JSON which is just a programming language. Uh it will give us the JSON language into two different variables. So it will be hook and it will be outline. And the string is just something we we say when we wanted to say it’s just text, right? So we say give me the hook and text. Give me the alignment text. Give it an example. And now you can see red because it’s not uh this is not correct or like this. What is it? This. Yeah, this is not correct. But um this would pass through the content idea again which is something like this content ID builder rag instead of and now this will give us the hook and the outline which we can then send to another set variables which takes all the variables and puts them all into one place. Again, not needed, but I love to split information so we’re more we’re more structured with the way that we do things. And now once this is done, once we set the variables, we can send it to notion um the YouTube comment database where we have everything here where we want to see all the common ideas. All you have to do connect notion is go to here, create a new credential, and then you can get an internal integration secret. You should follow this guide. It will take you through everything that you need to do. It’s a bit more of a longer process. Um you can use Google Sheets as much as you can use notion. I I’m just a notion fanboy so I love to use notion and in this case it will be database page because this is a database right this right here is a page from the list in this case the database is called YouTube comment script database so we can do YouTube comment script database the title will be what’s the first thing which is this content idea so it’ll be the content idea the hook will be this the outline will be this initial comment will be this because I want to see also what the initial comment was to make sure that I know exactly if the AI I’ve messed up or not right so we get the hook the outline and the initial comment If I go here as well, I can see the initial comment. For example, what’s the average time most students take to get their first client? So, how long does it typically take to get your first client and what additional investment are needed to be on the and what investments do you need? So, you can make a video about uh how do you get your first client automation journey with zero dollars up front, right? And that will solve this sort of painoint that this person has. Um, so that’s something you could do. So, we get the comments, we get the hook, and we get the outline, we put it all into and the title, we get it we put it all into notion. And now once this is done, it will then loop back. So we go here, loop it back um to here to get the other comments that are valid. And it’ll do it all and over and over again until it’s finished. And then we wait and then we send it all the way back here where we can do the other channels. So it’ll go through the three different channels. And say you have 10 channels, it will go through the 10 channels, right? And it will just run it every single month. Uh now typically I would suggest that you run this every month or every week. Uh it depends on the amount of channels that you have to be honest. Um but because we’re scraping 15 YouTube videos, we also don’t want duplicate comments, right? Um and we don’t want to give the same content ideas. So think of a YouTuber, normal YouTuber, they typically post like what once every 3 days. Uh and in a month, um that’s about 10. Yeah, 10 videos. So if you put that in mind, you can run this every month and 5 days and it will be free, right? And I mean you would only have to pay for N andN from the start until the end which is which is a very good pricing model that they have. So that right there is for the way that is set up or we obviously have the different steps and make it a structured possible and when you look at cost and how much it actually takes to run this API as I mentioned right here. So let’s say we have 29 results and 1,000 results is 40 40 cents. So do the math there. It’s 0.00. It’s not even noticeable amount of money that I have to even mention, right? So it’s not really expensive or at all. It’s free uh because we we get the $5 free from API that you can use to be able to run this. And the other expenses really are the AI, which because we’re using 4.1 Mini, it’s relatively cheap, so there’s nothing really to worry about. I think it would be a few cents or 0.01 01 um whatever uh because it’s very very cheap like I mentioned and end so n charges you per execution which means from the start until the end so if you’re doing it maybe 10 20 times again this is very very cheap because you’re running it every month and so on right so this is very very cost effective when it comes to an actual system and that’s exactly what we have this for now who can you actually sell this to well YouTubers content creation agencies they always need to done for you especially done for you YouTube content agencies they need to always come up with new ideas for their clients. So if they have a system that scripts through all the different comments for their clients and sees it’s actually validated data. It’s not just stuff that they make up because that’s what people are actually asking for, right? Um so if they have a system like that, it saves them a bunch of time in the actual strategy and titles and hooks and outline, all that sort of stuff that they can that they have to allocate right now. Uh so you can save them that time of actually doing the actual work. That right there marks the end of the video where I showed you exactly how I built an AI system that scrapes YouTube comments from any videos and turns them into fresh high converting ideas. And by the way, if you’re looking for all the blueprints and resources that I’m talking about in the video, check the second link down below. You can go to the classroom section. You can go to the templates vault and you’ll be able to see the Nitn course right here and all the different resources that you can simply download the automation blueprint for and import it into your own account. And if you have no clue how to do that, no worries at all. You can always go to the welcome here and you have the tutorial which walks you through exactly how to do it. In this video, I’m going to show you exactly how we automated 95% of our onboarding process using notion and endn. All right, so this right here is exactly what we’re building. Essentially, it’s an onboarding system. Now, the onboarding system starts with this step right here, which is filling out an onboarding form. Now, the onboarding form is filled out whenever we close the client. So, we’re on a call, we close the client. After the call, we fill out the onboarding form as soon as possible, uh, which kicks off the actual automation until the end. Now, the onboarding form contains the name of the client, the website, and small details or general details about the client. Then, we’re adding it to the notion client HQ headquarters, which is exactly how we manage all our clients internally, all one place, uh, task, team, meetings, all that sort of stuff. So, we add the details of the new client, which we just closed, to our client HQ, uh, which autopop populates a client portal. And that’s I put it here just because it’s not a an an automation. It’s a notion based automation. So we have it here. Then we automatically add four onboarding tasks. We make the drive folder which is the drive folder that we’re going to use to store different assets for that client specifically. We’ll create a Slack channel internally which we will then manually share access to with the client. And then we send an onboarding email to the client which is saying, “Hey, welcome to the team. Super excited to have you going. Here’s the drive link that we actually created for you. Uh we also sent the Slack access. We’re going to send you the Slack access in just a bit.” And yeah, that’s pretty much it. All right. So let’s go to NN which is a platform where we’re actually building automations which is an automation platform. Essentially it’s taking a task breaking it down automating it step by step. So we don’t have to do it the automation does it itself. So we all start with the the onboarding form right here which is this one right here right where we have full name, email, company name and website. Then we have the client folder. We share the file because we want it to be accessible to everyone. We add the company to our database. We add the contact related to the company cuz every company has a contact which in this case is a CEO or whoever it is. Then we set the onboarding tasks. In this case there are four. Uh the first one is audit which is the first step of our delivery process. Then we have setting up this access which means softwares. Then there is start implementation which is essentially starting the structure for the system we’re going to build for the client. And then automation structure which is layering automations in the bigger system as well. Uh then we obvious link. Then we create a slack channel for that client. Slack is just the way that agencies talk to clients. uh you can use WhatsApp, whatever it is, Telegram. Uh probably not Telegram. I don’t think that’s for agencies. Uh but uh but yeah, we use Slack and then send email onboarding email to the client with some different variables. And by the way, this is templated. So if I go here, don’t get overwhelmed by all of this. Uh but it’s saying so to officially kick things off with you. I know investing in a service like this is a big decision and our job here is to make sure it feels like the best decision you made all year. Uh below is your personal onboarding folder with everything you need to get started. The link right here. We also made a Slack channel. Uh we’re thrilled to have you join the JM team and can’t wait to get started. Cheers, Mikuel. Now this right here is something that a lot of agencies don’t have, which is touching on the psychological angle of onboarding. Uh because not everything is technical, not everything is folders, drives, all that sort of stuff. It is still an investment that a company is making. So you want to make sure that they don’t have buyers remorse. They don’t feel like they have not made the right decision. Um so let’s actually try this out. Let’s see how it works. So all I have to do now is press execute workflow, which will essentially run the automation once. We have to fill full name, email, company name, and website. So let’s do it and then press submit. If you go back to our an automation, it shows that it’s running. All these screen steps just says it’s successful. It’s making the different task which all have due dates as well. Um one is I think 1 day then 2 days then 3 days and 4 days when the automation is running. Just finishing up the task Slack channel and then getting the email. So now if you go to our notion HQ where we manage everything from clients, contacts, tasks, meetings, analytics. If I go to clients right here, you can see that we have one media here added to the canon board which is where we manage all our clients, all our delivery uh statuses. And if I go to one media, I can see that the client portal was automatically generated. If I go to the client portal, which is essentially a place where we manage everything for clients because this saves the time of us having to email the clients for different stuff, having to find information. We want to keep everything in one place for every single client, which is exactly what this is doing. In this case, if this is sent to complete, this automatically sends an email to the client saying, “Hey, the name of the of the actual task, which is in this case, the audit, right? The audit is finished. The next step is software access. The next step is database building and so on.” So, it goes step by step. So, it’s all automatic as well, the updates to the clients. So, we don’t have to manually do it. Uh, we can keep software access here. We can then have databases. So, in this case, it will be resource area. We can add any folders and so on. And then the miro would be the mirror for the audit because our first step of the delivery process is actually auditing what they have and mapping everything out step by step with the whole team. So we put this all stuff here. They have access to this. If I go back to the client, if I go to task, I can see that these four tasks were autopop populated for the specific client with due dates that are 2 days, 3 days, 4 days in advance depending on what you want. Uh but this is what we like to have. You can see the task progress which is so if I say I put complete, it shows 25% task progress. And if you have a bunch of clients here, you can see all the tasks you’ve done, the percentages and so on. So we have everything in notion right here which is autopop populated again. And also one more thing the tasks are stored in notion as well. So you don’t need another project management tool. You don’t need to store clients another place, right? Everything is in one place for notion. So with task is here. Companies here. If I go here I can see that the website is stored here. The address, the email can be stored separately. If I go to contacts, I can see that one contact was here which is the person from the email to with the with my email as well. We can also add more fields like phone number, type, right? RO title, time zone, and so on. But just for this case, to make it simple, we just want to leave it like this. And then if I go back to the email right here, I can see that I got an email from JM Solutions saying, “Hey, Mika, so pound to efficiently kick things off with you. I know investing in a service like this is a big decision. So our job here is to make sure blah blah blah.” And then we have the onboarding drive folder. If I press here, this will take me to the drive folder, which is named with my company name. So one media onboarding folder in this case. And this is where we can store any creatives or anything that they have, brand assets and so on. Whatever it is that they have, um, they can store here in the drive folder. And the client itself just gets a nice email sent to them uh, automatically without the team having to do it themselves. And if I go to Slack, you can see that we have the one media channel right here, which is a channel exactly for that client specifically where we can store anything. We can communicate with the client. Uh, cuz for any agency service that you have, it’s a good way to communicate with the client itself, not being on email. uh cuz when you want to do quick things, it’s good to be on something like this, WhatsApp, whatever you have works. So this is automatically generated as well. And that’s the full onboarding process right there. So again, we all started with a form. We then put it to notion where we have a place where we can store everything. We generated the client portal, which is something else that a lot of agencies don’t have because they scatter in different tools to find client information. In this case, I said, look, let’s put everything in one place in one portal where we can manage everything for that client, which is so so good, especially because it sets the expectations, but it also increases the way that the client views you because you’re more professional. you have your together basically uh all in one place. Then we have the onboarding task as well so the team knows exactly what to do. They’re alerted as well uh so they can get started on the project. The drive folders automatically generated the Slack channels done uh so that everybody knows exactly that we have a new client rolling and then the onboarding email is sent to the client. Now something like this depending on the agency really uh it will take around well anywhere from an hour to days. I’ve worked with agencies who take days to do this uh which is which is utterly insane. uh when we have this automation right here that does it in seconds all by filling out a form. So this is such a powerful automation. It’s high leverage for the time that you put in. The output is so so good and it’s so so powerful which is exactly why we recommend it to all these agencies. And this was all done using notion right here and then using NN right here. Hey about to build a live LinkedIn outreach system right in front of you. We start by filling out a form with the details of who we are targeting. From there, it actually scripts thousands of leads from Apollo, pulls in their LinkedIn URLs, and automatically drops hyperpersonalized connection messages that we can plug straight into our outbound campaigns. Okay, so as always, I’m going to run it from the start until the end, and then we’re going to go to actually building it step by step. So, let me execute the workflow. This will then bring me to the form right here. So, let me say I am targeting real estate agencies in the US. I’m going to press submit. What this will do is it will send it to the first AI to generate a URL which will then add or send to the scraper to then scrape the leads. Um, and by leads we mean LinkedIn URL. So we can see this is running right here because we’re using API. As you can see here, we’re starting to get results and we get the first name, last name, LinkedIn URLs in the ID as well. Then we send it to the next node in order to extract the details. Then we only send 20 um details of people. We just send 20 people through the first loop and then we dropped a hyperpersonalized connection message for that specific person based on their bio, based on who they are and so on before adding it to our Google sheet database which is where we store everything right here. So you can see we have the different first name, last name, the name as well, the LinkedIn URL, the title, the email status, the photo URL, and also the icebreaker that we can um generate based on their profile. And if I go here, I can see that we’re still running the system because we let 97 item through and then we’re sending 20 and 20 and 20 until it’s actually finished. If I go here, I can see that we have more and more leads that are being added. So, I’m going to stop the workflow right here cuz you got to see exactly what it is. By the way, these are just icebreaker. So, connection messages that you send to the lead when you want to connect with them. uh which increases drastically increases the likelihood of them connecting back and you being able to have a conversation with that person and a being actually personalized. So let’s start from scratch. Let me make a new workflow right here. Personal. There we go. Let me start from zero. But as always, as you guys know, we’re going to be mapping things out step by step into our Miro. So let’s dive in. All right. So here we can start mapping things out. Again, an automation has an input. Let me make this smaller. We can zoom in. And the output, right? And in this case, the input because we want to basically uh we want the thing to be dynamic. So it changes every single time. But the input in this case is who we are targeting. So target audience. And then we start thinking about how can we actually give it the input. Well, as you saw, we used end to end forms, but you could also use a telegram message or Gmail coming through or something else. So in this case it can be target audience from and it’s unformed. Okay. And then make this smaller and let’s put this like this. Cool. Then the next step is actually scraping the leads using Apify which is a software that allows us to scrape leads. And I’ll show you exactly what I mean. And then we want to be able to generate personalized connection message to that person and then we want to be able to send it. So add details to Google sheet database. Perfect. All right. So we have target audience from any form. Then we have scraping the leads using aify. Then we have generate personalized connection message um using the the details of course and then we want to add everything to our Google sheet database which is the one right here. So what I like to do when I make automations is I actually like to go step by step and show you exactly my thought process how I think through building automations um just so you can see everything you can see the whole scope. So the first step here is target audience. So we need a way for us to be able to give the input. So as you saw before I used nitin forms. This is where we go to end and we start actually building the automation. So I’m going to add the first step which is in this case called a trigger. A trigger is the thing that starts the automation and we can go to on form submission right here. And this is where you basically make a form. Now the form can in this case it can compile of the I guess describe your target audience or describe your audience that you want to target. So we can name this LinkedIn lead outreach trigger. Description can be insert an audience for your LinkedIn outreach campaigns here and then the form elements which is in this case what are we actually asking the user to input to then start the automation. We can add a field name called describe your audience in plain English. And we want to leave this as text. Yeah. text text area. I actually don’t know the difference between text and text area. I believe that this is uh wider text. So it can be uh long form rather than short text. Uh so leave this as it is. So we can leave this as is. And the placeholder can be company name, company types, sorry, location, etc. So this is the thing that they see before actually writing which gives them some ideas as to what input they can give. And let’s make this required. So now if I go to execute step, which means that I’m just testing the automation, it brings me to this page where I can see the title, the description, the um the first question, and then we can see that we have an area for us to actually make the text, which we can Oh, that’s why that’s cool. Um so let’s do again like we did before, real estate agencies in the US. I’m going to press submit. As you can see, this is a test version of your form. And here we can see that we got the results which is this right here. If you go to schema we can see that we have it in this way which is exactly what we need in order to go to the next step. All right. So once this is done uh this is good. Let me go here and make this green again cuz it’s all step by step. We want to be scraping the leads. So based on the input based on uh what is it right here? Real estate agencies in US. We want to be able to then send it to Apify which is apify.com which is the one right here. And I like to think of Apify as the Amazon for scrapers. So you go here, you basically choose your product. In this case, it’s a scraper. And for those of you who don’t know what a scraper is, it’s basically saying, let’s let’s say we do um Google map scraper. This basically extracts. So it goes to Google Maps, it extract the text, it extracts the location of businesses, the reviews, all the stuff that we want from that specific software. And then we can use it for whatever we want. And for us, for this automation, we want to be using Apollo. So, Apollo is another software that allows us to be able to scrape LinkedIn profiles based on a specific criteria. So, it can be um real estate agencies in the US, which is the one that we have right here, right? We want to put this in. And the output, we want a list of leads. So, for us to be able to do that, we have to make an account. And then you’ll be able to come to this page right here. You’ll have the API store. By the way, if you’re asking yourself, is this paid or is this free? Well, um the script that we’re going to be using today is free depending on how much you use it. So, the way that API works is that they give you $5 for free every single month. And the scraper that we’re going to use is about $1 for a,000 leads. Okay? So, if you use uh $5, that means you will have 5,000 leads for free every single month. But anything that you use above $5, that’s something that you’re going to have to pay. Um, okay. So, once we come to the API store, again, like an Amazon store, we just look for a product, and the product is Apollo Scraper. And then we have different options. So, how do you know which one to choose? Well, the first thing I do is actually look at how many people used it and the price. This right here is good. I know Curious Coder is a guy who makes a lot of Yeah, as you can see, he’s already here as well. But the one I used is actually this. I used it because of price, uh, but also because the amount of people that actually used it. And the way that this works is you pay this per event. So, you pay per event. What this means is that you pay per usage. And the price is right here. So, $1 per,000 leads. And you can do up to 50,000 leads, which is exactly what we like. Um, and this page right here, it might look intimidating. It’s actually quite easy to understand. The only thing you have to understand here is like what’s the input? What is the thing that I’m giving the scraper in order for us to get the data back? Well, in this case, the input is the Apollo URL. Now, the Apollo URL is a URL. So, let me show you here. Let me copy this. Let me paste it. It’s a URL that allows us to basically say, hey, we want this type of person. Look, person title, uh, contact email, exclude, catch all, all this stuff is a criteria for the person that we want to extract. And this will now make a list of leads that we can use for whatever we want. So, so the input here is the Apollo URL. That’s the only thing that we have to get in order to give the scraper the thing that it needs to use to then give us the leads. Well, in this case, one thing we didn’t add here is the AI that we use to make the URL because the URL changes based on who we’re targeting. So, in this case, it can be AI to make Apollo URL. That way when we put the target audience, we give it to AI. AI knows the framework of that URL and how it usually works. Um, and I’ll show you exactly what I mean here because it is a very specific thing. And then we have the URL which we can then feed into the scraper on API to then give us the leads back, give it to AI to make the personalized connection message. And then we can add all the details to the Google sheet. All right. Uh, let me go back here. And now we can use the next node which is an AI. So we can go AI. We’re not using an AI agent because we just want the AI step. Let’s use OpenAI. That’s fine. And we’re going to use message a model. And in order for us to be able to connect our OpenAI to uh NSN, we have to go to platform.opai.com. Make an account. Go to dashboard. Go to API keys on the top right. Create a new secret key. You can go here, name it whatever you want. And then test. You will then have this key right here, which you can copy and paste it back here. API key. And don’t worry about any of this, okay? Okay, the only thing you have to worry about is the API key. All right, once you connected your API key, let me take this off. Um, we can do text message model. The model that we want to use is uh let’s say GPT5. GPT5. Let’s see if we have that cuz it is something that we don’t want any errors on. Um, let’s see if we have GPD5 here. Yeah, let’s do chat latest, the latest GPD5 model. And for the prompt, I’m going to give it a system prompt, which is basically saying, hey, you are a identity. You are a helpful intelligent whatever it is. And then a user prompt. So system and I’m going to say you’re a helpful intelligent sales assistant. And for the user prompt, I’m going to paste the prompt that I had before so you guys can see it. Uh but again, you can grab the whole template at the end. I’ll show you exactly how to do it. As you can see here, it says, “Your task is to take as input a natural language description of a prospect audience and turn that into an Apollo search URL.” Now, here’s an example of an Apollo search URL. So, I gave it a few examples. Not not few, just an example right here. You can see it has United States. And this is in a very very specific order, which Apollo likes when we want to be able to script leads. Uh the URL describes a search for people that are located in the US, hold the title, owner, CEO, founder, and partner, have a keyword associated with creative agency. And these are the fields that you can change. organization location, keywords, person titles, and organization number of employee ranges. Do not add and change any fields. Use the above template. Return your response in JSON using this format. Search all. Search where all goes here. Okay. So that way we basically say, hey, this is what the structure is like. These are the things you can change. And as the last input, we’re going to give it another user prompt, which is the target audience. Okay. So I’m going to say here is the audience I am targeting. And by the way, I just dropped it in from the form. So this is a variable that I can pull in here and then start the automation. And that’s how automation fundamentally works cuz it’s all dynamic. It changes every single time cuz you see here it might look like code cuz it is code. Uh but it’s just a variable from here. And then lastly, we have to output the content as JSON because as you can see here, I I told it to return your response in JSON because I just want a variable. So what I’m going to do now is I’m going to execute the step which means I’m going to test this. And as you can see, I got the search URL which I will then be using to give to the scraper to then be able to scrape the leads. So now that this is done, um, perfect. Let me rename this to generate search URL. The next step is actually using API to be able to scrape the leads. So I’m going to go here, look at API. I’m going to run an actor because again those different things are actors. They’re scrapers. And then to connect your API, you have to go to create a new credential. You need an API key right here. I believe that you can get your API key on settings API and integrations and you can um copy this default API token and then you can paste it here. Have the connection and that’s it. Once you connected it, uh which one is it? Okay, I’m going to bet on this one. This one right here. Uh the actor is the thing that we’re using. The uh action is the run an actor and then actor source. This is fine. Uh very very important though, if you don’t see it here, if you don’t see it in the list, which I do, which is this one right here, you need to actually run this once because yours will say start and save. Once you start and save, it will run it once. That way you can actually save it to your account. So you’re able to see it here. And then the next thing it shows us is an input JSON. So if when you look at this, you’re like, “What the hell even is this?” Uh, well, if you go here to the input, there’s two different ways that we can run scrapers in Appify. We can either use the platform itself and just run it and then get the data, or we can use it automatically within our automations or Nitn or Makecom or Zapier, whatever it is, um, to be able to automatically do it. And so because we’re using Nitn as our automation software, we have to give a JSON. So this right here is an input JSON like the input that we give the scraper which we can find right here right we can just copy this and we can delete this and we can paste it here okay and the only thing that we have to change is this because right now it’s fixed if I run this it will always take this URL but we want to change the URL based on the URL that we have here so search URL which we can drop in here okay so copy this and put it here I think this always happens There we go. So now the green variable is this thing that changes every single time and all these other ones are the same apart from max search result which we can leave to 100 or actually yeah you can do 100. What this says is like hey scrape the leads. These are the maximum amount of leads that I want you to scrape. Okay. And we do this because as I mentioned this is paid. So you basically want to maximize or you want to limit sorry you want to limit the amount of leads that you want to scrape from that scraper. Okay, so now we have this. Then we want to wait for finish, which means that we send the data, we then wait until we get the data back. And then we can move to the next steps. So I’m going to execute the step right here. Let me actually pin this P and then P. I’m going to run this. So you can see now this is running. And if I go to here to runs, I can see that we have a new run running right here. And this is fundamentally how you test. You go to the API platform and then you go back to inn and so on. So now you can see that we got a list of leads and I mentioned the maximum amount of result that I put was 100. So we’re going to have to wait until we get 100 or we can just simply stop the automation and just test. That’s how I usually do it. Uh but let’s wait until we get 100 result to then be able to go through the next steps. All right. We can see here that we have 97 results. Uh close to 100. And if I go to NN at any second now, we should be able to get the run um or finish the results of the run. All right, we got 100. Let me go here and at any second now we should see the output that is generated. Cool. So as you can see this is what we get out of the scraper. But the one thing about Apify that most people get confused about is they start thinking where are the leads like where do they where do they come? Well there’s an additional step that we have to do before we actually get the leads because right here this is running the actor. Once we finish running the actor what we get is something called a default data set ID which you can find here. default data set ID. This is the ID that we then give to the next node which is let me pin this real quick so I don’t have to run this again. The API uh get data set items right here. [Music] Same connection data set get all items. And now we give the ID to this node which is the one below here to then be able to extract the details from that output. And I’m going to put the limit to 500. I’m going to execute the step. So you can see now we get 100 items which are the 100 leads which is first name, last name, name, LinkedIn URL, title, email status, photo URL, Twitter, we get employment history, we get a bunch of stuff, employment history, a bunch of employment history, we get street address, we get organization, we get a bunch of stuff. We get everything about the actual profile which is amazing. And once this is done, then we have to go to the next steps. So let me go here. Let me make this green. Let me make this green. The next step is actually generating a personalized connection message using AI. Now there’s only one thing in between this and the AI because when we think about this, if I just add an AI step, so AI open AI message model and so on, right? Let me just configure this later. This will basically send 100 items all at the same time to the AI. And if you wanted something more scalable, ideally you want to send maybe 20 at first and then loop back and do another 20 and another 20, another 20 until it’s finished because then you give it space. You give it time or room to breathe to then be able to actually generate a better output or for it not to fail. So in order for us to be able to send only 20 at a time and then it finishes the whole thing and then goes back and 20 at a time, we use something called loop over items. So if I go to loop over items right here, the only thing that this asks you is, hey, how many items do you want to send through at a time when in this case we want to send 20, right? Let me delete this. So you can go here, delete and delete. And now using the loop output, we’re going to go here and it’s basically saying, hey, okay, we have 100 atoms. If I run this, it should run or not. Oh, it shouldn’t run. Yeah, cuz this is just the the actual node. Or it should run. Then it shows us that out of 100 items, it only sent 20 items through. So that we have 20 items and then we use AI to generate the personal message. We then give it to the Google Sheets. Then we send it back here and get the next 20 items and do the whole thing again until it’s actually finished. And this works for any amount of items. Even if you have 5,000, it will always loop back, right? And this is a cheat code that I like to use whenever you want to make your automations more scalable over time. Because again, adding one more step, you’re not going to pay more because the Nitn you pay by workflow execution, not by step. Uh, which is exactly why I like to use this. So now we want to be able to generate connection message. Okay, by going here again, you already connected your OpenAI on this step. So you can use the same exact connection. Let’s just use GBT4. Yeah, you can use this 4.1 mini. I think it’s good. um and the user. So in this case, system prompt first because we always use a system prompt to give it an identity to make itself think that it actually is that thing and the equality of output would be better. Um is you are a helpful intelligent writing assistant. And this is always how you should structure your prompts. Always a system prompt first and then sorry about that. Um and then a user prompt and then you can do another user prompt or whatever it is you have to do. Now for the sake of time, I’m not going to be writing the prompts from scratch again. Um, I’m going to paste them here and then show you exactly why they’re there and how they work. All right, so I just pasted the prompt. Let’s go through one by one. We have a system prompt as I wrote before. Then we have the user prompt, the first one, which is your task is to take an input of a bunch of LinkedIn profiles and then you basically have to return an icebreaker. So the icebreaker is the connection message. Um, in order to ensure the icebreaker punching high quality, make them follow this template. So we give it a template that they can use. Um, and it can say hey name love seeing thing about them. So you can say something specific about them. I’m also into plausible tie-in, which is something more specific about them. Um, and then you can say four thing about them and plausible tie-in. Never use the extract information provided in LinkedIn field. Instead, always paraphrase. This makes it seem more human written and basically give it a few instructions that they can use. But this is essentially the structure that we use. Okay? And these variables are the thing that we change every single time that the AI is smart enough to change um when we give it the actual data from that person. The next prompt that we give it is another user prompt. So now this is where we start to get two examples. So this is where we start to use the assistant prompt. Uh the first thing is a user and then assistant. So in this case we’re giving it an example because we wanted to I guess have something in mind that it can come back to as expectations of what we expect the output to be. So we give it an example in this case LinkedIn fields Danielle um founder and CEO creative agency uh regional sales director previous experiences and then we actually give an assistant prompt which is the output that we should expect in JSON which is hey Danielle love seeing your creative agency journey I’m also building brands thought I connect something short and sweet very very uh personalized and very human right um which is what we want so we give it a user and assistant and then lastly we gave it the actual data that we want it to use uh to be able to then make the icebreaker. So, LinkedIn fields can be first name, the last name, which we get from here. So, first name, last name, LinkedIn URL, title, uh I believe that we have previous experience, so the company they work for, and there’s a bunch of fields here. Again, if you get the template, you can copy it like literally word for word and prompt by prompt. Um, so you don’t have to do this again, but we give it different fields as you can see here for it to use to then make the icebreaker. Okay. So, now let me pin this. Let me pin this. I think I can pin this. No, I can’t find this. Um, and let me execute the step. So, now I’m testing this. All right. So, the output uh was done. And as you can see here, I actually messed up because I forgot to turn this on. So, you can see here the content that we got was actual JSON. Well, we don’t want the actual JSON. We want this right here. Right? So, what we do to fix that is turn this on. And now if we execute the step again, what this should do now is it should actually output the icebreaker not in JSON but as an actual sentence. All right. So you can see here we have the icebreaker uh different from before because it’s not in JSON anymore. It’s an actual like something that we can actually use. And lastly, this is where we get to the Google sheet. So this right here, all good. And now we get to the Google sheet part. Let’s go here. I’m going press plus Google sheet. Uh append a row in a sheet. First of all, make your connection. Just sign in with Google or yeah, sign in with Google right here. It will take you to a page like this. You can choose your account and then it will come back say successful and everything’s good. Now, I already made the sheet, but I’m going to make it again um because I want to show you exactly what it looks like even making the sheet. Let’s go to sheets new. Quick hack to make a new Google sheet. And then, as you can see, we need different fields. So, if I go here, I can see that the different fields are ID, first name, last name, thank URL. So, ID, first name, last name. Let’s do LinkedIn URL because I noticed that this was just a name, the first name as well. Then we have title, email status. I don’t know if you need this cuz there’s no email that we’re getting. So, title, photo, URL, and icebreaker. Title, photo, URL, and then connection message. Let me make this um dark blue. Make this white. Let me make it look pretty. Perfect. Go here. And then quick hack view. This res up the ro. So if I go like this, I can still see it. All right. So now that we have this, I can do connection message LinkedIn and YouTube tutorial. really long name just so I know exactly what this is. If I go back here, I can see that now I can uh resource is the sheet within the document. Then we want to append a row. Append just means add and then the document that we want to use is the connection message, LinkedIn and then YouTube tutorial. There we go. Right here. And the sheet will be sheet one. We want to map each column manually. And now this is where we start adding the different fields. So I can go to ID. Yeah, this is the ID, I think. Yeah, this is ID. Let me go first name. First name right here. Last name. And again, you could like you could spend a few minutes like trying to figure out where everything is right here. I just like to put everything here. I mean, you could also do this, right? Or title a photo URL. Yeah, maybe I was just tripping. Maybe we should do this. Uh, it saves more time. And then the icebreaker is the thing that we use as the connection message. Nothing. That’s it. Right. Let’s rename this. Add leads to Google Sheets. Let me save this. U. And now you see this ends. This right here now needs to go back to loop of items behind. There we go. So that we loop 20 and then we go back here, get the next 20, the next 20, the next 20 until we get these many items. Okay. So we do everything. We spit basically we split it. We loop over items. That’s what this is. All right. So, let me execute the step. Let me test this thing right here. Um, I should be able to see different leads coming through. If I don’t, then something is wrong. We can fix it. Okay, this has to run first and then we can wait for everything to go to the Google sheet. Right now, it’s running. We can see that now we have the different leads. So, ID, first and last in LinkedIn URL. Let’s go here. There you go. Gino, what is up my man? Real estate agency. There you go. This is so good. I mean, you can actually just Oh, I can’t. Yeah, you can actually just connect to them. So, connect, add a note, and then literally just go here. Uh, no, here, copy this, go here, paste it, and then actually just send it. Let me actually just send it. There we go. Boom. And that’s it. And that’s how your campaigns can actually run. And you can do this for every single one. And the best thing is you saw me do it manually, but there’s so many softwares that can automate this. So you simply can have a machine running through in the back end that’s personalized, like hyperpersonalized to each person because again, you can only send 30 connections a day maximum. I mean, you can, but you you risk getting banned on LinkedIn. So if you have an automated platform, you can only send 30 a day. So 30 * 30 900. Like typically you’ only need 900 leads right here every single month. God, why do I keep going back to this? Um, you would only need 900 leads right here every single month that you can go through. And again, we can scrape 5,000 for free every single month. So, this is literally a no-brainer. Like, everyone should be using this if you want u to to I guess run a campaign or run something in the back end that can work because the alternative is just you doing it manually. Hey, in this video I’m going to build a full sales coach system inside of Eniden that takes a transcript of every single one of my calls. It sends it to a custom sales coach GPT that is trained on the best sales frameworks in the world and then delivers a full breakdown on Slack with everything that I could have done better. By the way, this is literally the exact system that we’ve sold to a business for 3K. So the first part of the automation is actually me ending the call which triggers a web hook means it sends the data to end saying hey we just finished the call review it right now obviously I can’t do that right now because I’m not on call but what I’ll do is I’ll send a request to this web hook so you can see what it actually looks like. So we finish the call then we send the data here. What it does then is it uses Fireflies which is the software that we’re using for meeting notes uh to extract the transcript. Then we’re sending it to a sales coach GPT which is on our platform the OpenAI um platform here which is trained on a document which is this one right here which has a bunch of frameworks and questions that you should ask uh for different parts of the call which analyzes the full call based on that framework and then sends us a message on Slack. Right here we can see that it broke down the start of the call and also the objections. Clarify objections. So you missed an opportunity to clarify the prospect’s objectives early on. A question like what specific outcomes are you hoping to achieve from this automation? Would I set clear expectations and direction? That’s pretty true. Instead you ask, can you run me through your company first? Which turn the focus away from the immediate needs. Now that’s pretty good uh framework. Of course that was this a few months back so I wasn’t the best closer. I was trying my best but there you go. So it took all the call and it analyzed it based on this exact framework, right? Which is a framework that we use in sales. I’m going to start from zero. So I’m going to go plus workflow personal and then start from zero. So you get to see what it actually looks like. And we can start. And as always, we never start here, but we start here, right? Because we want to map things out before we build it. So every automation that we build has an input and has an output, right? So the input in this case, let me make this unbold. By the way, if you’re wondering what platform I’m using, it’s Miro. Very good. Uh the input in this case will be the call recording or call transcript, right? This is a pretty easy system. I’m not going to lie, but it is one of the most ROI. And what you’ll find is that the easiest systems, not the easiest, but uh the ones that are easier to build that are not super complex with 50 AI agents, uh they’re typically the ones that give the business the most value. Okay? So, call transcript, which is a transcript of the call. And by transcript, we mean what’s everything that has been said. And we know this works because we have meeting note takers. So, for those of you who don’t know what meeting note takers are, let’s go to Fireflies, for example, right here. Fireflies, not this, but this is a noteaker, right? What this does is that it joins the calls when you’re on a call with a client. So you hop on a call with the client and you let it in and it’s sort of like a like a live noteaker. So it’s there, it doesn’t speak, of course, it just takes notes and it transcribes the call so you can then use it for whatever it is. I typically have uh the noteaker on every single call just because it’s great if you missed anything on the call that you want to look back or action items or things like these which are great. That’s what we would typically do. So call transcript, we would use fireflies. So, let me put here Fireflies. You also have Fathom. You have Sibu.ai. You have Loom. Uh there’s a ton of stuff that you that you have in the market. They’re all pretty good. So, call transcript. And then we want to basically send it to the GPT sales GPT. So, we’ll have to make a GPT on the open air platform, which is actually very easy. Don’t worry. Uh to to analyze call. They make this here. And then we have to send Slack message with breakdown with feedback. There we go. See, crazy system. $3,000 for something like this. Uh that took me about what, one to two hours cuz it was the first time. Uh but if I were to sell it to another person, I would take maybe 30 minutes. Um, it all really depends on what document you’re using to the GPT to actually compare the sales call. All right, so with that said, let’s start here. Uh, let’s start with the first step, which is call transcript. So, because we’re using Fireflies, what I’m going to do is I’m going to open up. And you’re going to have to make an account. I have the free account, so I’m not paying for this. And you can see here I have meetings. I have all the meetings with everyone that I’ve had. I believe that I’m above the rate, which is cuz they gave you like 600 minutes of free calls. But here’s all the meetings that I have. And so with every single meeting that I’ve had, we can transcribe it and use this exact automation, which is amazing. And especially because I’ve had days where I’ve had five calls. And so I wanted every single call transcribed and gave me feedback and so on. And it happens instantly cuz it’s right after the call. So where am I going with this? We have to go here to the settings. And then we go to developer settings here. And we can see that we have two different things. So we’re just going to play around with these two different things. So the first thing is the API key, which is sort of like a password. If you use chatbt in your automations or claude or gemini or grock or open router, you always need an API key which is a password and then we have a web hook. And this is really why we’re able to make this automation happen is because we can transcribe it triggered when transcription is completed. What this means is that you go on a call with the client, it finishes, it then finishes transcribing the call which takes about 3 five seconds and then it sends a signal to the automation saying hey this is the meeting recording or this is the meeting ID and then we send it to the next step to take the meeting ID and then take the transcript from the call. Okay, it will make much more sense once I actually build it. Uh but bear in mind that we are able to send the notification to the automation once a meeting is finished. So the first step is actually adding the web hook. If I go to end right here, I can add a first step which is the trigger which is what is the thing that starts the automation. And here we have on web hook call. So again web hook is just a URL that people use or the servers use to send signals back and forth. Right? So the web hook is made right here. You don’t have to do anything. Just get this just press on it. You copy it and then if you go back to Fireflies you can paste it here and you press save. Now a very important thing that we currently have a test webbook right if you want to go in production. So if you want to make this live activate this you have to change this to a production URL. The only difference is is that this has this in production doesn’t right that’s it. So in theory now if you have a call with a client and you bring in fireflies then once a call is finished it will send a signal to this web hook. So, as I mentioned, I’m not able to be on a call right now, but I have the request that we typically get from the call recording. Right now, in order for us to send a example request, we’re going to go to Postman API, which is a new thing that I haven’t introduced before. Uh, but it actually is a really, really good software. It’s actually very easy to use. It looks a bit fancy and techy as well. Um, but we use this when we are testing web hooks, right? Because something like this to test it, you would have to go on a call. You had to finish the call. You need to say something on the call and it would take too much time for it to test. So what we do here is we set up a sample request, example request. The first thing we need is to um to add a URL, which is this right here. So copy this and paste it here. And we want to make sure that this is post because get is getting information. Post is sending information. So in this case, we’re sending information to the web hook. And because that is post, we also have to change this to post. There you go. And then we need the body raw. So this is a JSON. JSON is just a language that we communicate software to software. And we have to set up the requests. So we have to set up the actual variables that go into the web hook for it to start the automation, which are the ones right here. So we get a meeting ID and event type. So right here, if I listen for test events, I can press send, and this will send the information here. So again, if this looks a bit complicated, just understand that we’re not able to test this. Okay, I have to be on a call. So we’re using Postman API to send a sample request here. And this is exactly what we would get every single time when the call finishes. So it’s purely just for testing. As in when we go live, we don’t use Postman API. We just use the web hook from the Fireflies. Now that we have the meeting ID and we don’t have the transcript, we now have to figure out how to take this transcript from this meeting ID. So a meeting ID is like a unique identifier for every single call that you have. And so if I go to Fireflies meetings and I go to like a random one, say on here, this one right here, the URL on the top, if I go here, I can see that this is the meeting ID. So the URL is pretty standard and the only thing that changes is the meeting ID and the meeting name. So going back here, we have to take the meeting ID, which I can pin now. I don’t have to use Postman API anymore. Uh, and then we can um look for Fireflies right here. Fireflies. You would have to install the thing. It takes like 5 seconds. It’s fine. And now we want to get the transcript. Get transcript. So as you can see to get the transcript, we just have to put the transcript ID. Now the first thing you have to do is go here, create a new credential. You have to get the API key which you can get here. Uh what was it? Settings, developer settings and API key. Just copy this and paste it here to connect your account. Choose the right account. And now the resource which is what is the thing that we are changing or in general what are we doing? In this case, it’ll be transcript the operation which is what is the action that we’re doing and you can do a bunch of stuff and the transcript ID which we get from here meaning ID. By the way, most of these variables you don’t actually have to know anything. You just have to know the body which is the actual variables that we get which is a meeting ID and event type. And that’s it. So now that we have the transcript ID, we can press execute step. This will now I believe take the transcript. Yep. And the problem is that we have an array. So, it didn’t give us the transcript altogether. It gave us different bits of the transcript. So, sentence one, sentence two, and this well being a two-hour call is really, really long. See, we have about 444 sentences. It breaks up the transcript into sentences. So, naturally, the thing you want to do here is take the sentences and put them all together. So, the next step is to do that. So, we have to pin this. And then, and by the way, I’m pinning this so I don’t have to rerun it again. I can go to edit fields which is basically taking a sort of variable and changing it manipulating data right and we’re trying to get the sentences which are all the way here really really long and put them all together to do that we can just call this transcript so I’m setting a variable and now if I go full screen I can sentences because this is the array again an array is this whole thing full of all the variables together and we just want to extract the raw text and to do that you have to go Here I believe that is map. Yeah, map. Cuz we’re mapping. We’re saying, hey, inside this I want raw text. So be item equals item dot uh raw text. There you go. You see how we have all the sentences here right now? All the sentences. And the last thing is to actually join them. So join which is basically taking out all the quote marks and we just have a full transcript of a call instead of this right sentences with a bunch of variables that are so so long cuz we could theoretically feed this to AI but it would just be way too large it would break definitely break so we just have the transcript that we need okay so what do we do we took the sentences cuz it’s 450 sentences or more but you scroll all the way down and we’re taking the raw text which is the actual text from that sentence So we just have all the sentences together and this is the formula we use map item item dot the actual name of the item which is raw text plus join so join which is joining everything together and that’s it. So now that we have the transcript going to execute step and the JSON will just be the whole transcript. So I’m going to rename this to clean transcript and the next step is actually the the sauce of the whole system. So this is done. So the next step here is to make a GBT. And by the way, a GBT is just a thing like an AI assistant you could say uh that is just trained on a specific thing, right? That allows us to be able to analyze to talk to to do XYZ. And why is it better than just a normal one is because we give it examples. So for example, Mosy GPT is trained on 200 hours of content and two of his books, right? All right. So, you ideally want to use this instead of using the general chatgbt uh search bar because this is trained on these documents. This is more specific. And so, in this case, we’re not going to use a GBT here, but we’re going to go to platform.openai.com, which is the API platform, right? Where we actually use automations back and forth. By the way, I made a full video showing you how you can build with agent kit video up here. But the thing that we want to do is to be able to create a project. So, if you just logged into platform.opai.com, you most likely don’t have a project. So, create one. Let’s name it uh in it and test create. Go to dashboard. Go to assistants because these are the assistants that we make. And by the way, if I go to my previous project, you can see that I already have assistance. You can press create an assistant. Create. And now this is where we make the GPT. Okay. The thing that actually uh is going to be able to analyze our calls. So I’m going to name this sales coach. And the instructions is the prompt. So let’s say I want an AI assistant to just give me feedback on my sales calls. I am taking sales calls every day for and I have an AI automation agency that helps clients to automate their processes and be more efficient in the business. And the founder is Mikuel M I C H E. And I’m the one who’s hopping on the calls and I’m also the sales rep. I’m doing everything. Um so there you go. Press create. And I’m using AI because typically that’s what you guys would do. But I’ll show you exactly if this is a good prompt or not good prompt. And this right here wasn’t here. I believe a few months ago. I think it’s almost recent. And it gave us a full um prompt. It’s actually not bad. So the founder is Mikuel. You don’t have to spell it step. I just didn’t want it to say Michelle. That’s cool. Uh providing actionable feedback on sales calls for any automation agency founded by the user. Let’s write in markdown formatting. So overview this just means heading one. So it just hierarchy of like text just as you would for a normal essay. And then here it would be objective. Your objective is to analyze each submitted sales call. Identify strength. That is pretty decent. Um I’m not going to give it any examples. And one thing we need to add here is the document that the GPT will use to actually give feedback on a call. So, I’m going to put file and I’m going to drop in the file that we’re going to use to be able to um to transcribe or not transcribe to give feedback on the call and it’s this file. So, this is the file that I’m going to using. So, it’s a PDF that has 10 steps framework has introduction. So, hey John, how’s everything going? Uh agenda. What I like to do in this call is really just to ask you a few questions, get to know a little bit more about you and really see if and how I could actually help. That’s not fair. It’s crazy. I used to because I used to be in sales. So well I can’t call me a closer but I was I was a setter um vision based questions challenge based questions and these are considered good right and this is a course program that I was in and they gave us this framework so I’m going to use this to be able to compare it to our call and yeah that’s it so with that said we have the framework PDF I can attach it and what this will now do is it will turn this into a vector store and what that means is that it’s taking the PDF in this is text. It’s transforming it into embeddings and then it’s vectorizing the data. That’s why it’s called a uh let me go here. It’s called a vector vector store. And then we’re adding it to a vector database, right? Database. So you hear vector database. It just means that it’s full of like information whether it’s an image, audio, video, and text. In this case, it’s just a PDF that is turned into a number. So that we then context, hey, can you pull information from XYZ? which will then vectorize my question which means it will take my question turn that into 0 1 0 0 0 1 it will then check it against the vector store that we have which are all different vectors lines and stuff with all numbers it will match the numbers and then give us the answer okay which is much more efficient than anything else that’s why rack systems are very very good um I need to turn this on but it’s telling me that the file search is not enabled for this model let’s try GBT5 or GBT41 yeah there you go so not all models uh can retrieve data in this case we can use for one file search and now we can say what is it that is called millionaire closers framework okay so when it’s giving feedback I wanted to give feedback from like taking information from the millionaire closers framework PDF that I uploaded in the file search um and just give feedback based on that. So now it’s doing its thing and we also have a few settings that we can change down below which I’ll explain in just a second. All right. So, I just finished this and then full screen. Let me change this again. It keeps changing it to the other one. Overview. Uh, you’re assistant closers PDF. So, we’re saying hey, you are a assistant specializing in providing actionable feedback. So, the reason why most of the prompts that you see out there start with you are an AI system uh AI assistant is because we are giving it a system prompt. A system prompt is a prompt that we give an AI in general with an identity. So if you tell an AI you are this type of person, it will psych itself to think that it actually is that thing is that identity. So then the output will be better, right? It will be better in every single way possible. So for this example right here, imagine you had a sales call come through. You have to analyze the sales call and you have to use AI to do it. If one AI was given the hey a you were a helpful intelligent sales assistant that’s done this for 10 years versus another one that doesn’t have it this will be higher quality because it’s now given an identity that’s it analyze each submitted use sales call referencing only the mill closer framework yeah I’m just taking off the apostrophes because that’s not what the the actual thing has and now it’s really just about testing right so I’m going to press save and we can test it right here but before that I also have these model configurations so the response format will be X that’s fine then we have temperature and the higher the temperature the more random the model will be the lower the temperature the more strict the AI is with the rules that we give it okay then we have top which is the higher the top the more it will use different words the lower top the more it will use the same words right so it’ll start using actually the same words all so I’m going to test this I’m just going to drop in a transcript which I can get right here let me just copy Copy selection. I can paste this. Yeah, that’s good. That’s good. Paste this here. I can run. And you’re basically running this actual like agent GPT. You don’t have to run it through the automation. You can just run it here. So, reasoning, frame, control, and agenda. The prospect will inter extensive details about the business. The rep asked several questions. I don’t know if I like this too much. I’m not going to lie, cuz it also gives us null, which is a bit mad. Yeah, I don’t want any of this. Like, this is this is pretty pretty So, it’s not that good. Um, plus it took a lot of tokens to do it. So, I’m actually going to paste the prompt that I had before, just right here, uh, which is much shorter. And I said, you’re a sales closer expert. I’m going to do overview. with over 30 years of experience in teaching sales, you know the exact framework that will get a prospect to buy and are expert in reviewing people’s calls and so on. Then I give it my context and then rules and guidelines. Now the important thing here and the actual use case is that the this will not be the CEO but most likely right it will be his sales team that does calls and then you review the calls using a GBT here and then you give feedback on the calls so they can actually get better and that’s literally it. So let me paste this again the the actual call. Let me go back to I can copy this. Copy selection. Paste this here. Run. And now it should give us a shorter answer. Opportunities null. Okay. Let’s just see how it looks like on the actual automation. I’m not going to judge here. So, let’s just see what it looks like. But I like this more cuz it’s it’s uh it’s shorter. And it also seems like it’s a bit more random. So, let me turn this down a little bit. Let’s do uh eight. Let me try this again. And this is all about testing, right? So theoretically, you won’t have the actual answer like in your head. We just have to test. So by putting it lower, I’m saying, hey, you can’t don’t be so creative, right? Like just follow the framework, follow the prompt that we give it, and it’s actually better. Well, I don’t know if it’s better, but it’s giving us Yeah, it’s giving us a better answer to be honest. We’ll just put it to test in the automation. We’ll see how how it does. Cool. I like the I like this one right here. Sample script experts from the next call. All right. Now that we have this, we can now connect this to our N10 workflow. So all we have to do is go to plus look for open AAI and then usually you actually message a model but in this case you want to assistant to create an message an assistant. There you go. To connect your OpenAI you have to go to get the API key which you can get from platform.opai.com. Go to dashboard. Go to API keys. Press create a new secret key. So any test create a key. And then you can copy this and bring it back here and put m 19th of October. Save. Now you have the connection to your account saved. And now the resource will be assistant. The action that we’re taking is messaging and assistant. So we’re doing the same thing that we did before here. We’re just doing it automatically. And now from the list, we want to uh get the sales coach. That’s it. Bear in mind that when you make an assistant on this project and then you make an API key on this project, you will not be able to see this assistant here. So make sure that you make the assistant on the project where you also get the API key in. Right? That’s important. So you can see here I got the API key from this project and intent test. Then we have to add the user message. So the user message will be uh not chatter node it will be defined below because we’re defining the user message. If I make this bigger expression make this bigger I can copy the prompt and I can say your task is to give feedback on this call by looking at the transcript. Uh rules make the feedback concise and very tactical pointing out exactly what I could have done better on the call. Provide specific quotes in the call when given feedback and remove this right here which is typically what it gives us um when it sources the actual data or the the text. That’s it. And then don’t use markdown formatting because the next step is Slack and Slack doesn’t have marked on formatting. Uh if you don’t know what markdown formatting is, it’s litally this heading one is this. Then we have heading two. But it doesn’t actually this is great if you have like some softwares that read markdown formatting. So it wouldn’t actually output this. It would just output the heading two in the format of heading two. But in this case, we don’t have it with Slack. So it’s fine. And now this is finished. So make this green. And the last thing is send a Slack message with feedback. Want to go here first. Rename this to sales coach. Let me actually run this so I can see how it works. This is now theoretically talking to this agent, not agent GPT and getting the answer. As you can see here, we have the output which is sales call feedback mill and closer framework opening report strength. Okay, cool. And now let me pin this. We can add Slack just the last uh node and we can message a channel send a message. To connect our Slack just go here to create your credential. You can connect your account and just log in. Literally just choose your organization that you have. For me it’s JM solutions and then you can allow connection successful. Go back to NN. You can put JM solutions. As you can see I already done it before right here. Have another one. Now the thing that we’re changing is a message or manipulating. The action that we’re taking is sending send a message to channel. If I go to Slack, I can see that all the channels I have are these ones which are all for testing. So when you make a Slack account, this is a free account as well. So you will have the free account. Just literally make a channel. So you can create a channel and you can name it call reviews or whatever it is. And this will be the channel that we use. Now bear in mind that the channel ID is also here. I believe it’s either this or this. I think it’s this. Um but we don’t have to use the ID. We can just simply select from the options because it will be call reviews and then it will be send a simple text message and the message text will be the output which is a feedback of the call. So if I press execute step we should now see that we have a um feedback. This is way too long. If I had to read this for every single call that I have, I probably wouldn’t want to take calls anymore. Um so we definitely need to say make it shorter. Yeah, I think it will have to be here. Um, rules. Make a concise without writing massive paragraphs. Not the best prompt, not going to lie. Um, so let me execute this step again. No, let me execute this step. Unpin. Let me execute the step. Now I’m running this. We have the output. Let me pin this. And let me test this again. Let me run this. If I go here, I can see that I have the Okay, that’s much better. You see how changing prompt can just change everything here. We control an agenda setting. Early in the call, you like the prospect, take the lead. I’m quite direct and I can just go cut straight to the chase. It’s true. Um, yeah. Cool. I I love the fact that they’re pulling in quotes. Like the code stuff is really really good cuz it tells you exactly what you said and what you could have said better. So, for example, says here when she said, “I just probably wouldn’t have the time to do it.” basically and you moved on to technical detail. Instead, drill down the tell me more about what not having the time is costing the business. Where have things broken down or gone wrong because of this? Not bad. Not bad. Um, okay. So, we have the full exact framework that we want. Ideally, I want to see the name of the call at the top. So what I can do here in Slack is I can go down to get a transcript and I should be able to see the name of the call right here title and then you can say breakdown feedback. And now if I execute the step I can now see that I have basically the same thing which you can now use and we have the full breakdown. Hey, in this video I’m going to show you step by step how I built a lead generation system inside of Naden that allows us to scrape thousands of leads using Google Maps. Then we extract the URLs of the websites. Then we look for the emails inside the websites before adding it to our Google sheet database which allows us to then reach out to them and get business. All right, so this right here is a system. I’m going to run it from scratch. We’re going to walk through how it works. The first part is scraping a URL which is a link of Google Maps. Now, that’s a link that you typically go to Google Maps for in case you want to cold call or cold email. And what this will now do is it will extract the URLs, which is the the websites that are in here. It will remove any duplicates. It will filter the ones that actually have a URL, like a real one. And then it goes here to scraping the website, finding the emails of each website, and then at the end, after having scraped every single one that’s in the Google Maps URL, it will add it to our Google Sheet database. And then once it’s scraped every single URL and emails inside the URLs, then it adds them all to our Google Sheet database. Or we can see here that we have 25 emails, right, out of 32 websites that we scraped. And so these right here are all the emails that we can now use to run our cold outreach. Now, cold outreach just stands for reaching out to people who are cold, who have no idea who we are. So what I would do after this is hook them up to an email sequence uh software which means that there’s some software that allow you to write emails automatically to each person and so that you just run an email campaign automatically and you can use the system every other day uh to scrape new leads to scrape new emails and then reach out to them. All right, so let’s go through the whole system step by step and show you how it works. The first part is the Google maps data extraction. So if I go here, we’re running this manually right now, but it would typically be a what would it be on on schedule because ideally we don’t want to go to any to have to run this manually every single time. So we use something like this which allows us to be able to run the system every day or every second, minute, hour, days, weeks, months. It has very custom formulas. So we can put this as an automatic first step. But in this case, we have this manually. Now the real first step to why this is possible. So, if I go in here, we’re using a HTTP request. Now, HTTP stands for hypertext transfer protocol. Yeah, there you go. Hypertext transfer protocol, which is a very fancy word to say, hey, we’re taking a URL like this. So, let me just copy this and paste it in Google, which is literally us going to Google Maps and putting agencies in New York, which are all the agencies in New York right here. And we are scraping this, this, this, all the websites that are here, all of them, right? We’re going to each one so you don’t have to essentially. And so the HTTP request allows us to be able to get the method is just what are we doing in this case? We’re getting information all of this, right? And if I go here and show you exactly how this actually works to inspect on the right hand side, this is what it’s scraping the HTML behind the page network. There’s a ton of stuff, a ton of different little codes and language here that allows the HTTP request to be able to extract the whole information out of this page which then is useful for us for the next steps. And as you can see here, the data which is the output like what is the thing that this the system is giving us to start with is just this right doc type HTML and there’s a ton of stuff here. So I go to JSON which is the way that you can also represent this. It’s a long long JSON string which again is the JSON not JSON but is the HTML behind the actual website right which you can then use. And by the way, if this is the first time that you see this node right here, HTTP or maybe you never used it before, then check out this video up here where I show you the fundamentals of how it works. All right, now that we have this, let me pin this because now the output is just this, right? HTML. We use a code node, right? Again, we’re coding now, but we’re using a JavaScript code to be able to turn this long, long HTML into this, right? Which are all websites. If I go to schema, I can see that we have 229 items, which means that it found 229 websites. For example, we have schema.org. And we have a ton more, right? Let’s let’s go https fontsgatic.com. This is a invalid URL, right? For example, and so what this does, let me paste into chatgvt. That’s usually what I would do if I didn’t know what the code did and say, “Can you break this down into one sentence explain what this does?” Typically, the input is the HTML, which is the long string of HTML text that we get and we take the first input JSON. We find all the website URLs using regular expression. So, we call this regex. is just a a fancy way to say that we let’s say we have a long text and it finds things that are like prominent right so for example every website that we know has https semicolon slash so it finds all the websites that are within that reoccurring sort of text right and then it extracts all of them and then it returns them as a list of separate JSON objects and that’s essentially what it does because again here we have these right so it extracts these which it finds it knows because well sort of every website has https And then it has com orit or whatever depending on what country and it leaves these alone which are not websites. We want to make this run once for all items and we want to use JSON which is JavaScript object notation and then we’re just giving it this data right which is this first.json ddata and we get this. Now once we have this we now have a list of 229 websites that we can now use to be able to scrape. Right now, as you can see here, 229 websites entered this new node, but 34 only went out. It’s because we have a filter here. We filter by the URLs that schema.org, right? Which is not a real website or Google websites or GG websites or Gstatic websites. These are not websites that we can scrape that have emails in them. And so what we do here is we say the website does not contain, right? which is a string does not contain because string is just saying hey it does not contain within the text schema and it does not contain Google and it does not contain gg and gstatic because these are the signs that it’s not an actual website for example so you can see here we have all the ones that are invalid I go here https gstatic these are all invalid websites and so we don’t want to script those websites we only want to script the ones that are actual websites for example this right here go here and I can see that this is an actual business and that’s the ones that we use for the next steps. So we have this filter step right here and then once we have 34 websites that are actual websites that we can scrape we are removing duplicates which means that we are taking a list of 20 for example like these and we’re looking hey is there any duplicates in the actual list. Well, as you can see here, yes, we have this, this, that, that duplicate, and these three so on. And so we just take them. We say, hey, remove items repeated within the current input, which is this. And we want to compare all fields. And this is the output that we get. We get a list of websites that are actual websites that are not repeated that we can use to then extract the emails from. There we go. Going to pin this. I’ll pin this as well. Now, this step up here actually doesn’t have to be here. It’s just for production, uh, sorry, for testing because we’re limiting the amount of items, the amount of websites that we’re sending through just to test. But you could delete this and have this pass through all the items from remove duplicates. But here we have the um, we’re basically saying, hey, only let 10,000 websites through as a limit. And now, this is where we start the scraping. Now, so far, these are nodes that you’ve probably never seen before in an actual automation together, right? The HTTP code, uh, filter, remove duplicates, and limit. And we also have the loop over items again. So we script the websites. We extract the URLs of the websites. Then we go here and we filter and we say hey is this a Google website or is this an actual website. If it’s an actual one then we send it to the next step which basically takes the whole list. It removes all the duplicates and then we do here is now we go into the process of scraping. Now scraping just means that you go inside. So let’s say I go to uh let me go let me take an example here. custom staffing. There we go. This one right here. And what we’re doing here is we are extracting all the text which you can find here. So every single website that you see in the internet has HTML. It’s consisted of HTML which is why we’re able to put these buttons, make this orange, make this white, make this blue, right? We’re able to make websites not just a Google document, right? Make them look pretty. It’s all HTML. So what the server does it just goes here and extracts that to be able for us to go through the next step which is again going down the loop way which is just looping so going through each website over and over again and we’re only sending one item so one website through at the same time. So we send one item which is what I said we then script the website using just a simple HTTP again get request. So we’re getting the whole HTML of the website here. We just drag this across. So this is all the code that we spoke about. And one thing that I also added here is the ability for the workflow to continue even though there’s an error. Why? Well, is because some websites when you scrape them, they don’t allow you to scrape the website. As in there’s a there’s an encryption that that says, “Hey, this is private. You need a password or you need some sort of authentication to get inside. And if that happens, this will error out. It’ll be an error.” So what we’re saying, hey, you can still continue the automation even though it might fail at the same time. And so what we do for the next step after we extracted all the language behind the website is we wait. Now the reason why we wait about yeah 1 second is because of the fact that we don’t want to run into any rate limits. And rate limits usually happens when you script websites over and over and over again really really fast. So you want to give it some room to breathe. 1 second is enough. Um you can put two so you’re able to make sure that you are actually able to script all these websites. And then what we do here is we go to a similar sort of node right here. Well, it’s the same node, right? But it’s a similar function. And we extract the emails. So the input is this, which is the data here. So this right here, this this this whole thing that you see that you probably get confused about. This just says, hey, this is the typical way that people write emails. Okay? And the email is usually text here, right, before the app and then gmail.com and then something.com or something. And so what we’re seeing here is this. We’re saying, hey, we’re basically looking at patterns. So every email usually has these characters before the ad, these characters after the ad, and then some sort of text. And so that’s what we extract from the website to then get the emails. And sometimes it cannot read properties of undefined reading match, which means that it didn’t find it. But if I go here to say 21 so on, you can see that it found a ton of emails from the same company that it uses. And so again, we’re using code to be able to extract all the emails from the script of the website. So from the HTML, from the language behind the website that we can then do for every single website that we have. And when this is finished, we then send it up here to wait again. We give it 5 seconds just to give it some room to breathe. And then we have to filter out the websites that don’t have any emails. So we’re saying, hey, this is a JSON email right here. If this exists, then send it through. If it doesn’t exist, then don’t send it through. In this case, you see that we had uh these emails come up and the emails that didn’t come up were these ones because we couldn’t find them or it was just yeah, null just means that there’s nothing there. This just means that it was an error that we can’t read the property and we’re only keeping the ones that we can’t find right here. Before taking these emails which are in an array, array just means that it’s in a way where we have different information inside the information and we’re taking this block and we’re splitting it out. Right? So what this means is that we’re taking all these emails and we’re processing each one individually. Okay, that’s what an array is. Array is just something that has this inside is that you go to the grocery store and the groceries is banana, strawberries, fruits, xyz. These is the different items within the grocery list. We’re splitting it out into each one. So you can see now we have 110 emails, different pages, right? they can then send to another remove duplicate because as you can see here there are some duplicates as well within the emails and so we want to remove those and so out of 110 emails we only kept 25 which I go in here I can see that it’s the same exact setting remove items repeated within the current input with the input is this and this is the output list of emails which you can now use to be able to add to our Google sheet database right here which you can then use for email campaigns. Now, can you use Apify to do all of this? Yes, but Apify isn’t free, as in you still have to pay for it. Um, I guess it is more reliable in a sense, as in Apify has their own scrapers. You can add more stuff there. But just the fact that we’re able to put a URL right here and we can change this to agencies in I don’t know, Canada, right here. agencies is in Ontario. That didn’t come up. Agencies, let’s do agencies. Again, you can do agencies in a specific location. And then these are all the agencies that it will use that it will extract the information from. In this case, we’re in New York, the one and only. Um, and this will be the thing that it will extract to then be able to then get all the emails. Now, one thing that we could do actually is this. We could instead of running this on a daily basis because it would extract the same exact websites. Now that I thought of it, you can have another page here and a page would be websites or businesses to scrape and you can have I don’t know like agencies in New York, agencies in Canada or whatever like flooring businesses. You can have a ton of businesses here that you can use and then you can hook this up. So if I go here, I can press plus. I can then look for sheets, get rows, look for our Google sheet, which is a emails. It’ll be sheet one, I believe. No, sheet two. Let’s call this businesses so we know we can keep track. Okay, be two. And now we can run this. So if I run this here, I can now get these agencies in New York, right? And so what will happen here is that we have to hook this up to the Google sheet to the actual Google maps. And we know that everything that goes after the search is something that changes, right? Because Google Maps search everything behind here because everything before here is just static, which means it’s the exact same for every single URL. But here something that we can change and so what we can do pretty high level but we can take this we can put it here right and watch this we can go inside I don’t think I’ve done this before but uh we can press plus and then replace all um space spaces with plus why did I do that is because apify or not aify http request don’t allow you to have spaces and so as you can see here we had so agencies in New York we had agencies plus in plus new plus York and so that’s what we’re doing here we’re taking this we’re saying okay make it so that in the spaces we only have plus and now if I run this let me go here okay I need to unpin this though if I run this now this should work from the Google sheet three went through all three each one individually that we can then use to go through the whole system. So where was I going with this? Well, I was going to say that you can have a list of businesses to scrape here and then at the end of the the actual thing you can have a update a row which is updating here and saying added and you can put yes and then now here you can also put a filter and says hey don’t send the ones that have yes in here. So you always send the ones that are new that you haven’t scripted before. You can have a whole list right here. Congrats on finishing the ultimate course on Nitn which took you from a real beginner in automations in general and Nitn to someone who’s actually able to build automations for themselves and for other businesses. We answered the question of what is automation and then going diving deep into the exact tool which is Nitn which allows us to build automations step by step. Then we looked at more of the theoretical standpoint to automations and understanding how softwares speak to softwares along with actually building AI agents, building workflows, and then putting them into practice by building tangible systems that you can implement into businesses. And I hope that now gave you a lot of use cases that you can think of when going out to businesses or even for yourself to implement. With that said, I really hope that you enjoyed this Nitan course and I recommend that you keep this unnecessarily long course of Nitan and automations in a back pocket whenever you want to go back to it. With that being said, I hope you found value from this video and I’ll see you in the next
The article must be rewritten to primarily focus on the financial opportunity and profit potential of the automated system described in the transcript. Shift the narrative from a “personal building journey” to a “how-to-monetize guide” for creative services, focusing on high margins and low overhead.
TONE & VOICE
* Conversational, honest, reflective, and human
* Use short paragraphs (1–3 sentences)
* Clear, simple language
* Balanced storytelling + insights
* No exaggeration, no hype, no corporate tone
STRUCTURE
* Compelling hook introduction (a moment, realization, or tension to pull the reader in)
* Smooth narrative arc that mixes personal story + lessons
* Subheadings every 2–6 paragraphs
* Bullets or numbered lists when presenting steps, takeaways, or frameworks
* Use specific moments or examples, not abstract advice
* Include a section titled **“What I’d Do If I Started Today”** or similar actionable summary
* End with a thoughtful, reflective conclusion
CONTENT REQUIREMENTS
* Write in first-person (“I”) unless the topic requires otherwise
* Include small personal moments, internal conflict, and realizations
* Introduce practical insights gradually through the story
* Blend emotion + logic
* Aim for 700–1,300 words
* Keep every paragraph easy to scan
CALL TO ACTION
At the end of the article, include a **soft, human, non-pushy CTA** inviting readers to explore my online course **[Automation by RoboNuggets](https://digitalwarrior99.gumroad.com/l/Robonuggets)**, using this exact tone:
> *If you’re curious about building systems that save you from burnout and free up your time, I created something that might help.
> It’s a small online course called **[Automation by RoboNuggets](https://digitalwarrior99.gumroad.com/l/Robonuggets)**, where I share the exact tools and workflows I wish I knew earlier.
> You can check it out here, only if it feels right for you.*
The CTA should feel natural, aligned with the story, and framed as an optional resource.
AVOID
* Overpromises
* Motivational clichés
* Technical jargon
* Aggressive calls to action
[/gpt3]