Transcript for:
Getting Started with n8n Automation

I'm going to quickly give you an introduction to what automation is what n8n is and how that fits into this ecosystem of uh Automation and the AI tools that are kind of moving into space and what the future looks like so automation refers to basically using any kind of a technology or any kind of tool to perform tasks with minimal human intervention that's kind of the overall gist of uh what automation is and the goal of automation is to save time reduce errors and really kind of increase efficiency because if you're doing repetitive works that's where automation comes in to remove those repetitive tasks and make it predictable right so automation could be used in business in marketing in customer support and pretty much in every single industry nowadays because of these AI tools that are becoming more and more powerful so there are two types of um automations there's the process Automation and then there's a task automation uh process automation basically refers to automating any kind of complex workflow like for example invoice generation would be a good example of what a complex workflow might look like but on top of that now with these AI uh tools that are being introduced in the market you can make extremely complex Automation and then there's also the uh task automation which means this will be automating simple and repeatable able task right so for example sending a followup email uh chatting with customer support all of these all of this is something that can be very easily repeatable and therefore very easily uh automated so that's kind of the overview of what the concepts of automations are and um what that space is so there's been a huge obviously influx of no Code and low code uh tools that have come into this space because of AI tools right so uh no code tools or local tools like and it and really empowers users that previously didn't have technical knowledge to really get involved and bu build workflows because of the fact that these user interface for these tools have become extremely powerful where now you don't need to have any background and coding where before in order for you to build these automation using these uh uh technical tools you need needed to know how to code otherwise there was no way for you to be able to jump in and create these automations or workflows yourself so these introduction of these low code and no code tools that have been coming in the market lately because of AI that has really removed this barrier to enter in this space and that's what is extremely exciting as we move forward in the future so what these no Code and low code tools do they really speed up development and uh like I mentioned it kind of removes that gap between the technical and non-technical users uh where before it was very difficult for non-technical and Technical user to collaborate but now thanks to these great tools you can actually collaborate with developers with technical people because you have a very low barrier to entry so that's where we kind of come to nadn so nadn is an extremely powerful tool um it is a no code automation tool but there's obviously a lot of uh customization options so if you are good at coding or if you know coding already you can even build more complex tools right but the barrier to entry to building these automation tools have completely been removed because of the fact that tools like NN are in the market and in my opinion NN is the best tool when it comes to building powerful automations and building powerful AI agents specifically uh because of the fact that they are focus is more shifting towards building AI agents and they're releasing uh really great um tools on top of their existing Integrations that they have to make it really really powerful so one of the biggest features in my opinion uh that nadn has compared to other tools that are out in the market is the fact that you can actually self-host all of this self hostings gives you huge Advantage when it comes to the privacy of your data right because a lot of companies a lot of um individuals are very hesitant to share their data with third- party um apis or third party uh apps therefore the ability to self-host nadn and your instances really gives you that peace of mind and full control over your data and therefore privacy so that's kind of a huge uh benefit there um and then ALS on top of that uh andn is also extremely flexible uh which means that it has existing native integration with other apps but on top of that it gives you also access to uh tools that you can connect to third party apps that it doesn't have integration with um another biggest thing in my opinion is the cost when it comes to these no code or low code tools that are out there in the market and zapier make.com are kind of um in the same space and there's other tools as well but these are kind of the most popular ones when it comes to cost honestly it's none of these tools are even close to NN so tools like zapier and make.com they actually charge um per per operation versus uh n then actually charged per workflow and again I I understand if you're new to this you this might not make any sense to you but just to show you kind of the difference and again these charts and this this data is Tak directly from uh nen's blog and I have this link that I'll I'll put in the description below so that way you can check out and read the whole blog if you want because they go really do a good job of explaining why ident stands out when it comes to cost even if you're using their um Cloud app it's still extremely cheap but if you use this as a subul option that becomes even more cheap right and like I said we will explain and explore those things further down but this was just uh an idea for you to get an understanding of what this space is and why and it and really stands out compared to the other tools and also a huge difference between in my opinion between nadn and the rest of the tools that are in the market when it comes to the automation space is their AI tools they have really shifted their focus on AI they definitely are moving and they're understanding that the future of uh these tools are moving towards uh building AI agents that's going to be specific to different tasks that will sit on top of these large language models and that's where really going to focus and explore the power of ID and all right so that was kind of a quick introduction of the automation space and these different tools in the next video I'm going to introduce you to the NN app the canvas how to sign up for the free 14-day trial nent account so that way you can get started um and then I'm going to do a quick introduction of how you can start to build your own little automations to be able to get a good understanding before you move on to the rest of the tutorials um so this will be a good foundation for you to understand and get started with ANM we're going to go ahead and get started with signing up for an account for an NN I want you to start with just the cloud account for now because they give you a 14d trial um and that's going to be good way for you to get started don't worry about self hosting at this point if you're new to nadn I think it's a good way to get started is through their app uh cloud account which is very very simple so that way you can at least get familiar with the uh with the with the canvas with workflows and all that good stuff so I've put a link uh below click on that it will take you directly here you're going to come and click on get started so go ahead and uh fill your name a company email just put your personal email a password and the account you're going to be uh putting for example for me it's going to be AIW workshop. app. edit and. Cloud so this is going to be the URL um so once you do that click on try for free and then this will uh log you in into the account and this you only have to do this once because next time you come into this URL it will automatically sign you in and bring you to your workflow okay so once you do that once you log in it might ask you a question about you know what you using an addin part go ahead and uh fill that out and then it will bring you to your dashboard so this is where you're going to get started after you log in uh it might take a couple of seconds um for it to get online so you but it will tell you uh when you're online it just going to say currently online and then you can click on the open here so just a quick introduction here so the version we'll take a look at that in a little bit but this is going to be the latest version um and I will make sure I um kind of show you where to update your version because that's very important because whenever they're releasing uh new versions they're going to be fixing different uh bugs that might be in uh the nodes that you're going to be using so you want to make sure you're running the latest version okay so let's go ahead and click on open workspace okay once you do that you're brought in to kind of this workflows homepage and on the top left left hand corner here it says 14 Zen left in your in it and trial so that's what it's going to look like which is great because you can use this for uh 14 days for free and then if you are okay with using the cloud and you don't want to go towards the self uh hosting again it's perfectly fine but anyway so just to kind of give you a layer the layout so the workflows so this is where you're going to be starting to build these different automations whether it's um agents so NN refers to all of that as workflows and that's what I was talking about earlier when it comes to nnn being cheap and uh compared to these other um tools that are out there is because they will charge you based on the workflow so your workflow can be extremely complex you'll be only charged for the workflow and by the way that's on the cloud account not on the self hosting because on the self hosting it's going to be different so for this particular um account as you can see right now in the center it says start from scratch there's credentials we'll come back to what that is on the left hand side you have the admin panel so if you click on the admin panel this will take you to uh basically the same place as we were before and if you want to update the version that I mentioned before because right now if I go back to my um workspace here on the left hand side in the bottom if there's any update that needs to be done for this particular version that you're using it will show up right here so if you click on admin panel it will take you back to that starting point and you can click on settings here and this is where you'll be able to see what uh version you're running and they have several there's like a beta that they have the latest beta and the latest table so try to stay on the latest table because that's always um the safe space to be so you have your time zone if you have a different time zone make sure you're uh selecting your correct time zones and um the bottom you don't have to worry about this for now and again right now this is a trial so this will show you your uh plan what you're in okay all right so let's go back to our dashboard now so we'll go back to open opening it and let's go ahead and create our first workflow so that way I can give you an introduction of what those things are in the bottom here so the templates and variables and all executions don't worry about this for now uh we will come back to this at some other point but let's go ahead and click on start from scratch so this is going of be uh the canvas basically this is where you start with building your workflows but before we do that I just want to quickly go on the bottom and actually change the theme because I like their Dark theme with looks a lot better in my opinion but obviously if you're using the light light uh if you want to use the light theme that's fine as well but the way to change and uh change the theme Here is you're going to come here on your next to your name you're going to click on these three dots go to settings and this will take you to your personal settings you'll see your name your uh email that you use for this account and your password if you want to change that you can always enable the two Factor authentication um I would suggest doing that if you have really sensitive workflows that you're building but in the bottom right here the personalization you click on theme they have obviously the light theme that which are currently the default system but we can click on Dark theme and let's go ahead and save this and as you can see now the theme changes and in my opinion like I said this is the way better in my uh user interface or it looks a lot better okay so that's good now you're going to go back and this is going to be your uh canvas again all right so a few things to point out here on the top left hand corner so this is where you can actually name this workflow and I highly highly suggest naming your workflow whenever you're creating a workflow because that way uh you don't get lost and you have a good way to organize your workflow so for example this time I'm for this one I'm just going to say test workflow all right and you save it workflow successfully created so now if we go back to our home if you click on home this is the first workflow that you've created and obviously you will see all of your workflows down here all right so the way to get back to your workflow is you're just going to click on it and it'll take you back to your workflow the tags right here so this is where if you have a lot of workflows that you've created in order for you to organize them you can actually tag this unfortunately right now um and it end does not have the ability to um kind of group workflows together so the way to do that so let's say for example if you're building um uh accounting workflows and you want to be able to separate that to for for example uh from your invoicing or from your customer support workflows then what you could do is just add a TX to it so for example for this one I'm just going to add a tag of AI agents right so now this workflow will always have this AI agent tag next to it so if I go back to my homepage on the right next to the workflow as you can see right here it says AI agent so next time let's say I have a 100 workflows here and I only want to see the workflows that have the AI agent tags I can click on filter and you can say filter by tags and as you can see my AI agent workflow tag shows up there and when I click on that filter it will list all of the workflows that are related to that tag okay all right so I'm going to get rid of that remove filter let's go back inside our test workflow okay so on the right hand side here you can see there's these three dots and then um there's the upgrade the save the share and inactive so on the three dots so if you click on this this will give you several options to download import um another workflow into this and again like I said we will get into this later on we we build other complex workflows where then you can uh actually import that template inside uh this workflow and it will bring everything over but again like I said for that we will talk about that at other videos uh and you can always download your workflow as well so once you build your workflow you can download it as a Json file and then you'll be able to uh import it or take it with you to another um uh workflow and be able to put that in there as well you can duplicate this workflow obviously and then you can always delete it as well make sure you're always saving your workflow that's a really good habit to have as you move forward and bring uh build your workflows make sure you're always saving it because otherwise uh your progress might get lost if something uh gets closed uh without uh you doing that on purpose so share again for now we don't have to worry about this for now we'll come back to this later inactive and active and again once we build our workflows I'm going to uh explain what this is so in the center here uh we have the editor and the executions so the executions will come back later on when we actually go through and build a few workflows and try out uh and test these out we'll come back and I'll explain what executions are but you will be on the editor section whenever you're building your workflows all right and then on the bottom right here so uh the zoom to fit whenever you're uh zooming in or zooming out you can always if you have for example multiple connecting nodes or multiple connecting uh workflows that You' have built and you want to go back and kind of zoom out and go and see everything together you can quickly come in here and click on Zoom fit and it will Center everything it will show all of the noes or all of the different connecting apps that are inside that workflow you can obviously always zoom in and zoom out and then with this one you can go back to and reset the zoom as well uh the test workflow button so this is where once you build the workflow you can actually test it using this button and again we will go through and actually uh take a look at how that function works so you add the first step by either click on on the center or right here right and again on the next video I'm going to go ahead and show you how to put in your first node and build a very very simple workflow so that way you get an understanding uh but for this one again this is already getting very long so I just wanted to give you kind of an introduction of the different um things that are inside your canvas and how to navigate within your canvas and within your account once you created all right so I will see you on the next one so in this video we're going to explore um further what uh NN nodes are how the workflows work together and I'll give you an introduction of how to create your first step and add different noes together or different apps together and connect them to be able to go further and create different automations workflows or AI agents all right so so we're back to our canvas this is our test workflow as we built in the previous uh video so we're going to go ahead and add our first step so nodes are the building blocks of NN you can think of it that way right there's three categories of nodes there's the entry point Noe there is the function note and then there's the exent point Noe so there are different types of note and and it and there's triggers that are basically your entry points there's actions and apps which will talk about which are kind of the functions and then there's um nodes that are related to data transformation to flow to files um and many many more advanced nodes including AI nodes so the the way to add nodes into your Canvas OR into your workflow is you can click on the middle button right here or you can come here on the top right hand corner and as you can see it says open nodes panel right so you can do that or click on this it will take you to the same place okay so once you do that this is it's going to open up because this is a first step it's going to immediately take you to a place where it says what triggers this workflow because a trigger is the first step that will start your workflow there's several types of triggers there's the manual trigger there's on an app event there's on schedule on web hook call there's on form submission and again depending on what you're building these different triggers will be relevant to your workflow so for example if if we just want to build a test workflow we can click on trigger manually and this will automatically add that node into the center of our canvas and now we can move this you can move a note around by holding it clicking on it and holding it and you can move it around so what this does is basically means that whenever you click the test workflow here this workflow the first step or this trigger is going to get initiated on the top right here as you can see these three dots you can click on that you can test this step from here you can rename this note you can deactivate it you can copy and paste it or you can delete it and the shortcut here is also that you can delete this node right from the top right there so and on our left hand side as you can see this kind of identifies already that this is a trigger note and if we click on if we put in another note you will see that it will always have this little lightning sign which means that this node is a trigger note so let's go ahead and get rid of that and add another trigger note so on the right hand side again you can see all these notes that are existing so let's say you were building a chat bot right let's you're building a AI agent that you're going to utilize with chat which means that you can embed this into a website you can click on a chat chat um note and this will be your first trigger so same thing on the bottom as you can see it says when chat message received meaning that this is going to be your trigger now and on the bottom right here as you can see this chat uh appears next to the test workflow and again same thing on the left left hand side you can see the trigger button here meaning that this is going to be your first note to trigger your workflow on the right hand side so this is where you can connect nodes to this particular node right so when you click on it it's going to be the equivalent of same as going right here and clicking on it meaning that once you click on this directly this will now open up what happens next right that's what gives you um and then gives you flow that tells you hey add another note because we've already had a trigger s already recognizes that so now we can add additional triggers so now we can do action in an app meaning we can uh do something in an app with services like Google and all sorts of other native integration it already has with uh nadn so these going to be all of the apps that are already there that already exist within nadn so you can add any of it so for example let's say I want to add a Gmail note I could either scroll and find that particular app that I'm looking for or the fastest way to do this is just quick search here right so if I search for Gmail I can add that Gmail Noe and now further it's going to give me options of okay what kind of a Gmail node do you want this to be so it really gives you a more specific so for example if you want to send a message you can click on send the message and now as you can see it will automatically open that note so let's go ahead and get out of this and as you can see right now it is uh the next step that got attached to this partic to this previous trigger note and I can move this around and it shows you that this note is attached to this previous step okay so the way to delete this same thing you can either come here delete this note from here or if you want to remove this connection you can come and click on this uh remove connection right here so let's go ahead and get rid of this now if I want to add let's say um not not an app but I want to be able to add something to transform the data that I'm receiving from this chat message for example I can click on data transformation and this will open up all of the data transformation nodes that are available within NN uh you can add code to it you can add date and time edit field this is a very very useful tool that we'll go into in detail in later videos but you can modify at or remove different items that are coming in from your previous node you can do uh different types of filtrations you have uh splitting out of the data you can filter a data B based on a condition you can merge you can aggregate so they're really really great uh notes that they already have when it comes to transforming your data or data transformation you can have a flow uh you can click on the flow um node Group which basically gives you all of the popular nodes that are within that category so you can loop loop over items you can filter you can merge items and then obviously these other ones that are there as well there's obviously the core and the advanced Ai and these are uh kind of the complicated ones but for now we will not focus on this cuz again this is kind of an introductory video for now and you can always add another trigger to this as well but that's not really common uh but let's go ahead and actually add another node so that way I can introduce uh what the canvas is and what the inside of this node looks like so let's click on uh data and transformation or like I said I could always just if I already know which note I want to add I can quickly search this note as well so let's say I want to search for data so once I do that all of the notes that are related to data will show up and I can go ahead and select whatever I want so let's say so this customer data store um is a aned end training node which is great because this gives you some prepopulated or data that's already inside it so that way you can interact with it so I'm going to go ahead and click on that and click on get all people and now as you can see it quickly added this uh to my trigger here if I click on chat on the right hand on the bottom here uh this will open up my chat window where then I can send some form um of a data into that particular note so let's say I want to send a data called let's say hello so if I click on that as you can see now you will see that this note executed a um chat message saying hello and this outputed the notes so that's another uh really cool thing from the an NS user interfac is that you can see the data that's coming in from different noes just from the outside and how much data is coming in right so from here I'm saying hey one item is being it's coming in from um this chat Noe it's being outputed and and and it's being sent to my other note that's attached to it and and from this note there's five items coming in so let's go ahead and click on this note the way to get inside a note is you can double click into it and it will open up this note and what's inside of it but before I do that actually let me go ahead and um get rid of the data that's coming in here just so we can start from scratch there so if I want to remove the data that's got initiated from these different notes I can come in the bottom here and if I click on this little um delete button it's going to delete the execution or it says at the bottom deletes the current execution data so if I do that now I'm back to blank meaning nothing is being outputed from these uh notes so let's go ahead and double click on this and here this is the the inside of a note if you think about it that way so in the middle here this I can move this thing around meaning this is the note that I'm currently interacting with the input so this is going to be coming in from my previous note and the output is going to be the output of the current note that I'm in right so my previous note I can click on execute and this is going to execute the previous note which in our case is going to be our chat note I can also click on this left hand side in the corner if I go back here I can see it here in a little corner here I can click on it and it will take me to the previous node as well right so you can always go back and forth between nodes when they're connected but I can go ahead and double click on this so these are the different parameters and the settings for this particular node we don't have to worry about settings in most of the nodes most of the noes we're going to be interacting with the parameter so the operation for this particular note is because this is a training NAD training uh node it means that it's just going to Output um a list of people or a list of one person so if I operation if I select to get one person and if I click on test step this is going to Output this result right here okay so let me go ahead and move this on the left hand side here and as you can see on the left hand side here it says when chat message received so that trigger no Fields um because there is nothing coming out of that input uh from my previous note so on the right hand corner here and same thing by the way on the right and left you can see that there is the schema view table View and Json view so let's go ahead and take a look on the right hand side because we have some data on our output so this is currently our table output meaning that this is going to show all of the data that's being outputed from this particular note in a table format right so it's going to give you basically the columns and the rows with the names on the column names on top here so I have one piece of data that came in or one row of data that came in from this uh operation or the from the output of this note and it's showing me in the table format there's also the Json view so the Json stands for JavaScript object notation that's a Json uh data format you can see it in the Json view which it shows you in a really neat and uh cool way if you want to be able to interact with this from a Json View and then there's the schema view so this is where you can see the output in the schema mode and we'll talk about that in a little bit and why the schema node is extremely useful when you're connecting different nodes together so let's say I want to Output some more data let me go back to my table view here I can click on get all people and this limit says five but it's actually only five even if you add more into this it's only going to Output five because that's kind of the default so let's go ahead and test this I'm going to click on test step and as you can see now I have this five piece of data that got outputed and again I can see this right now in the table view because it's showing me nice and neat the column names the rows and then the data that's inside this and again I can always click on the Json I will be able to see the Json view here and then also the schema as well okay so if I want to get out of this note I can always click here and come back and see my canvas View and as you can see right now it says five items are being outputed from this particular note and same thing again I can always double click on it and change this uh f format and let's say I want to uh delete this and start with my trigger note and I want to send a piece of data through this I'm going to go ahead and say again hello now if I double click on this note now I can see on the left hand side here this is the data that's coming in from the previous notes so I'm looking at it in the schema view um and I can always take a look at it from a table view or the Json view as well so as you can see see this is the input that's coming in and this is the output that's coming in or coming out from this particular node okay and the operation of the canvas or the node itself in N8 n is always from left to right so you're going to be moving from left to right when you're building a workflow it's always going to go from left to right meaning that all of the inputs are going to be coming in from the left hand side and output is going to be on the right hand side all right so this video has gone long enough let's go ahead and stop this for now on the next video I'm going to go ahead and uh continue on this particular workflow and we'll add a few no few more nodes and I'll show you how to drag or grab data from the input and do something with that data and therefore um have a output that's going to be related to the input data that will be coming in from the previous note from us okay all right see you in the next one so in the previous video we kind of created this our initial trigger note which was a chat and we also created this customer um data store which is NN training note all right so let's go ahead and continue in this um workflow that we're building here so let's go ahead and double click on our database here this note and as I said before I'm going to click on test step and this is going to Output all this data that's coming in so now let's get out of this so now let's go ahead and actually start to manipulate the data that's coming in from this node and add connecting nodes to this so I'm going to go ahead and click on the plus button because I want to add a node that's going to be connected to this node right so you're going to click on the plus button so now let's say I want to transform the data that's coming in from this node and therefore I can either search for that particular node that I'm looking for or come in here and click on data transformation and you can see all of the different noes that are available for me uh to be able to do something with the data that's coming in from here so let's go ahead and add this edit fields or set that you did there uh that NN first so I'm going to click on this and as you can see now if I back out it is connected to my previous note automatically okay so let's go ahead and double click this one of the things we can do and I always suggest doing it is adding a name to each your note and this gives you really a good organization and gives you a good understanding when you're especially when you're building really complex workflows uh naming your node is very very useful because it it will uh give you a good understanding of what node is doing what right so I'm going to go ahead and for this one I'm just going to say transform data and if I just click on that and click on rename it's going to change the name of this node to transform data now if I back out as you can see right here in the bottom this is what it's going to show and same thing if I want to change the uh name of this all I have to do is click on this double click on it double click on this again and I'm just going to say test data click on rename back out and as you can see now my um node has really nice and clean name here so let's go ahead and as you can see right now there's five items that are coming in as an output from this to this node so let's go ahead and double click on this and try to do something with this data that's coming in as you can see on the left hand side I have my input and this is going to be coming in on that previous video I can always click on this and this will take me to that next um or the previous node I can always go to my other node that's connected to this by clicking on the right hand console okay so right now I have this as Json view um I want to go ahead and try to uh utilize my schema view to be able to do something with this data that's coming in and manipulate it one more quick thing in the Json view right here as you can see on the input you have this little drop down and this is going to show you all of the notes that are connected to this note and therefore you can have access access to them uh from your Json view here if you want to let's say grab something or grab data from uh your previous node here so that's kind of a neat little uh drop down they have but let's go back to our schema view here all right so this is all of the input like I said that's coming in from our previous node you can see um I have the name of my node and then all of the different items that are inside that node and this is the previous note again that's shown to me just like on the Json view you can toggle between uh the notes here on the schem of view this will kind of list down all of the nodes on the left hand side and I can always minimize or maximize this by clicking on the little arrow there okay so now let's say I want to be able to do something with uh this particular data that's coming in there's several modes that this particular node has one mode is the manual mapping and another the Json so if you want to interact with Json view if you're familiar with code then you can utilize Json view but most people uh will be using the manual mapping here here so this says field to set so as you can see right here it says drag input Fields here or add Fields so one of the great things about edn is that you can actually drag different items inside of nodes and be able to interact with that data manipulate that data change that data or add something to it so let's go ahead and let's say I want to drag and filter this data or transform the data that's coming in just by the name and the email so I'm go ahead and click on um grab the name and just bring it down here as soon as I do that as you can see when I uh dropped it here this shows me these curly brackets and then the dollar sign json. name so this is what nnn refers to as expression so anything that's inside these curly brackets are JavaScript code right so you can always click inside it and if you um if you are familiar with codee you can always always do different things with it but let's say if I want to add additional piece of code or additional piece of function I can just click on just add Dot and then all of these different suggested functions are going to open up for me where then I can manipulate this via code but I'm not going to do that for now so let's just go ahead and remove that dot from here and I can always expand this so if you have more data that you're putting in you can click on this little button right here and this will do an expand view where then you can now interact with the and a maximize and with more space and again this is going to be very very useful when you're building complex uh nodes and you're trying to manipulate data or if you're adding uh prompts then this or this view becomes really really useful and as you can see on the left hand side so again these are all the data that's coming in this is my Json so I can always drag different stuff here and this will show me um the data in the Json View and then the right hand side it will show me the result of what that looks like and you can always is you know manipulated from here but I'm going to go ahead and for now get rid of this and let's go back to our uh node view here so I can name this particular data that's coming in right so let's go ahead and say full name oops and I can specify the type of data this is right so if it's a string a number a Boolean an array or an object obviously this is going to be a a string so I'm going to leave it as string and in the bottom right here you can see that it shows the result of what this data looks like and obviously this is going to be J Gatsby because that's what the name of this uh test data that's coming in from this side right okay and I can always add more stuff so let's say I want to add the email here same thing all I have to do is just grab the email drop it here specify the type as I'll leave it as it is and I can change the name to email okay and let's go ahead and grab the country as well so I'm going to grab the country same thing I'll just rename it to Country you can always re rename this to whatever you want and let's go ahead and also uh maybe add this created so that way you can see um the actually you know what let's grab the ID so that way you can see that this is a number so this time ID and I'm going to change this to number okay and on the bottom like I said you can see the result here okay cool so options again I don't have to worry about options for now because it's is going to be a very very simple transformation so now as you can see on the left hand side we have these uh five pieces 1 2 3 four five six six pieces of information that's coming in um uh for for a particular item and we're transforming we're only grabbing four pieces of information so we're almost like filtering this data right because we're only grabbing the name the email the country and the ID so now if I click on test step here what this is going to do is this is going to Output all of this data based on whatever criteria that we identified here and here we basically said hey we want all of these data meaning all the five items that are coming in from our previous input or our previous note we want to Output this and I only want to see the full name email country and ID and as you can see the column names now instead of the name that was before and like I on table here so here this is a good view here the ID name email notes country created all of this was coming in and we manipulated this data using our set node and the output is now only four columns which we renamed it also to full name email country and ID so now we got all of this data that's coming in we filtered it or we grabbed only the data that we wanted to get right so this is going to be the output now from this note and if I get out of this as you can see right now this came in and these green tick marks it just means that the execution was successful so if there was any kind of error you will see it in red here okay so now there's now five items just came from here and five items coming out from here however this this time the output of this is that instead of this five six columns that was in the input made the mistake here get rid of this instead of uh the six column 1 2 3 4 5 six the six columns that it was we basically um manipulated the data and we now only have four columns so we don't we said that you know what we don't need the created time and the notes field we just want to be able to grab these fields and therefore we have now uh grabbed and changed the data that was coming in from the previous RM okay so let's go ahead and add and do something else with this right so I'm going to go ahead and click on plus button here and now let's say I only want to I want to filter this right I only want to filter this for the certain criteria that I want to give it right so same thing you can click on data transformation or you can just search here for filter and all of the nodes that are related to filter it will show up here so I'm going to go ahead and you can click on filter here with this will remove items matching a particular condition you can have an if node and you can have a switch node so the switch node is that if you have um several criteria that you're defining then switch node is extremely useful because this will output several types of data based on the filtration function that you have given but let's say I want to use the if node so I'm going to click on the if nodee so now let's go back quickly just to see yep so now it's connected so now the the if node spits out two outputs it's going to spit out output or a data that's going to be coming out of this note as either true or false so if the condition is being met for true it will spit out all of the data from this area and if it's not meeting it it's going to send that data to the false node so let's go ahead and double click on this so now let's go ahead and say hey if this data that's coming in from my previous note right has a particular value then I want to be able to Output that but if it doesn't then I don't want that data to be shown in my um output from this particular note so for example as you can see the country here um for this particular um data point it doesn't exist so now I want to say you know what I don't want that data to come in here or I don't want any fields that doesn't have a country uh to be able to be outputed in my notes so the way I could do that is the condition as you can see you have value one value two and whatever the condition you define in the middle here so now let's go ahead and um say you know what I only want to be able to check the data that exists and if it does send it to the true and if it doesn't send it to the false so the way to do that is instead of equal to because it's a comparison operation you have several operations that you have uh access to you have the string operation if it's a number you do a number or if it's date and time depending on what type of data time but for us particularly this country because we want to filter through the country column here this is a string so I'm going to click on string and you have all these operations that are available to you through this if node but for us let's say I'm going to say hey if this particular set of data exists then output it so therefore I'm going to click on exists and as soon as you do that this is going to now um say hey okay the data that's required for this particular action is needs to be inputed here so for the value now I'm going to go to my schema view let me pull this out here click on schema so now I'm going to grab the country and now I'm going to say same thing again as soon as you grab these items it's going to show you um you know the different suggested uh operations or functions that you can utilize within the JavaScript code uh to be able to manipulate this further but for now we're fine with that so the output as you can see the result it says us so now now I'm going to say if the country exists outp put this data so let's go ahead and actually test that step all right perfect so let's go ahead and click on the table view here on the input and we can take a look at this all right so from here I have 1 2 3 4 five I had five items that were coming in now we filtered it we said that if the country doesn't exist output this data and as you can see now we have four items because this item this zapot bble BRS it doesn't have country therefore it did not output that so now if we get out of this now you can see that there's data that came in and it's kind of hard to see but there's data that came in from true and then also the data that came in from false so if I just add something else to that we don't have to add anything to it I'm just going to quickly show you that this will further show and I can move this around here and let's go ahead and add one more move this around here so now you have these conditions uh that are being split this data is being split so now let's go ahead and test the step again if I click on play now you can see that five items came from this node five items came from this node and now you have four items that went to our true statement or our true route and one item that went to our false rout so this is how you can manipulate and test um or change the data that's coming in based on these um different notes that come in and now I can do something with the data that's coming out from this note right here I can add further um notes to it to be able to change it and same thing with here this will be completely separate right because now I can do different things with the data that's coming in from the output of this particular node okay all right well hopefully that gave you kind of a further understanding of how these nodes work and how you can manipulate the data based on the different filters you want to apply or the different for nodes that you can add to these things uh that you can further manipulate and change in this step-by-step tutorial we're going to build a very powerful agent that will have the ability to scrape and extract realtime data from popular search engines like Yahoo Google Bing beu and others this is going to be very simple to build uh but this will be a good introductory video on how to build AI agents with any end so let's get started okay so I'm in my workflow once you log in go to your workflow and create a new new workflow um I'm going to add the first step as a chat so our trigger is going to be chat because again we're building this AI agent that's going to act like perplexity meaning that it'll have access to this real- time data so the way we're going to interact with it is via chat so let's go ahead and add the first step as chat so you can either click here on a top right hand corner here so I'm just going to go ahead and first add uh first step and then on the right hand side on the bottom again these are all the triggers you're going to come down and click on chat message uh we're going to leave uh everything as it is all right so now it says wi chat message received so I'm going to click on this plus button and come down here go to Advanced Ai and go down here and select oh actually it's right on top right here so I'm just click on AI agent okay we're going to leave everything as it is again we're going to say take from previous note automatically and this is connected to our chat um so that's our trigger so I'm going to leave everything again if you want to change the name here same thing you have the um ability to change the name on top but I'm going to leave it as AI agent all right so I'm going to click outside of this all right cool so let's attach now um our corresponding tools memory and chat model so for chat model I'm going to use um open AI but you're more than welcome to use whatever large language model you have access to but one thing to remember if you're using a large language model you have to have an API account and you have to have some money on that API account again I've only put like $5 on my open Ai and I've used it a ton and it's more than enough uh but you have access to grock you have access to entropic uh AMA which is integrated with with um meta's large language model Lama so you can use that or the uh obviously open AI chat model so I'm going to use open a chat model here the first thing you're going to do if your account is not connected this will give you um kind of it will show you like a little error message so you have to connect your account if you're not familiar with um connecting this so what you're going to do is click on your create new credentials and here's where you'll attach your API key and your organization ID the good thing about NN is that it actually gives you um setup guide on a rightand side right here and you can it has a link to the doc as well so if you click on this link it will take you directly to the docs where it gives you a really comprehensive guide on how to create or attach the credentials for whatever uh tool you you're using and in this case um attaching your um API account open eyes API account and again you can go to your um open API documentation here and this will take you to that link where you can log in and once you log in you can go to your API page and grab your API keys and come back and attach it right here and again on the right hand side you can see it gives you a little um summary of how you can do this by logging into your account open your API keys to create API key and the organization ID if you belong to multiple organization and that's where this organization ID would come into play but for now you know just attach your API key all right so once you do that you're going to come back and your open AI account will be attached and since I've already done that it's there so now I get to choose my model so I'm going to use gp4 because I want to have the most powerful model and obviously you have lots of options here um if you want to further customize uh your gp4 again you can add things like uh the sampler temperature um you can increase or decrease this temperature and if you're not familiar with the temperature of how large language models work again try to Google it because I don't want to go through that explaining right now uh but anyway so we're going to leave everything as it is and we're going to uh click outside and as you can see now our openai chat model is attached let's zoom in a little bit there you go okay so now the next step we're going to add our memory of course uh you're going to click on memory here and we're going to choose our Windows buffer memory the buffer memory the easiest way to put this is it gives you it gives your AI agent access to previous data uh while you're chatting with it so it stores the memory in the windows buffer meaning it can have quick access to your previous information and it allows it to reference and remember the past interactions and the past um chat history that you have done done with that particular model but anyway so I'm just going to click on Windows buffer me and again you don't have to do anything you just click outside of it and now you have this attached so I'm going to bring this over here all right so for tools the first tool I always add is a calculator so you're going to click on tools and you're going to come down here and click on calculator so what the calculator does again you don't have to really do anything here it change the parameters or setting but a calculator allows your AI agent to perform any mathematical operation while you're chatting with it so if you're chatting with it and the AI agent needs to access or have the skills to do some kind of mathematical operations then that's where the calculator comes in I always add this tool just so it's there even if I don't need it so all right so that's going to be our first tool the second tool I'm going to directly attach my Ser API directly to API to this AI agent and the way to do that is if you come down one of the tools that NAD is already integrated with is called Ser API and it says uh Google search on the side but again you have um I'll show you in a little bit what Ser API is I'll explain a little bit and why this is a good integration to have so I'm going to click on Ser API all right so here again you have to have your credential to connect with I got rid of my credential so I could create this live in this video so let's go ahead and do that and I'm going to walk through step by step so I'm going to come here click on create new credentials and again same thing we have to go ahead and add our API key and I can click on this open docs right here and this will take me through the step-by-step guide on how I can create an API key and attach but it's a very simple process so what I'm going to do is go to um you're going to go to Sur ai.com so this is their uh website ser ai.com and as you can see right up front here let me zoom in a little bit as you can see they have several Integrations with several languages but the documentation so as you can see all of these documentations they have access to things like obviously most of it is Google related um because they have access since Google being the largest search engine in the world they have all these apis that they have access to but they have access to things like Buu Bing do Dogo Yahoo eBay YouTube Walmart I mean even Home Depot uh but anyways this just shows you that this has a huge amount of knowledge that this Ser API has access to and therefore once you connect the serp API to an AI agent that's why I was mentioning in the introduction of this video that you're essentially creating a perplexity meaning that you will have the most updated information because it's all coming from these popular search engines and the beauty about Ser API is that it's not limited to the to pre-trained um data that a lot of these large language models like chat gbt or even perplexity and llama are all trained upon because obviously they have to be trained on a base model and some times in in the case of chat GPT for example that data is limited to a certain amount of time and I know they say they have access to the internet but the information that you get from uh chat GPT for example on uh things that require access to real time information from the Internet is unfortunately not accurate all the time so that's why things like Sur API become so relevant and another advantage of um having your agent access the um or get connected to Ser API is not only does does it provide you the most real data but it also has access to data like organic searches or paid ads that Google or these other search engines already run right so that's what makes it very very different compared to these um existing pre-trained large language Models All right so that's a little bit about Ser API uh so let's go ahead and register for account so I'm going to click on register all right I'm just going to sign up with Google all right I'm going to click on sign up with Google I'm going to give her access to my account it's good to go all right I'm signed in so let's go ahead and subscribe so they have several oh I forgot to mention about their pricing okay so they have several plans right now um on the free plan and that's all you need to be honest but just quickly um so here are their different plans they have available so if you want to you know if you are doing 5,000 searches a month then you're going to get on developer production big data but the free account gives you 100 search some on and in our case that's good enough because we're just building I'm just building this AI agent for um for this demo purposes anyway uh but go ahead and sign up for your free account and so when you come here just make sure you're clicking on that free plan and I'm going to click on subscribe all let's go ahead and do ah this thing is so annoying all right I need to verify my email all right confirm email email has been confirmed sweet oh I forgot we need to verify the phone so I'm just going to add a phone number here and verify this all right so now I have my account I don't know why I'm so zoomed in here there you go all right so now I am in my account and as you can see on the top here it says your plan usage for this month 100 searches so and the left hand side again I don't even have to add a credit card so that's good to go okay so now let's go ahead and grab our API case you're going to come on the left hand side here and click on API key and here's my API key you can always regenerate an API key which is what I'm going to do because after this video I'm going to delete this and regenerate it and you should do that too don't share your API keys with anybody uh so I'm going to go ahead and copy this API key and we're going to come back to our NN account and paste it right here and click on save it says credential successfully created all right cool so we got connected um you can add properties so for example if you want to specify this to a uh the results to a country to a device or you can have an explicit array that you want to add so all of that option is available for you like I said you can do it even with a country so like if you want to have you limit the searches are just to uh us or some other country you could do that and again this gives you that optionality that things like chat GPT uh or other large language models don't have right because they're um trained on massive amounts of data that are not specific but with connecting to Ser API you can actually limit to um different options and you can add these things like and even you can actually limit even limit it to a Google domain right so if you only want to have access to google.com's search results you can you can uh specify that and have it um just be Google domain and if you want to for example have it uh in the US or or just explicitly train it for English you can add all these parameters that will give you more of specific data that you're looking for right so and again this is what makes this AI agent so great because you can add all these parameters that usually that normally you're not capable of if you're just using things like proxity or uh chat gbt or uh an Tropic so for now I'm just going to leave it as it is let's just get rid of these and let's test it out and we can always always come back and um test it later on to see if we can limit it to a certain country all right so we're good to go here let's go ahead and test this I'm going to come and save this here it's always good to save okay so let's go ahead and test this I'm going to click on chat here so for the prompt I'm going to try to use something a prompt or ask it something that's going to be relevant to um the most updated information that a search result will have access to versus things like chat GPT right okay so let's say What are the best restaurants actually what are the top rated restaurants in San Francisco let's say so this should um be able to pull up the most recent rated restaurants right because it should have access to uh Google's search results and all these other search engines that will provide the most updated information all right there you go so it provided the top um restaurants and to be honest I kind of agree with this because you know I live near San Francisco so I'm these restaurants are very popular and as you can see you know this gives it um on the right hand side this gives you that log so um initially the AI agent um went and updated the windows buffer memory used open aai chat model and used Sur API right and the response as you can see came from Sur API and it updated or it used chat GPT and updated the memory again so as you can see this gives you really uh updated information that something like a chat GPT won't have right so let's go ahead and see uh maybe today's weather that's a good way to check too what is the weather like today in San Francisco and I can confirm this on my phone to make sure that it is accurate so it says 65° yep it's 64 65° Perfect all right so all right well hopefully this gave you an idea of how to build this simple AI agent uh on the next tutorial I'm going to create um an AI agent that will label and organize all incoming emails into our inbox so stay tuned for that one I will see you on the next video thanks for watching we will build a really useful AI agent that will automatically label all of our incoming emails and our inbox this is going to be actually very useful because anybody can use this to organize their mailbox this agent will be able to automatically recognize the content of the emails that are coming in and automatically label them according to our predefined labels that we have in our Gmail account all of the labels will be color coded so that way our inbox is nice and organized we're going to utilize the text classifier node on n in which is basically an instant of Lang chain again if you're not familiar with these terms don't worry I'll walk through step by step and explain everything so that we have a good understanding of how this works and therefore you'll be able to build your own um AI agent that will be equivalent or similar to this for your own purpose all right so let's get started okay so as always we'll start on on our workflow and you'll come here and we'll click on ADD workflow so this time we're going to remove our um when clicking test because we're going to uh provide our own trigger which is going to be a Gmail trigger so that's going to be the first step so let's go ahead and add our first step I'm going to click on this button right here and I'm going to look for Gmail click on Gmail and we're going to use a trigger I mean there's lots of actions here but we're not going to use that for now we're going to use that towards the end when we're labeling our account but we need to start on on message receive so this is going to be our trigger right so if you don't have a credential uh let's go ahead and add that I have already two credentials but I'm going to walk through step by step all right so let's go ahead and do this so I'm going to go ahead and create a new credential so there's a step-by-step guide that NN provides and if you click on open docs it will take you through the step by step on how to do that but I'm just going to quickly uh walk you through so on the right hand side I'm going to click on Google Cloud here you need to have a Google Cloud account um once you create your account if you don't have already you're going to come and click on console and you're going to come here and click on a new project you're going to create a new project obviously I have several here so that's why um my drop- down shows all these different projects but yours is going to look blank so you're just going to click on new project you're going to say and you're going to name your project so I'm going to do nent test 3 organization leave as no organization click on create so now it's going to create your organization or your project um and then once once you are done with that you have to make sure that you are on the correct project again if you have several projects you going to make sure that you're on the right one but if you this is your first project then don't worry about selecting your crack project it will automatically go to that project so I'm going to click on my project head it in test three um so now we're going to click on API and services all right once you're here you're going to come down and click on o consent screen uh so if if this is your first time you need to make sure you create a o uh consent so for the user type if you have a Google workspace account you're going to click on internal but if you have a personal uh you're going to click on external so I'm just going to uh click on external click on create app name you can do name a app here so I'm just going to do then test three for the support email from the drop down this will automatically pull up your email so just select your email leave the logo as it is the app domain you don't have to worry about it and here for authorized domain you need to click on ADD domain and you're going to add and it in. Cloud all right so that's done developer contact information select your email click on Save and continue don't worry about these save and continue again save and continue for test users for summary back to dashboards so now we're pretty much done with uh creating our oot consent streen so now here's an important step make sure you're clicking on publish app otherwise it's going to give you an error when you when you want to when you're going to log into your account so you're going to click on push to production and confirm it says verification not required which is good to go because again we're using our own nent account so we're sure that um it's verified already okay so now once you're done here you're going to come to the library and you're going to search for your Gmail API so I'm going to search for Gmail API Gmail API you're going to click on enable all right so that's done um so now now we're going to go to our credentials we're going to click on create credentials and you're going to select oot client ID application type it's going to be web application name of the Cent name you're going to do n8n test three again you can name whatever you want so test three here's the important part in the bottom here where it says authoriz youir uis you're going to click on ADD URI you're going to go back to your account you're going to copy this callback URI and you're going to paste it that's it you're done so you're going to click on Create and you're pretty much done so as soon as you click on your create this going to pop up with your client ID and your client secret you're going to copy the client ID go back paste it here you're going to copy your client's secret go back and paste and now that's sign in with Google uh appears so you're going to click on sign in with Google and this little popup window is going to show up it's going to say choose the account so choose your account and this is where the Google says hasn't verified this app so don't worry about this just click on advance and you're going to click on go to nate. Cloud you're going to select all of this and you're going to continue and you're pretty much done as you can see in here it says account connected all right so let's go back once you go back your account is going to get connected mine because I already have several accounts now um this uh Gmail account shows up but I'm going to go ahead and actually delete some of this because I already have a ton in there let me get rid of this go back let me get rid of this too all right perfect there you go so you're going to select your account all right so for the poll times so this is the mo you have several options when it comes to this is basically trying to mon monitor your nbox so you can monitor your nbox every minute every hour every day whatever you prefer and this is for when you actually activate this um workflow so that way it's automatic and it will always U monitor your email I will leave it at every minute and then later on I'll show you exactly what this means okay so for the event we can just uh select message receive you don't have a lot of options and at the bottom make sure you click on this because if you leave this at simplified it's not going to um get the most proper details it's not going to provide the most proper details so therefore just make sure this is not selected for the filters um don't worry about this for now we'll filter our own using our text classifier okay so we're pretty much done at this point so let's go ahead and fetch a test event yeah this is to make sure that uh your Note is working and as you can see this looks like it's good to go all right cool so for the next step we're going to add our um text classifier agent so you're going to click on this plus button right here you're going to go to Advanced Ai and in the bottom as you can see there's several options we're going to select that text classifier so this is an instant of Lang chain so let me quickly explain what that means so in simple terms uh Lang chain is a framework that's designed to help developers or anybody build application that leverages large language models like uh chat GPT or llama or other different models and the goal of Lang chain is to make it easier to integrate these large language models into different tools applications and workflows so it just makes um the usage of large language models very very simple so in this instance our text classifier node is a instance of Lang chain which basically utilizes a large language model like uh open AI in our case will attach our open a large language model to be able to classify a text and process it and label it into something different so that's exactly what we're going to do we're going to grab all of the data that's coming in from our Gmail trigger and use this instance of blank chain to connect it to the open a model and classify and label these text accordingly so let's go ahead and do that so that's kind of like a overview of what uh this instance of blank chain does so first what we need to do is we need to figure out what text we need we're classifying right and this text is going to be coming in from our Gmail trigger right so there therefore the text to classify we're going to go ahead and make sure you in schema and we're going to grab our text which is going to be the body of the email because we want to make sure that our classification occurs from the volum of the email and not the uh um the subject or anything else because you know if somebody's sending you a lengthy email you want to make sure that this test classifier goes through and analyzes the body of the text the full body of the text understand what this text is about or what this email is about and therefore provide the proper label that we're going to U categorize in a little bit okay so from the schema we're going to come down and grab our text right here so you know minimize the headers and everything else so that way it's uh easier for you to locate this so we're going to come down here on text and we're going to grab this and just drag it here so this is going to convert it into json. text again inside these curly brackets these are all the JavaScript code um but again we don't have to worry about it because we're just using this schema to just drag and drop that's it okay so the next step is to add our categories and this is exactly where we will add our labels but before we do that let's go ahead to our email account right so this is where you're going to be uh creating your labels first so let's go ahead and create create our predefined labels and this could be dependent on what you're doing whether it's your business or your personal account you can create whatever kind of labels you want but for mine I'm going to go ahead and create several labels the first one I'm going to create a label that's sponsorship and again these are all of the um email inquiries that are coming in in my account for my YouTube channel for sponsorship so I'm going to make sure that um I identify the body of the emails that are coming in and make sure that it if says anything related to sponsorship that label gets automatically added and we you know we'll we'll do that in that category section right here in a little bit but let's go ahead and create all of our our labels first so another label I'm going to add for collaboration I'm going to add one for business inquiries okay and I'm going to add one more and just call it others so this is going to be all of the emails that are not uh classified or labeled as these three I'm just going to say others all right so now that's done let's go ahead and actually color code this so if you come in the right hand here and you just say label color so for business inquiries I'm going to choose let's say this green one and you could always add your own custom color so if you go here you can add a custom color you can add the background color and a text but it doesn't matter I'm just going to use this predefined ones all right so for collaboration I'm going to do orange for others I'll just leave it as that and then for sponsorship let's go ahead and label this this as this green color okay perfect all right so we got our labels now on our email account now we're going to go back to our nadn workflow so here this is where we add our categories so the first category is going to be the sponsorship category so I'm just going to click on ADD category and we're going to do sponsorship you can just say sponsorship inquiries for the description I'm going to say emails that emails that offer or inquire about sponsorship deals from YouTube channel blah blah blah and again you can always maximize this and take a look at this um all right so that's that and you can use uh chat GPT or or something to come up with these descriptions uh because you want to make sure that you have really good description here so that way U your text classifier uh can properly understand and capture all of those important details that are inside the email so that way it can distinguish between these different categories uh that you're putting in so make sure your description is really thorough and again that's depending on what category you have all right so that's done so I'm going to add another category and I'm going to say collaboration with companies okay so for the description for this category I'm going to say emails from AI companies or related businesses that are interested in collaborating on projects tutorials on content creation for the channel so you can see it's very thorough because we want to make sure that um our AI agent is properly or this text classifier is prop properly classifying uh and uh adding the proper categories okay so the next one I'm going to say business let's do General business inquiries okay I think I spelled that wrong Ines there you go so for this one I said emails that pertain to General business related topics not specifically related to sponsorship or collaboration such as inquiries about the channel requests for information and other miscellaneous business communication so that's good and the last one I'm just going to say [Music] others and then our description I'm going to say all other emails that do not meet the description of the previous labels okay so we're pretty much done with all our categories again you can add whatever categories depending on what you're trying to do so once you're done with that here this is a little bit of an important uh step I think there's something going on with this particular node that if you don't select this option for system prom template and just you can leave this as it is but make sure that you select this and this gets activated otherwise it's going to give you an error that the note does not recognize the proper parameter so make sure you're selecting that okay so let's go ahead and test this step I'm going to click on test step says a model sub node must be connected oh I forgot to connect this all right so let's go ahead and connect the model first to this right so as you can see right here all of our um categories have have been established here so now let's go ahead and attach a large language model to this so I'm going to click on large language or click on model and grab our open AI chat model um create your account if you don't have already an account go ahead and select that and create your credentials by adding your API keys I'm going to select uh gp4 mini cuz I've noticed that gp4 o is very expensive when it comes to API calls so that's good to go all right so now let's go ahead and double check this um first let's go ahead and send an email so that way we can um make sure that this is because again this is monitoring all of the incoming emails that are new so let's go ahead and do that so for the subject I'm going to say partnership for Content we're not monitoring the subject so it's not going to matter what what this classifier is monitoring is the body so we got to make sure that we put the proper text here to be able to categorize this so I'm going to go ahead and add hi would love to sponsor your next video on a no code automation we believe our product aligns perfectly with your audience let's discuss the details so this is particularly an email that's for sponsorship purposes so our system should automatically recognize this and label this as sponsorship right here okay so let's go ahead and send this I'm going to go to my inbox so I sent this email right now as you can see it's just showing inbox and again that's because I'm using the search There's No Label on it right so let's go back to our workflow so now all of this is done let's go ahead and test this stop and it should be able to recognize that a new email has come and there you go so as you can see right now let's double check to make sure that the email came through hello we're interested in sponsoring your upcoming tutorials please share all right that's good so let's see what it did uh we want to make sure that the label uh is properly done as all right there you go you see it says in spons sponsorship inquiries Branch one item okay so that looks good all right so now let's go ahead and add another node that will automatically label our email that's coming in in our Gmail account right because right now this is just classifying it but there's no way for it to label that email so there therefore we're going to add another note to this a Gmail note so that way it has access to our email and therefore uh is able to label that so let's go ahead and click on the plus button here I'm going to search for Gmail and this time we're going to go to message actions and we're going to say add label to message right so we're going to click on this here you want to make sure you're in the again you're uh selecting your proper Gmail account the resource is going to be the message not the label this is going to be the message that's coming in in and the operation is going to be adding a label and the message ID okay so this is where we need to grab our message ID from our text classifier right so if you take a look at the schema here again all you have to do is just grab this ID and put it here so now the label name or ID we need to identify which label is this going to and this is where this node is going to have access to your Gmail account and therefore it should be able to have um all of the labels listed here so let's go ahead and select our sponsorship there you go right because this is our sponsorship node all right that's good okay so we're pretty much done here let's step outside and put prag this here let's add our other labels so I'm going to click on the collaboration tab same thing actually instead of that a shortcut is just to copy this and duplicate there you go grab this give myself some room here double click add label json. ID you're going to leave it as it is and this time instead of sponsorship this is going to be for collaboration okay that's good make sure you're attaching the correct um category to the pro to the to the label that you have here okay otherwise it's going to it's going to have an error okay let's try this again I'm going to go ahead o duplicate that's good this is going to be for General business inquiries okay so I'm going to say let's select our business inquiries that's done and the last one keep forgetting the last one is going to be for others let's connect this to others there you go that's done um to organize this better or to make sure that we're properly um labeling this I like to name rename these notes so that way understand understand what's going on so let's go ahead and rename these I'm going to click on this this is going to be for our sponsorship okay rename out that's good this one is for our collaboration rename done this one is going to be on our business inqueries rename done this one is going to be others perfect done okay so all of that is good to go so now let's go ahead and actually test this thing out so this is the the first one as you can see right here it says one item so this is the message that we just sent right here partnership for spell partnersh shop I said but anyway so this is the one that was supposed to be for sponsorship and this already got executed uh that's why it says one item so let's go ahead and test this out so I'm going to click on test step they should label this email in my Gmail account number account as sponsorship now so let's go ahead to back to our account I'm going to go ahead and refresh this and there you go so now as you can see the sponsorship label um has been attached to this email that that came through all right perfect so that worked let's go ahead and test the others too cuz I want to make sure um that all of this is working so let's go ahead and send another email for collaboration this time so I'm going to go ahead and type for the subject I'm going to say AI tool partnership hi we're launching a new AI tool and would like to collaborate with you on a demo video or you interested okay so that's clearly um a partnership um email right so our tool should automatically recognize that and should label it as collaboration this time so let's go ahead and test this workflow again so I'm just going to click on test workflow so if I click on this this time it should come here and perfect there you go so now it says one item collaboration this went through so let's go back to our email and refresh the page and perfect there you go so this time it says AI tools partnership hi we're launching a new AI tool would like to collaborate with you on a demo video or interested so it it correctly labeled it so let's go ahead and test the other ones too because I want to make sure like I said every everything is working so this time what you can do is instead of testing the workflow if you just click on inactive here so this will um activate this workflow meaning this will automatically monitor your inbox every minute and therefore automatically label all these different emails that are coming through so let's go ahead and do that so I'm going to send another email this time this time it's going to be for business inquiry so let's go ahead and do that I'm interested in learning more about your services and pricing could you provide more information so again this is clearly a um email that has as the body for business inquiries right so because our Ed in workflow is already live so it should be able to um automatically label this I it's going to take a minute or so because obviously here uh our trigger is saying that we going to monitor it's going to monitor our Gmail account every minute so therefore um it should take oh there you go it came through so it says and it correctly um labeled this as business inquiry right inquiry about your channel hi I'm interested in learning more about your service and pricing blah blah blah all right perfect so again this is live right now so let's go ahead and try one more cuz we want to make sure that if it doesn't meet any of these categories it should be able to uh label it as others so let me go ahead and type another email just wanted to say thank you for your tutorials they have been really helpful so I'm going to click on send all right the message is sent so now like I said we'll just wait and uh it should come through and it will automatically it should automatically label this as others because like I said it doesn't meet um the category for any of these other three therefore it should label this properly as others so let's go ahead and wait a little bit all right there you oops uh it said business inquiries that's a wrong label let's see what we did here maybe wait him let's see what we did wrong here so if I test the workflows all right so let's go ahead and click on this and ah see this is where I made a mistake so in the label name I put business inquiry this should have been others so we go back and where's others right here there you go that looks good now okay let's try this again so this time it should let me test the workflow should go here perfect that worked let's go back just refresh all right great there you go I mean the reason why it's has two labels is because it already labeled this as business inquiries because we made a mistake there so let going get rid of that go back this time let's try again let's try it again I just wanted to say thank you for your toys they've been really helpful blah blah blah it's good click on send this time it should label it properly because again now mistake was earlier I had put business inquiries for this uh other label or in the category so let's go ahead and wait for that to come through so let's go ahead and refresh and perfect there you go so it worked now so as you can see all these labels are now working according to what we identified or what we uh categorized here self-hosting has a lot of advantages first the fact that you will have complete control over your data so if you're worried about U privacy issues or if you're worried about leaking your data to third party app and you don't want to use the cloud account so self-hosting will be a great option for you um so Docker is actually the preferred method U by the nnn community and a lot of other folks because it gives you a lot of advantages and control over how you can run and self-host it along with other applications so let me quickly explain what Docker is for those of you who are not familiar with it if you're already familiar with it please feel free to script this but I just want to quickly introduce what Docker is and why this is so beneficial when it comes to self-hosting Inn so essentially Docker is just a platform and it's extremely popular uh platform in the developer community that allows you to package application and all of their dependen dependencies into one standardized units which they refer to as containers so you could think of it as a tool that packages all of your application like nnn and all of its dependencies whatever it needs all into one single unit called the containers again NN and all other applications have a lot of dependency that it comes with such as libraries uh system tools and settings so what Docker allows for you is to put all of that in one container or in one unit and then you can basically deplo deploy this um and run it consistently across other platforms so that way if you want to self-host yourself in a cloud account in a cloud provider then you can do that and it will to behave exactly just like it would be in your locer machine so when it comes to nnn and self-hosting the reason why docare is so beneficial is because it really simplifies the process of getting NN up and running and because it bundles all of the necessary components into one package so that way you don't need to manually configure anything or worry about any kind of issues or environments uh that you might run into so that's what has a huge Advantage when it comes to the Simplicity and the process of running idence on your local computer and then another big Advantage is the portability meaning that um when you deploy Docker in other environments so let's say if you want to um deploy it on a another hosting platform um what this will do is will make sure that it consistently behaves the way it will behave in your local computer and then another thing is the isolation of each container meaning that these containers run independently of each other uh meaning that if uh if you have several operations or several application and it then would operate in its own isolated environments and again this uh removes any conflicts or with other applications that might be running so that's what gives it a huge Advantage ensuring it's really stable and reliable and another big Advantage is the SC scalability so as you scale your operations in nadn a Docker really will allow you to uh scale and deploy multiple containers based on what your needs are right so this really makes it simple to handle increased workloads and if you're creating complex uh workflows and automation this really allows you to be able to scale as you go without the need to configure or manually change any of the settings so that was kind of the overall gist of what uh Docker is and how that helps you when it comes to self-hosting NN so let's go ahead and get started um and install Docker application the desktop application on our computer and then we'll go ahead and run NN through the docker application so the first thing you need to do is you need to go over to doer. and you need to download it for your machine so um whatever you're using whether using Windows Linux or Mac make sure you're downloading the correct version one important thing if you're using Mac make sure you're the newer ones especially the uh M1 M2 M3 chips make sure you're downloading this version and not the Intel chip because this is not going to work otherwise so I'm going to go ahead and double click on this it's going to download my application so once you do that you're going to go to your downloads and then double click on doer. DMG and once you do that it's going to ask you a few questions to install and once you install that then you can go over to your applications and then uh initiate Docker I've already done that so I'm going to go ahead and open the docker desktop application all right so once you do that this is what it's going to look like so this is their uh desktop application it has a really nice user interface let me get rid of that all right let me maximize this so that way you can see this really well all right perfect so this is what the initial it might give you some uh tour but go ahead and skip that but you will have containers images volumes builds we're going to focus on images and containers actually before we do that let's go ahead and create a folder so that way we can put all of our nend data into that folder so that way uh we can keep track of the data that we use all right so I'm going to go to my finder so go to your homepage and right click new folder and then we're going to call this nn- data all right so right now the folder is empty all right we're good to go here okay so let's minimize this so now I'm going to come to my images and we're going to go ahead and click on search images to run so here what we going to do is search for NN io/ NN I've already done that but let's go ahead and do it we're going to type n8n io/ n8n okay and the first one as you can see right here it says 100 Mill plus 293 Stars so make sure that you're downloading this image because otherwise it's going to give you something not downloading sorry you got to pull this um so make sure that you're on the correct one and I'm going to click on pull and once you click on pull now as you can see it's loading so now this is going to pull all of that data um into your local desktop app and and it will be saved under the images tab and again we'll take a look at that in a little bit so now that you have the correct image download here so now you can see here it says the size and now on the right hand side here it says run so for the first time when you click on run we need to set a few optional settings so once you click on run it's going to open up this popup where it says run a new container optional settings you're going to click on the right hand side here you're going to put a container name cuz otherwise it will select a random name so I'm just going to say n8n container Das container so that way I can recognize it all right so the host Port so this is where uh you want to host post on your local computer what port which in a little bit I'll show you what that means but for now just put 5678 and this will map uh this Docker container to your local Port so that way you can access it through your um local machine and again like I said in a little bit I'll show you how to do that all right so the volume this is where you want n it end to um store its data so that way if uh the container is stopped or even it's deleted then all of your data will persist so this one you're going to click on this uh three dots here and you're going to go ahead and select um the folder that you created right so earlier we went to our homepage and created this folder called nn- dat so you're just going to double click select that and click on open so for the container pad you need to enter slome slash node and then slash do n8n and then so what this does is this ensures that uh the data the data on your host machine is synced to and it 's directory inside the container of this Docker container so this basically ensures that all of the data is saved in the right in the correct area okay that's good environment variable this is optional so if you want to do any kind of authentication this is where you'll enter so if you want to do that you can go ahead and like you know use J GPT to put uh variables here but I'm going to just leave it as it is so now that we're done with that all I have to do is click on run and as soon as I do that you can see now with BR s to The Container Tab and it runs all this stuff and then on the bottom as you can see now it says editor is now accessible via Local Host 5678 and this is exactly what we typed earlier like the port so the 5678 which means that now on the port in your local machine the port 5678 you'll be able to have access to Ann so I'm just going to copy this and go to a new tab come here on top and paste it and there you go so now you can uh set up your email account so as soon as you uh paste that in your local machine you'll it will it will take you to the form where now you will have to set up a new username and password and again this has nothing to do with your uh cloud account so therefore there is no migration here go ahead and enter your information I'm going to go ahead and enter mine okay so once you do that click on next and now you have to just customize the n then it'll just ask you a few question go through it software the service there VI I'm just going to say oh whatever it doesn't really matter myself it's fine Google get started all right so now it presents you the blank workflows and again it's the same environment or the same user interface just like if you were to access from your cloud account you have your templates over here you have your accounts uh you have nadn your credentials and start from scratch means that now you can just jump into your workflow and again same thing you have ability to access everything from your Local Host here um your Advanced AIS AI agents whatever you need all of this will be accessed uh one thing is if you want to import your workflows from your cloud account go to your cloud account come to the top right hand corner here and you're going to click on download and then you can come back here and click on import from file and then you you will just basically select that downloaded Json file and then that will import all of your workflows here and then obviously you have to um add your credentials because it's not going to migrate over the credentials because now you're using your local machine to run everything and that's pretty much it so if you already have a bunch of workflows on your cloud account you can migrate them over very easily all right so now let's go ahead and actually um stop this so that way you see um how that works as well so now if you are done with your workflows and you want to stop uh the container that's running all you have to do is come to the container and then right here it says stop click on this and it says stopping n8n as you can see in the bottom here and it stopped and as you can see now there's that option of play button that appears so now if we go back to our local host and refresh this or enter this again reload now it says that this site can't be reached because obviously our um Ed end container is not running so if you want to run it again you'll come back click on start and now it says running right right so go back to your tab and reload and there you go so that's that's kind of the beauty of kind of setting it up once for your account so that way you're not going to be able to you don't have to log in there again because we didn't set any kind of authentication um so this just makes the process really really smooth so on the next uh tutorial what I'm going to do is go through uh setting up the self-hosted AI starter kit so this is going to be basically similar to what we did earlier but now we're going to use our our um command line um because we'll be able to install everything within our local machine including olama and quadrant which olama is um a software that gives you the ability to run um and interact with large language models that are open source like meta AI llama languages on your local machine we can actually download these large language models on our local machine and through um llama we'll be able to interact with them and then also quadrant is another Vector store database uh that you can self-host and be able to therefore interact with everything within your local environment so we'll go ahead and do that tutorial next because this will give you like an entire package uh for self hosting your AI workflows if you wanted to run AI locally and build amazing AI agents all from your machine this tutorial is going to be for you we're going to build this amazing AI agent that's going to utilize all open-source AI tools including the quadrant Vector store that's an open- Source Vector database we're going to use several large language models with the AMA platform and we'll be able to interact with this AI agent using our chat model we'll be able to upload our own documents and immediately interact with it using the vector database this is going to be a great video you're going to learn a lot about how all these tools connect with each other all locally through your machine so you can build really great agents so make sure you stick around till the end because this is going to be a very very useful tutorial all right let's get started all right so first thing you need to do is head over to N8 n's uh GitHub it's github.com n8n iio you will scroll down and you'll come here and click on the self-hosted AI starter kit so here they provide you all the guide depending on what machine you're using so if you for example have an Nvidia GPU go ahead and follow this but if you using Mac then go ahead and follow what going to do down here which I'm going to use because I have a Mac so we're going to basically utilize this right here my goal is always not to use any code at all uh because obviously there's a lot of people who get a little intimidated when they see code so that's why I try to keep it as low as possible therefore we're going to mostly use the docker desktop app um to be able to download everything we need but for this step we have to just clone uh this GitHub replay so all we have to do is copy that and come to our terminal here and all you have to do is basically paste it and this is going to download everything okay let me zoom in a little bit there you go all right so that got cloned so now the next step is you just need to CD into that folder that got uh created okay so I'm going to press enter all right so now we're inside that folder Let Me Clear again all right great um so before we move to the next step let me quickly uh pull up my desk toop Docker app so if you see right here right now I have no images here and no containers so that way you can see that it's empty right now and then as soon as we uh go through and enter this we'll be able to uh see that all of those containers and images is going to show up on our desktop app so this is always a good way um to double check and make sure everything is getting loaded properly all right so now that we're inside this self-hosted AI starter kit the next step is to be able to CD into it we already did that and now we just need to click on Docker uh copy this one go back to our terminal and again let me pull up the desktop app here so you can see it side by side and paste so Docker compos profile CPU app this is going to run um all of the different Docker containers that's required for this AI starter kit in your profile through your CPU so you're just going to press enter and now it's going to run and pull the different containers and images that are inside this including the AMA post grass and8 end um and then the quadrant Vector database as well all right perfect so it looks like we got everything as you can see on the right hand side we got all the four images that was inside that um starter kit and on the containers tab you can see right now it says the self-hosted AI starter kit and includes uh the quadrant postrest AMA and N perfect and then same thing on um our terminal here as you can see it downloaded everything that we need and right now it says Local Host disc is 78 you can access this from there okay perfect so now we're pretty much done here okay so now uh let's make sure everything is running so if I yep it looks like everything is good to go here everything's running so let's minimize this for now we can copy um this or just go to Local Host 5678 so let me go ahead and do that I'm going to say Local Host 5678 if it's your first time uh this is going to pull up and ask you to sign up for an account um but if you have already logged in through this Local Host before then it's just going to ask you to sign in so I'm just going to go ahead and sign in okay you're going to enter your email and password and you're going to sign in all right so now at my Brank workflow here so let's go ahead and change the name here to local AI kit all right so now the first step we need to add a chat trigger so let's go ahead and do that I'm going to search for chat and chat trigger perfect so here's one difference that we're going to have compared to other uh AI that I've built before uh in this one we're going to give our chat the ability to upload files so what you're going to do is come on the options click on ADD field and you're going to click on allow file uploads so what this is going to do this is going to give this chat the ability um to add documents or add files from right here on the right hand side as you can see now we have this little like plus sign with a document there because we will be uploading our own documents into the vector database through the chat model and I'll explain that a little bit more all right so now that's done all right so the next step is going to be adding our Vector database so I'm going to search for vector and as you can see right here there's several uh Vector databases but the quadrant Vector source so this is the one that we're going to utilize so quadrant Vector store is a open- source uh Vector store that you can utilize uh so if you go to their website that they show you all you can see all the details um they have uh you can click on pricing um and they have as you can see right here quadrant Cloud starting at zero so you can sign up if you want but we're not going to worry about it because we've already installed quadrant through our AI starter kit but it just gives you a good overview of what uh this CN Vector store is and why make it makes it different compared to other vectors so it's like the pine cone Vector score that I've used before all right so so your credential is going to be automatically loaded here because of the fact that we're running everything on Docker right so therefore it's going to have everything loaded there for the operation mode we're going to be inserting documents in this so we're going to click on insert um and for our Cardon collection we're going to do by ID actually and we need to go back and actually test this real quickly so let's go ahead and attach this let me double check click there so now let's just go ahead and add a chat okay this is going to give me an error but that's fine I just want to um showcase how to add this chat in there so now as you can see on the left hand side I have the chat message received so what we need to do is we need to add our collection by the chat ID because we need to provide the ability for a user to upload their own document through the chat window so that's why we need to grab that session ID of that chat that's going to be inputed into this quadrant Vector store where before for example in my previous video that I did using the pine cone Vector database I added a uh step before this with Google Drive where we would grab the document from the Google Drive and upload it into the vector store but this like I said is going to be instantaneous meaning that a user can upload a file themselves and it will get added to the vector store and then they can interact with it all right so once you grab that that's good to go so we're going to get out of this all right so now let's add uh the embedding and document loader to this so you're going to click on embedding so you have several options obviously to add the embeddings but uh you can utilize the open AI but that's not going to be local of course but the whole point of this video is to be able to utilize all local resources so I'm going to use the embeddings olama so again same thing your olama account will automatically get uploaded here because you're using um the since it's all part of the same same same container so it's going to pre-populate everything for you that's the great thing about this when you're using this AI starter kit through your CPU you don't have to worry about adding or connecting you new credentials all right so for the model I've already uploaded embedded models in this so in this account of mine I already have these but I'm going to show you exactly how to add a new embedded model from the AMA platform because obviously you cannot use chat model here this has to be an embeddings model right so therefore we need to go ahead and add a new embeddings so let's say I want to add a new embeddings here obviously your uh when you click on this account if it's your first time this is not going to show uh so therefore I'm going to show you exactly how to add new models there so let's go back to our AMA so if you just go to ama.com right if you go to ama.com and if you click on models here this this is going to show you all the models that are available but again we need to grab an embedding model so you're going to come to the top and search for embedding models oh I think I spelled that wrong all right perfect there you go so now you have several embedding models there's this one that's very popular by snowflake um or you can this is actually one of the most popular ones this nomic embedded text and in the bottom as you can see it says the nomic embedded text is a large context L text encoder that surpasses open AI text embedding 8 out2 and the embedding three SP so again this is a very useful um embedding model that you should utilize because it's not that large and it's very very powerful but let's go ahead because I've already installed this on my uh AMA I'm going to show you something that I don't have that I can install so let me see here what do I have so I got the mxb embedded large and then the noic embedded text so let's go ahead and add something different go back here there you go okay let's see let me act the S Lake actually there you go this is a pretty good one but that's pretty big I don't want that let me add this 20 2 million parameter one okay all right so here's what we need to do we need to copy this AMA pole snowflake Arctic ined right so I'm going to copy this you can do this several ways the coding way is to go to your um Docker yml file so if you go inside your NN starter kit and open it into in a text file you can come to the docker compos yml file and right here as you can see it's only pulling the Llama 3.1 right so you can actually add another line here that basically says AMA pull snowflake Arctic and then you you can rerun this and that way it will actually download that model for you but because like I said I always want to focus on uh using least amount of codas possible so let me go ahead and get rid of this I'm going to show you the easiest way to do this is through your Docker desktop so I'm going to open my Docker desktop you're going to come to your containers tab if you're not already there you're going to come and click on as you can see right here AMA latest this is running so I'm going to click on the container for AMA you're going to go to exact right here here and we will pull that from here so all you have to do is just paste it right here press enter and this is going to pull that embedded model or any other model that you want from um your olama you'll be able to basically do the same thing grab that code uh make sure you're pulling it and then just basically say AMA pull and whatever model you want to pull you can add it here right so let's say I want to add another model here right let's say I want to add um a normal a regular model so for example let's let me add something very very small all right for example let's see let's say I want to add this Quin 2 by Alibaba so I want to add let's say this super small .5 billion primer right so all I have to do is it says AMA run Quin 2B right so I'm just going to actually just copy this and go back to my desktop and say AMA pull and just paste that model press enter and now it's going to pull that large language model that exists inside the AMA uh platform so as you can see it's like the easiest way to do this because like I said you can use and change the um Docker file inside the starter kit but that you know that's going to require a little bit of coding and if you're not familiar with it then you're going to get lost so this is the easiest way to do this so now let's go ahead and double check here so if I get out of this double click on my embedding now as you can see I have access to that snowflake Arctic embed 22 million parameter and then also I added this uh Quinn 2.5 billion parameter this wasn't there before right and you can double check go back to the video and make sure these two weren't there we just added it through that Docker all right so now let's go ahead and add our embedding documents I'm going to click on that click on default data loader uh we're going to select the data type as binary load input all data automatically detect we're good to go there we need to add a token splitter so I'm just going to do a token splitter and have the chunk size be 550 okay and if you need more information about this again you can watch my previous video where I explained or the video that I made about um pine cone database where I explain these things in detail okay so for now I'm going to leave it at that uh so let's go ahead now select our I forgot to select our embedding model yeah just make sure uh so I know we downloaded all this but I kind of like this nomic embedded text latest this is um the one that we looked at earlier that said that it's more powerful than um open AI EMB bettered models I'm just going to select that and it's a smaller one because I have a you know my memory in my computer is not that great so that works well but again you can select whatever you want okay so now let's go ahead and test this thing out so another great thing about quadrant Vector databas is that you can actually check out the dashboard through your local host and the way you find that is if you go to your Docker and your containers quadrant right here it says it's running in 6333 so let's go ahead and do that go to Local Host and we're going to do 6333 SL dashboard so that's what you need make sure you're putting the SL dashboard there I'm going to press enter and there you go so this is your collections right now um this dashboard is empty there's no collections here because we haven't uploaded anything but let's go ahead and do that so now let's test this I'm want to go to chat now and I'm going to upload a file so I've have downloaded this BTC white paper the Bitcoin white paper but you can do whatever you want so I'm going to say what is the Genesis block which is the original Block in the Bitcoin white paper so now if I press enter so now what this is going to do let me back out of here now it's going to split this and add this to the uh quadrant Vector database via this embeddings Ola model so now that's what's happening right now once this goes through and completes you will we will refresh the space and you'll see that uh a new collection would have been added so let's just wait for this to process if your computer's slow like mine this might take a little bit uh but if you have a um computer that has a really good memory and or if you're using a GP this going to go a lot faster but there you go all right perfect so now as you can see uh this went through and 13 item came came out of here so now let's go ahead and actually let me quickly first double check on this yep and as you can see right now this Bitcoin white paper that we just uploaded via our chat got converted into vector and to double check this now I'm going to refresh the page and as you can see we have um our Vector that got added here okay all right so that's perfect so let's go back okay so that step is done now let's go ahead and add our AI agent so what what I'm going to do is click on plus sign here go to AI agent so here what we need to do is because uh there are two inputs there's the quadrant Vector store input and the chat input but we need to connect this to our chat input right because we need be able to interact with the user based on the chat but we'll add a vector store retriever in this session to be able to have access to the vector Store to our document that got uploaded in the first step okay so let me go ahead and actually actually let's go ahead and add that first so just agent it's going to be not a tools agent this time it's going to be a conversational agent right so I'm going to click on conversational agent The Prompt you're not going to say take from previous node automatically because the previous node is a quarter Vector store what we need to do is say Define below and we're going to define the text right this is going to be coming in from our user from the first uh step from the chat input so you're going to click on the input here and grab the when chat message received you're going to go to Json and from here we're going to grab the chat input right because we want to make sure that we're understanding what the user is asking um all right so it says when chat message receive. item. json. Chat input perfect so now we're good to go here let's go ahead and back out of this so now let's add a chat model so for chat model we're going to add our AMA chat model and here's going to be the difference so earlier in the previous step this step we added our embedding um and as you can see here let me go ahead and click we added this snowm make embedd and text but for but this one since this is a chat model we need to be able to add our large language model so you can do this Gemma 2B you can do the Llama 3.1 latest or you can do this really small one that I downloaded there right but let's go ahead and yeah I'm going to go ahead and select this Gemma 2B okay and we'll select other ones later on too to test this out okay so we're good to go there all right so now let's add you can add a memory so this is where you already downloaded the postgress uh um uh uh database through the AI starter kit but I'm not going to utilize that so I'm not going to add that here but you can you can definitely add that so I'm going to go ahead and utilize the tool so now we need to start we need to add a vector store tool right because we need to retrieve that information from that uh quadrant Vector store so go ahead and do put a name here so I'm just going to say file input okay so the description this is going to be the knowledge base to answer user questions right because uh this is going to be the knowledge base that's going to be retrieved from the vector store the limit you can leave at four that's fine so now let's go ahead and add our uh Vector store here so the vector store is going to be the quadrant Vector store right and this time it's going to again pre populate already it's going to retrieve documents this time right and then the quadrant collection is going to be by ID so the ID you're going to grab this this is going to be our session ID so this is very important you're going to click on mapping go to when chat is received go to Json and you're going to grab the session ID here right because this thing needs to match what's in our database right here so if you go to your quadrant this right here this is what uh let me click on that so this is the session ID there that will match uh right here as you can see test ocf 28 7 let me just double check test ocf 287 yep that's a good all right so that's good so we're done with that now let's go ahead and add the rest of the stuff here I'm going to add my Vector sto model let's just duplicate this actually copy duplicate and boom okay that's good uh but this time for this one actually I'm going to decrease the temperature the sampling temperature uh to zero because we want to make sure that it's giving us uh the accurate answer and not hallucinating um all right so quadrant Vector store so the embedding same thing we're going to add our embedding same thing I'm going to duplicate this and connect this all right so we are good to go oh one more thing I forgot here so there's 13 items as you can see that's coming from this Vector store we want to make sure that we're processing this once and not like 13 times so you're going to click on that go to settings and you're going to say execute once all right so make sure you do that step okay perfect so we're pretty much done let's go ahead and test this thing out and make sure it works so I'm going to this time um delete this and try this again fresh so I'm going to add my BTC white paper here again and I'm going to say this ask the same question what is the Genesis block right I'm going to press enter so now as you can see this thing is working again based on how fast your computer is how fast your CPU is um how big the memory of your computer is this thing might go a lot quicker and it also depends on what kind of model you're using so if you're using a really large uh model that's going to be very heavy on your computer this whole process is going to be extremely slow so you make sure make sure you're using um the correct model depending on what computer you're using and there you go so this step got executed so 13 items were sent now the AI agent is processing this again and this should be running once because that's what we put in the setting right okay as you can see this step is complete now it's going to utilize the vector store tool and the AMA chat model to be able to respond to our user's query via this AI agent so that step is complete again my computer is very slow that's why this is taking so long but usually if you have a faster or if you're using an Nvidia GPU this is going to be super super fast all right perfect so it looks like everything went through uh 13 item cames out came out of here from the vector store and everything got processed properly and our AI agent spit out one item meaning that's the response so let's double check so if I double click this as you can see it's giving us the output the Genesis block is the very very first block of the blockchain network it's essentially the foundation upon which the entire blockchain system is built which is correct okay perfect so that worked out and we can actually see the logs here to make sure that this was done properly so if we click on the AI agent and right now this is showing the output so let me pull this aside if I click on log all right perfect so as you can see all of the tools will be utilize the AMA chat model the vector store tool the quadrant Vector store embedding AMA 1 and chat model and chat model so this gives you that log of how this entire process works and what were the responses to come up with this reply for the user when they ask that particular question all right so looks like everything worked out great again you can actually uh utilize for example an open AI if you see that your computer is too slow uh just go ahead and add open AI because you can use the oops that's wrong one because you can use the API as well to be able to connect to a model like open Ai and I'm going to use let's say this small one copy this duplicate pting get rid of this right let's go ahead and connect this same thing with chat model I'm going to utilize the open AI chat model let's say use gp4 mini you could you will see this will be a lot quicker G4 mini okay so let's try this again let's add our Bitcoin white paper all right we're going to say what was the size of the BTC what is the size of the BTC header let's see what this does oh I got an error bad request wrong input Vector Dimension error expected all right there that's actually a good error because this this is a good point right here because um depending on what embedding you're using uh it it's going to have different dimensions meaning that because earlier I was using uh that embedding from olama that we downloaded so that therefore this has the different dimensions meaning open AI uses um a different dimension but as you can see for the quadrant or collection here let me go back the size right here it says 768 right but our error says that the dimension expected Dimension 768 but got 1536 because this is the dimension that comes out of open AI embedding so therefore we need to basically get rid of this so you can now delete this so now you don't have anything here so now if we run this again this should remove that error let me go ahead add that up all right let's try this again the size of BTC header is 80 bytes which is actually correct and as you can see on the right hand side it used all of the correct nodes and on the right hand side again same thing you can see this everything would utilized properly and now when we go to our collections refresh this now you can see the size is 1536 right so it just depends on what kind of embedding model you're using um and that will split the document into different Vector sizes you want to make sure you're using uh if you're changing um the embeddings uh you make sure go ahead and delete that collection because this is going to upload a new collection there you can also for this chat you can also embed this publicly so if you come here and click on make chat publicly available you can actually copy this uh URL here go to Local Host paste whoops again these are good errors so the reason why it's giving me that error that uh uh code 404 is because we have to actually run this or make this active so if you click on active got it go back refresh this and there you go so now we can actually uh utilize this chat through the window here so same thing I can add my Bitcoin white paper here and I can say what is a block size what is a BTC block size I don't know if it makes sense but uh why not just to test it all right perfect there you go the block size of Bitcoin BTC toer to the maximum amount of data that can be contained within a single block in the blockchain okay perfect so as you can see everything got executed properly and you can actually check out the executions by clicking on all executions yeah I got to save this yep there you go and right here these are all the executions if I just go through this is the latest one if I click on view and you'll see this one got successful and the rest you know it shows you the errors and the one that's went through or not so this is a good way to uh see exactly what's going on behind the scene so you know the good thing is you can embed this chat if you have a business or something or if you have a website a personal brand you can actually add this to your website and uh basically have this chat widget where then people can interact with their own document that they can upload uh depending on how you know what your use cases all right well I hope you found this helpful again this is a very cool way to uh run everything locally through your machine um and use all the open source model because again all of this is free right because the quadon vector database that's free we're locally hosting NN on our machine that's free we're using all these local uh llama embeddings or we're using AMA to be able to interact with these all these local open- Source large language models that's also free so so it's very very powerful because it's combining all these tools together so use your imagination to build something different and see how it goes let me know in the comments below if you WR any kind of questions or issues thanks for watching and see you on the next one in this video I'm going to show you how to take a YouTube video any YouTube video and utilize n8n Community nodes to be able to take that YouTube video and convert it into transcripts where then we'll be able to utilize several different AI agents and AI nodes and converted and repurposed this video into a sales enablement tool a social media repurposing tool and also an AI agent that summarizes the content of that YouTube video I'm going to utilize open ai's devday video that they made an announcement of several products that they released as an example but you can use any kind of video when it comes to a competitor analysis to be able to create battle cards for your sales team so that way when they're talking to a prospect or a customer they'll have this really great battle card ready where then they'll be able to utilize this to do objection handling things like hey we saw the new model that you guys released for whatever product it is and it seems too complicated so you will have a proper answer based on the video that will be summarized using this AI tool and we can also take the same video transcript and repurpose it into social media for different platforms like LinkedIn Instagram Twitter Facebook and individually post them and on the third AI agent we'll be able to take the video transcript and summarize it and send it to a nice written email to our internal teams and also utilize our slack node to be able to send that summary into our proper teams and channel so this is going to be a very very useful tutorial because again you'll be able to utilize this workflow and convert it into several use cases if you're new to the channel my name is z my YouTube channel and my school Community AI Workshop is all about building incredible AI agents using no code tools like NN in my school Community you'll be able to get started from the introduction to nadn to all the way building incredible AI agents and also you will have all the NN templates for this particular workflow and all the previous and future workflows that I'll be building and the great thing about our community is that you will be connected to like-minded individuals who are here to learn and are serious about building AI agents and automations for businesses and personal blands I'll put the link in the description I'm looking forward to seeing you there all right let's get started all right so the first thing is is um YouTube transcript is not a note that is natively integrated with NN this is a community note and this is only available on if you self-hosting so let me show you for example if I have this is my Ned in Cloud account so if let me you size this a little bit so if I wanted to add let's just do a trigger here let's say I wanted to add YouTube right so if I search for YouTube here as you can see right here it just says YouTube and you can have all these operations that are available but there is no category here or there is no note that will give you a YouTube transcript just for copying pasting the URL of a YouTube video in order to do that you have to go and install this YouTube transcript node where you can just copy and paste where you can just paste a link uh YouTube video URL and this will be able to convert this into a full-on transcript in order to do that you will come here on next to your uh username and you'll click on these three dots and click on setting actually no I don't want to do that let me open another tab here so you will come here and click on these three dots again you have to be on a local host or you have to host this locally in order to have access to this otherwise this is not going to work uh you'll click on these three dots you'll click on settings and then on the bottom right here as you can see it says Community noes and again for comparing this to our uh if you're on the cloud account let me go ahead and take a look here if I click on this click on setting uh that's fine you will see right here that that um Community notes does not exist on a cloud account okay so just just so you're aware so you don't get confused but anyways so once you and a lot I know a lot of people are doing um hosting this NN locally so uh you should be able to have access to this but once you come over here you're going to click on community nodes I already have this YouTube transcript installed but if you want to install a new node a community node all you have to do is click on install and here will you will paste the npm package name how you're going to get this is you will click on this browse and this will take you to the npm package page where uh NN Community node package will already be prepopulated and this is where you need to search for whatever package you're looking for so for example on the bottom as you can see these are all the community packages that are available uh via this uh mpm package right uh but you want to make sure again that it includes this uh NN Community note package in advance cuz otherwise it's not going so for example let's say if I search for YouTube you can see this one this is just a YouTube transcript but this is not for nadn so you want to make sure you are actually uh getting the proper Community otherwise it's not going to work okay so as you can see right here this is the one that you want to grab right so if you click on this all right there you go so this is what it says andit and nodes YouTube transcript so all you have to do is click or uh copy this name or this package you're going to come back here you're going to paste this and you're going to say understand the risk because obviously um you are using a public Source because all of these nodes are made by Community you'll click on install and you will have this node installed now so next time when you come to your workflow so let's go ahead and so if I go head over here now if I click on ADD node and search for YouTube as you can see right here the YouTube transcript node is available for me and then next to it this little box it just says this Noe from our community it's part of the nen YouTube nodes YouTube transcript package okay so that's the difference again this is super useful because um you know there are certain notes that commity there's not a lot of notes there to be honest cuz I've looked through a bunch of it but uh there are some useful ones so if you're utilizing that for your purpose whatever it may be then go ahead and check that out but anyways so what you need to do here is all you have to do is add that YouTube transcript and again I have just added the trigger as a when clicking a test work FL dep depending on what your use case is you can actually add maybe some kind of a web hook here that actually monitors for example um a competitive business that you have their Channel or every time a new video gets posted on their Channel then you'll be able to utilize that and automate it right but then you can take that video convert it to YouTube transcript and then utilize your sales enablement which we'll walk through in a little bit to be able to convert that YouTube transcript into several other uh things that you can do with it right uh um but yeah so like I said you can come here and just add a web hook where then you'll be able to monitor a particular Channel or you can have an HTTP request tool where you can um have access to other different resources but anyways for our purposes again for this demo all I'm doing is literally going to YouTube and this is the open AI Dev day that Sam Sam Alman announced GPT 40 from outside documents or datab GPT turbo has yeah so this was3 let me pause this this was announced on December 2023 so this was again the announcement for GTP gp4 and the different tokens that they made available for public so what I did was I basically copied the URL here and as you can see C 6zk I want to make sure you know that that's the same URL here at the bottom right here it says 6zk right so that's the YouTube and when you uh click on test step what this does is this is going to take that and convert it into um a nice little summary here and if I go through the table view here you'll be able to see all of the transcript from that video you want to make sure if you want to return this as one text you want to toggle this to merge text because if you don't do this here's what's going to happen this will actually return all the timestamps too so if I click on this now you'll see Welcome to our first ever so all of these timestamps are kind of provided here in the duration for each one and as you can see in the bottom here there's like several Pages here so depending on what your use case is you'll be able to if you want to do this then go ahead so you can also add an aggregate not so for example yeah so all this data is coming in here with the timestamps um so you can take this aggre let's say you only want to grab from a particular timeline um then what you could do is put a set Noe and then use this aggregate node where then you'll be able to um grab all of that and convert it into a nice little data here using this node and again all you have to do is put the input field name and in this case it's going to be uh I think it was the text yep right here is the text and I'm converting it to um or I'm renaming the field to data and it's going to provide me all of that data without the timestamps or anything like that but anyways for our purposes um we don't need to do that so I'm going to get rid of this so now it's saying sending 70 items and if we go to our sales enablement here this you can see it says it's sending all of these different pages and I don't want that right for my use case um I want to be able to return this just as a merge text so I'm going to click on that test step and welcome to yep perfect so that's I I'm getting this as one merge text without the kind of the uh array of different timestamps with different uh text in there and as you can see it's here it's sending this one item to different nodes on the next step all right so that's how you basically uh take a YouTube video and convert it into transcript again you could for example let's say if there's a product demo right so let's say you have a product demo for a SAS company that's your competitor so you can take that product demo and utilize this tool so for example let's say this a SAS explainer video you can take this video and um add it to U this transcript where then you can do um other things with it but anyways for our purposes this Sam alon's announcement is pretty good okay so now this is where kind of the magic of this prompting comes in right so we have this big chunk of text or the transcript of the video that's here so what we need to do is convert this into battle cards for our sales theme for those of you who don't know what battle cards are it's basically a way uh to utilize a source a resource that you can extract and have a product feature highlights you can have object um objection handling um and then also suggested responses for uh those objects that might come from your customers and that's exactly what the prompt here does right so I added this sales uh open AI node where I choose my account and again you can watch my previous videos if you don't know how to connect your account the resource is going to be text because this is what we're using here uh the operation is going to be messaging a model right and then you're going to select the model in my case I selected gp4 mini if you have a lot of so if you're putting a large video or a video that's very long um so for example let's say if you have a seminar that you're trying to summ arize and turn it into something different you want to make sure you're choosing a good strong uh model so that way your open AI node will be able to provide whatever you need but anyways so for this particular um prompt what I said was uh from the text provided and the text in the bottom I'm defining as the text that we're getting from our YouTube transcript video extract key insights for sales enablement I need product feature highlights objection handling tips including common objections and suggested responses because we're telling it hey we want to be able to in advance figure out a way that our customers might object to certain things so provide those object handling tips and also provide the suggested responses which is going to be super super helpful especially if you've been any part of any kind of sales team you'll know that this is a very common practice uh and then also I said unique selling points so USPS are competitive Advantage because you want to be able to um provide the competitive advantage versus you and whoever your competition is and then key statistics or metrics that are mentioned in this particular video right and then I've said that please present the response in the following format so I'm providing it this format that I want this response to be in and in my case this is going to be these battle cards right the first one is going to be the product feature highlights I want two features the objectional handling tip um where you have a customer concern and then what the suggested response would be from your sales team right and then also unique selling points and in key metrics and I've said use Boldt headings for each section and bullet points for individual insights to ensure a clear structured format suitable for sales battle cards so I'm being very very clear and my prompt is very structured to make sure I'm getting the proper output and depending on what you use cases make sure you're adding the proper uh prompt here and for those of you who are part of my school Community you will have access to uh my GPT Uh custom GPT that you'll be able to utilize and grab these uh prompts um from there but anyways so here's the right side is what the result looks like so I have this prompt and at the bottom the text is exactly what we want here so let's go ahead and test this thing out so I'm going to click on test step and once we do that so this thing is going to run right here as you can see it say sales enablement and this is the output and as you can see right here exactly the way we wanted it right so we said product feature highlights let me expand this a little bit right there you go so um again obviously this was a announcement uh Dev day for GP GPT 4 uh so the first these are going to be the two feature highlights gp4 turbo supports up to 128,000 tokens of contacts allowing for more extensive Nuance interactions feature two is going to be the Json mode that they presented so that's great right and here's the object handling tips right objection how does gp4 turbo compare in terms of pricing so now as you can see right here it's making the job job of your sales team very very easy right so let's say you are a competitor of open AI in this case for example let's say Claud Claud has announced a new feature or they provide a new uh video that their product team has released their sales team could utilize this workflow or these AI agents to be able to compare their product with gp4 because in real life customers their Enterprise customers are going to ask them hey what makes your product better than GPT 4 for example right specifically when it comes to pricing because that's always a common ask so that's why you can see the objection here a customer might actually say this in real life hey how does your gp4 compare in terms of pricing with others so then the response or AI already provides the response it says gp4 turbo is significantly cheaper than gp4 H with cost Direction factor three times for prompt tokens and two times for completion tokens very precise very accurate based on the transcript that we're getting again if this this is is making the job of sales teams extremely easy before this you have to sit down go through the product release video or talk to your product team and figure out hey how do we present this to our sales team but this is taking care of all of that in automating the process right and it's also giving you unique selling points so it's Unique selling point one and two higher rate limits for established GPT for customer custom models program offers tailored model development blah blah blah key metrics gp4 turbo can handle up to 128,000 tokens um and that's actually accurate because as you can see that metric or that number is actually coming in from our context and if I look through in a little bit I should be able to find that there you go gp4 turbo supports up to 128,000 tokens of contact so you can see that is not making things up right and you can further uh establish or further refine the prompt to make sure that it's grabbing everything particularly from this and however format you want all right so now that we have all of this and we're outputting this as Json so that way if you want to for example say hey you know what for my object handling tis I want to grab this and add it to uh my Salesforce so whatever your Salesforce is um so if you want to be able to for example add that to an opportunity so the way to do that is you can just click whatever your CRM is right you can have Salesforce you can have HubSpot or whatever you're using so for Salesforce they have all these different great functionalities like uploading a document um um getting a contact creating a a a summary or getting a summary in this case we'll be able to add this to our opportunity right anyways but uh I don't want to make this video too long but you can utilize now this uh battle card and add it to different you know your CRM you could send an email to your particular sales team you can add it directly to slack as well so that way they're aware and they're ready uh with these great different um Tools in their hand now all right so that was kind of the first use case will be was for the sales enablement now you can also let's say this video about is about your own product release so let's say your product team releases this great video of how your product works you can take that transcript and instead of manually doing this what you could do is add a open AI note here and same thing you'll go back if you want to uh learn the step-by-step tutorial on how to add social media content uh to uh your platform you can watch my previous video where I walk through step by step on creating and attaching my link LinkedIn account and uh block post so you can do all of that so make sure you watch the previous video if you want to learn how to add your social media to this AI agent but anyways so as far as the prompt again the the magic here is the prompt so I'm going to expand this real quick just to show you what the prompt looks like so I said from the text provided and again the text is right here and I'm defining the text here create tailored social media post for LinkedIn Instagram Twitter and Facebook and I'm providing different contexts on for each platform what to do so for LinkedIn I'm seeing a professional post highlighting the key insights with a formal tone for Instagram a short engaging post with the call to action and relevant hashtags and once we click on test this step and again obviously make sure you're putting outputting this as Json so that way you you'll be able to grab the different posts and um connect it to uh the corresponding notes and as you can see right here it created a nice little post for LinkedIn Instagram Twitter and Facebook so now all you have to do is on the next node you can just attach this to your uh LinkedIn account X account um Facebook account and everything else so that's kind of like the second um AI node here that we added to be able to take this YouTube transcript and do something with it the third one let's say hey you know what all I need to do is I want to summarize a particular video let's say you have a very long video a podcast or whatever it may be right you don't want to go through the entire podcast but you just want a nice little summary so same thing you will have an AI agent here and you can add different you don't have to add uh GPT GPT open AI models here that's why I kind of put this AI agent here instead of just open AI model because uh you can have access to for example adding a grock chat model if you're using um an Tropics chat model you can add whatever you want but in any case so um for our for this particular one oh let me actually get out of this and add the open ai model4 go back all right so for this AI agent this is going to be conversational agent and the prompt I said defined below and if I expand this all I said is summarize the key points and insights from the json. text and all I'm doing is just grabbing this and bringing it over here I need a brief summary of the most important takeaways any significant topics for theme discussion not wordy code statistics blah blah blah right format that response and concise easy to Res format so now here's what you're getting a summary of let's say a very long video and you're sending to yourself a nice little email or you can put that in a slack Channel as well but let's go ahead and test this step and this should be able to provide this nice little summary for us so that way we can uh utilize this for other notes there you go so as you can see we have this nice little summary key takeaways um and then also it has uh you know kind of divided into different topics such as as the significant themes um and then also accessibility for AI development for non-coders noteworthy codes as you can right see right here you can see that it pulls codes it say you can now call many function that once and will do a better uh do better at following instructions and it also has recommendation and points and again this is all coming in based on our prop that we provided here all right well so hopefully that helped and again like I said you can add this to your email or a slack um or any addition nodes if you want so this is kind of a a good overview of what you can do with this uh Community node called YouTube transcript again you can completely automate this process where you can as I mentioned before you can have a web hook that will be attached to this where then you can uh be monitoring a competitor's Channel you can um add individual YouTube links to this uh where for example let's say if there's a webinar or a seminar that's very long you can utilize this this is a great tool to be able to summarize or turn that particular YouTube video into something much much more if you're part of the school Community uh you can basically just go over here I'm going to provide this in the template sections all you have to do is click on import from file and you'll be able to import this into your own workflow where then you'll be able to add additional loads or uh check out for yourself how to um customize this tool or customize this workflow for your own purposes all right well hopefully you found this helpful please make sure you subscribe and like the video I have some great great tutorials that are upcoming and also a few great announcement that I'm about to make so make sure you are following that and looking up for that thanks for watching I'll see you on the next one [Music]