// transcript — 1385 segments
0:00 What is n8n?
0:01 all right today we've got a very exciting one this is the nadn master
0:06 class where ideally I'm taking you from a beginner in nadn all the way to an AI
0:10 agent Builder by the end of this or even just someone who wants to implement AI
0:14 automations into their daily life or into their work so I was about to say
0:18 grab a pen and a piece of paper but more realistically since you're here grab
0:22 some sort of AI notetaker and let's dive into this one this is a master class so
0:25 we're going to start at the bottom start with the basics and we'll continuously
0:28 work our way up but just want to start off here with what is any
0:31 so at this point I'm sure you guys have been hearing the term low code no code
0:37 tools and nadn is a low code no code automation tool so that just basically
0:41 means that nadn allows users to automate processes build workflows with minimal
0:46 coding knowledge and the key idea behind this is that low code means it's very
0:50 easy to develop things with a very userfriendly interface where people can
0:54 just go in there and drag and drop different components different nodes is
0:58 what they're called in nadn to create these flows without having to come in
1:02 here and type a bunch of JavaScript or python this is so significant because
1:07 it's going to allow anyone to be able to get an in and get up and running with
1:11 building automations even if you don't have you know a background in computer
1:15 science or programming the barrier entry to this is so low it's very very
1:18 accessible for anyone to get in here and start playing around with stuff but even
1:22 though it's very simple it also retains a lot of flexibility for more advanced
1:26 users who do have coding background and they're able to come in here and take
1:29 some of the basic principles and also come come on top of that with you know
1:33 custom code or different type of logic and Integrations and it's a very very
1:38 powerful tool you can build tools directly in NAD as you see here and
1:42 that's a little bit different from other things like make or zappier because you
1:45 can build let's say an agent that's able to call four or five tools and these
1:50 tools you built within NN itself which is just super super cool stuff what
1:54 about the importance of automating workf flows so we've got five points here I'll
1:58 touch on real quick increasing efficiency and productivity automation
2:02 is going to eliminate repetitive tasks it's going to reduce human error and
2:05 it's going to allow you and your team to focus on higher value work it's also
2:10 going to save time and money of course automating workflows is going to reduce
2:13 operational risk free up Time by completing tasks faster than manual
2:18 scalability and adaptability you can scale a lot more effortlessly you can
2:23 focus on your growth as a business and these Solutions these automation
2:26 Solutions can be customized or adjusted to meet your changing needs you've also
2:30 got improved data handling automation is going to integrate data from various
2:33 sources it's going to provide real-time insights for better decision making and
2:37 then the last benefit I wanted to hit on here was enhanced customer experience
2:40 you're going to be able to respond faster to your clients or automatically
2:44 to your clients personalize interactions through automated workflows and all of
2:47 this is just going to lead to better customer satisfaction and Customer
2:50 Why Should You Learn n8n?
2:51 Loyalty moving on here we've got why should you learn nadn so when I was
2:55 building the slide I had so many thoughts and I tried to put them all
2:59 under three main bullets and so this first first one here is nadn empowers
3:04 non-developers with Automation and I know we've touched on this a little bit
3:07 with the whole low code no code stuff but it's just so powerful that anyone
3:12 can pretty much come into NN and start building things in 15 20 minutes that's
3:16 actually going to automate real work that they would do on a daily basis so
3:19 even if you're not a programmer you can come in here create workflows it's going
3:23 to save you time make your life easier for example you could very easily get up
3:26 a workflow that is going to automatically move data from one app to
3:31 another like ually copying contacts from one spreadsheet to another without
3:35 having to do it every time it's like having a digital assistant that can
3:38 handle these repetitive tasks for you and you don't really need the technical
3:42 skills to set it up so super cool stuff the second one we've got access to over
3:45 300 built-in Integrations which is insane andn comes with a ton of
3:49 Integrations ton of connections to popular tools that you probably use
3:54 every day like Gmail um Google Sheets slack Twitter we got Microsoft stuff too
3:58 if you want to connect to teams or Outlook it's super super cool what you
4:02 can do these Integrations let you connect quickly to these tools and you
4:07 can connect tools to other tools without needing to like code in between that for
4:11 example you could set up a workflow where every time you receive an email
4:14 it's going to automatically add that information to some sort of spreadsheet
4:17 and then it's going to send you a notification on slack or teams and all
4:21 of that will take place without you needing to be in there and doing it
4:25 manually then this last one you can connect to almost any tool so kind of
4:28 similar to the second point but if there's something that you want want to
4:31 connect to that there's not a built-in integration to you can still pretty much
4:34 connect to it whether that's through an API or a web hook um these ones are a
4:39 little more technical but for the most part um you know a quick YouTube video
4:43 or using chat gbt even you'll be able to get them up and running and connect to
4:46 almost anything you want a little bit of custom code and um really when you
4:50 realize you can connect to almost anything then you have almost endless
4:53 Part 1: Getting Started
4:54 possibilities of what you want to automate all right we're going to be
4:58 moving into part one of this master class here which is just very simple
5:01 getting started with NN we're going to talk about how you set it up the
5:04 different ways you can set it up and then we'll just get into the interface
5:07 and start actually learning what it looks like and what everything does the
5:09 Self-Hosted vs Cloud
5:10 first thing I think that we should talk about when it comes to setting up your
5:14 NN is if you want to set it up self-hosted or if you want to Cloud host
5:18 and I'm going to run through a few features of each of these two different
5:21 options and then we'll talk about which one you should choose so first with
5:24 self-hosted some of the things that it's going to offer you are control and
5:27 flexibility you're going to have full control over your environment you can
5:31 customize your server integrate with any internal system you have the ability to
5:36 adjust your configurations as needed we've got data ownership so all the data
5:39 and workflows are going to stay on your private server so this is ideal if you
5:44 need to comply with privacy regulations or you want to keep sensitive data
5:49 in-house cost self-hosting can be more cost effective in the long run it
5:52 depends on the server and maintenance costs but there's no ongoing
5:56 subscription fee to naden like if you were to do Cloud hosted but with the
6:01 cost as aspect you may need to account for infrastructure with like database
6:05 management or server hosting and you also may need to have some sort of team
6:09 that will help you maintain it but who knows fourth with self-hosting is
6:13 installation and maintenance you are going to be responsible for setting up
6:17 and managing and updating your instance this also includes backups and scaling
6:21 so this is going to require more technical knowledge then finally we've
6:25 got customization so you can modify the source code you can add custom features
6:29 that might not be available in the cloud environment so this is cool if you want
6:32 complete freedom to modify the system as you want and now moving on to the cloud
6:36 environment here are some features of cloud it's going to be easier to use
6:40 because it's managed by nadn itself so there's no need to worry about setup
6:44 updates scaling maintenance stuff like that so good for beginners you've also
6:49 got availability and reliability so the NN cloud is hosted on a scalable and
6:53 reliable infrastructure it's going to be maintained by Ann's team so they're
6:57 always going to keep stuff up to date with the latest features and Bug fixes
7:00 the security is a little different it's going to be managed security so SSL
7:05 certificates or you know secure API handling and that's going to be done by
7:09 the N team and then also this is going to be more suitable for users who don't
7:13 want to handle server security now when it comes to cost of nadn it's really not
7:17 that bad either way the cloud version comes with a subscription model that's
7:20 going to be based on usage tiers how many products you want how many seats
7:24 you want on your you know an inn environment and so you'll be basically
7:28 paying based on that so in the long run it could be more expensive if you have a
7:31 ton of users and a ton of projects going on but if that's the case then hopefully
7:35 you're either saving a ton of money or you're making a ton of money so balance
7:39 is out then finally we have data handling different than self-hosted data
7:42 is going to be stored and processed in the cloud so like I said if you're a
7:45 business dealing with highly sensitive data this may be a limitation due to the
7:50 server dependencies okay so at this point you may already have an idea of
7:52 which one you're going to choose but if you don't real quick you should go with
7:56 self-hosted if you need full control over your data and your infrastructure
8:00 if you want to integrate any in deeply with other on premise systems and if
8:04 you're technically comfortable handling server maintenance and management or you
8:08 have a dedicated team that will do that for you and then you're going to want to
8:11 go with Cloud if you prefer Simplicity and you don't want to handle
8:14 infrastructure or server maintenance you want a quick setup and reliable hosting
8:18 it's going to be managed by the NN team and you're okay with paying for a
8:21 subscription for a managed service and you don't mind being handled by a third
8:25 Workflows, Nodes, Executions
8:26 party provider okay so before we actually hop into NN and we look around
8:31 at the interface probably important to understand the difference between
8:34 workflows nodes and executions so I'm going to break this down as simple as I
8:38 can pretend you're in a restaurant we've got workflows which are going to be the
8:41 recipes nodes are going to be the ingredients the steps within each recipe
8:45 and then executions are going to be every time someone sits down and orders
8:51 that specific recipe or workflow so the workflow think of it as like a set of
8:53 instructions that you're going to be giving to nadn in order to automate a
8:58 task so for this example we'll say that the workflow is a a chocolate cake then
9:03 we'll move down to nodes nodes are like the building blocks of the workflow each
9:07 node is going to represent a single step a single action within a workflow so one
9:11 node might send an email one might update a spreadsheet one might pull data
9:15 and then you can kind of Link those together in order to make the chocolate
9:21 cake so you know eggs flour baking soda we're going to put those together then
9:25 we have the execution which is simply just running your workflow in nadn this
9:29 can happen by different triggers whether you want to do that manually or whether
9:32 you want the automation to take place every time you update a row in a
9:36 spreadsheet but in the example like I said just picture someone coming to the
9:40 restaurant and ordering a piece of chocolate cake and then you kind of
9:43 start that process of making the cake and delivering the cake all right now
9:45 n8n Interface
9:46 that we've covered the three main building blocks that go into pretty much
9:50 every automation let's actually get into nadn look around a little bit at the
9:53 user interface see what I'm talking about when I say drag and drop we'll
9:57 talk about accessing Community Resources Community templates stuff like that and
10:02 it'll really start to make more sense all right so we're in nadn as you can
10:06 see as what we're looking at right now is we're just on my homepage so it's
10:08 going to show me a ton of the different workflows that I've been working on um
10:12 we've got our projects right here so I only have the one right now it's called
10:15 Nate testing so in here it's pretty much just everything I have but if you had a
10:19 specific project for a specific client or a specific project for an actual
10:23 specific project at work you could add them here so you can keep everything
10:26 organized honestly my stuff is not too organized but here's what it looks like
10:30 we've got stuff on the Le hand side we can see we have an admin panel we have
10:35 templates we have variables we can see executions of each workflow we've got
10:38 some help and then you have your profile down here as long as well as you know
10:42 I'm Cloud hosted so I can see that there's some updates here with some bug
10:45 fixes that I'll I'm going to be able to just go in and install real quick let's
10:50 just add a new workflow right here and see what the interface sort of looks
10:53 like so this is the canvas that I was talking about where I said it was a very
10:57 userfriendly drag and drop interface the first thing you're going to see is that
11:01 you have and add First Step button so we'll get into different types of nodes
11:05 after this and we'll talk about triggers and all that but first step is always
11:08 going to be a trigger so you'll click on that and it will list up you know some
11:12 triggers trigger manually just means that you'll be hitting test workflow
11:15 button down here in order to run the workflow execute the workflow every
11:19 single time you can schedule it you can do um on chat message you can call it by
11:24 another workflow so that's where all the stuff is super powerful we'll just add a
11:28 manual one so you guys can see what it looks like this is where you hit test
11:31 workflow in order to run it and you know obviously nothing's coming through but
11:35 it didn't fail so that's good then from here you would want to add different
11:38 nodes to connect to so you could do that from either clicking on this plus button
11:42 where it says click to add node or drag to connect or up in the top right you
11:46 can click up here and it will pull up this panel for you to search through
11:49 nodes you know by category or you can just search for them if you want um
11:52 another cool thing with the triggers is there's not just those triggers there's
11:56 different triggers for each app so let's say that you wanted to run a workflow
11:58 every time you got an email you can click on on Gmail down at the bottom
12:01 you'd see different triggers and this one says on message received so this
12:06 would execute the workflow every time you get an email and you can tell a
12:09 trigger if it has this little lightning bolt so that's a trigger node but
12:13 anyways let's just say that we wanted to put some fake data in here so I would
12:17 just come in here and I could either type for the the node that I want or I
12:20 know I'm looking for an edit Fields node so I can come to data transformation and
12:25 I would see edit Fields right here this is where I could configure stuff so let
12:28 me just quickly pretend um we're going to make make a field called name and
12:32 we'll just put in my name and what's really cool about NN is that you can
12:36 test each step individually as you're going through and automating something
12:39 so rather than having to run the whole workflow you could just test step right
12:42 here we'll see that what's coming out of this node is Nate um in the field called
12:48 name so we have that information running through but it's nice to know because
12:51 you'll always see on the left of this configuration panel you'll see data
12:54 that's coming in and then you'll see data that's coming out so it makes it
12:57 really easy to troubleshoot and test each step individually which is really
12:59 cool but you have to make sure that your your um nodes are connected because let's say
13:05 you know I didn't drag this one right here and connect it to the edit Fields
13:09 if I was to run this nothing would come through the edit Fields there's no output as you can see
13:14 it says wire me up this node can only receive input data if you connect it to
13:18 another node and yeah so that's how that's going to work I say this is
13:23 probably all we'll do for now in here we'll get into some Community templates
13:26 and just show you how that all works but as far as just basic setting up a
13:30 workflow and seeing what um the interface looks like how easy it is to
13:34 just drag and drop stuff that's what we've got so back in the homepage we've
13:37 got workflows you all can also look at your credentials so this is just
13:39 different things that you've connected to like I said there's so many
13:43 Integrations so it can easily access my Google Drive my telegram my Google
13:47 Sheets all that kind of stuff so that's where you can sort of see and manage
13:50 your credentials and then down here the only thing I'll touch on real quick will
13:53 be the templates you can click into templates and it will pull up nad's
13:56 website where there's sort of like this community where people can upload cool
13:59 things they're building or you can search for specific use cases
14:04 specific um you know tools that you want to use so it's a really great place to
14:08 get in here and learn but as you can see we have you know learn by doing so you
14:11 can download these templates which is really cool sometimes it's you know it's
14:15 nice to watch a tutorial on YouTube but being able to really learn you have to
14:18 just get in there and you have to let things fail in order to figure out why
14:22 they're failing so right here we have you know AI agent chat we can download
14:26 from NN we can click here we can look at it um and we can see what's going on we
14:30 could click this button here to download it and um start playing around with it
14:35 in our own nadn we have this one where you can click in here and a lot of times
14:38 people will annotate like what's going on so you can see how to set it up you
14:42 can see which you know what's taking place in each scenario so that's super
14:45 super useful and then I'll just show you real quick let say you wanted to use
14:49 this one we could just import the environment and as that loads up it's
14:56 pretty much just going to put it right into my workspace so I've got this
15:00 information here I can now test this data I can look at what's going through
15:03 each step we can see right here we've got um you know this information's
15:07 coming through and then it comes out as you know flour eggs milk which is
15:10 interesting because I just did a you know a little example about cake so um
15:14 seems like it's meant to be but either way you can start to see actual data
15:17 moving through which is how you're really going to be able to wrap your
15:20 head around what's going on another great thing about nnn is there's so much
15:24 documentation it's super easy to get help so if you come down here you can
15:27 see help we've got a lot of stuff here they even have a course that you can go
15:31 through through but documentation if you click on here you can see pretty much
15:34 anything you need to find like there there's quick starts there is um
15:39 Concepts about flow logic Concepts about data so like I said super easy to learn
15:43 about all this kind of stuff you can look at you know what each node is doing
15:46 specifically so let's say you were confused about the loop node you could
15:51 come in here read about looping you could see you know how the
15:55 node works you could maybe see some examples of how people are using it and
15:58 yeah like at the bottom it's probably going to throw you in some you know
16:02 templates of actual workflows with loops but super easy to get help Within naden
16:05 Part 2: Core Concepts
16:07 part two of the master class we're going to be talking about some Core Concepts
16:10 so we just saw what the interface looked like we saw a few nodes but now we
16:13 actually need to dive into different types of nodes and what they do and then
16:16 we're going to end this section of the master class with an actual example
16:21 where we'll get into nadn I'll do a live build of a really quick Automation and
16:24 then we'll talk about the different type of nodes and how data is moving through
16:28 Types of Nodes
16:28 so it should be pretty cool to see so before we in nadn and we build out our
16:32 first automation we really need to understand these sort of four main types
16:37 of nodes so we've got Trigger action data transformation and logic so let's
16:42 just break these down real quick starting off here with trigger nodes
16:45 because a trigger node is pretty much going to be what starts every workflow
16:48 we just saw these in nadn they were the ones with the little lightning bolt next
16:53 to them anyways different types of trigger nodes we can look at something
16:56 like a web hook trigger um an email trigger like I showed you anything
16:59 that's going to start the the workflow whether that's going to be manual or on
17:04 a chat or on an event or I have called by another workflow bolded here because
17:09 it's sort of the power of NN you can build a workflow that will be called by
17:13 another workflow and then you can build an agent that can call that workflow as
17:17 well as maybe this agent can call like 10 other workflows so super powerful
17:22 stuff here next we've got action nodes these are the actual doers they're going
17:25 to perform a very specific task within your workflow so it's like an assembly
17:30 line this guy is going to to um you know put the present in the Box this guy's
17:33 going to wrap the present this guy's going to put the bow on the present all
17:36 that sort of stuff but they can do different things like you know send
17:40 email create a record make an API request they can get a text message they
17:44 can set your calendar um almost anything that you could do on your computer on
17:48 your phone manually you could have some sort of action node to do this thing
17:53 third we have data transformation nodes these are going to help you change or
17:56 process your data in some way so that it flows through the whole process and you
17:59 get the end result as you want want it so these type of nodes can do things
18:03 like set that can add Fields change values within Fields it can do some sort
18:07 of processing your data you've got something like an aggregate where you
18:10 can combine a ton of data into a single output or something like a merge where
18:14 you can combine data from two different sources and put them into one the last
18:18 type I'm going to touch on real quick are logic nodes these are sort of the
18:22 decision makers they're going to help n and figure out what path to take how to
18:26 handle a different situation so we've got something like an if node it's going
18:30 to check if a specific condition is true or false is you know this value higher
18:33 than 10 it's going to go this way otherwise it's going to go this way
18:37 we've got a switch node which is going to allow you to put multiple conditions
18:40 in there and it's going to be checked and direct the workflow to a specific
18:45 action based on that conditional check and then something like a weit node
18:48 which is going to pause the workflow let's say you wanted to pause the
18:52 workflow until you come back and respond like yes that's good to go then it will
18:55 continue to move on through the rest of the process or you could have it like
18:59 wait for 20 seconds um what whatever you want it to do all right now it's time to
19:00 Building Example Workflow
19:02 finally hop back into NAD in hopefully these slides weren't too boring but
19:05 we're going to be building an example workflow here it's going to be really
19:08 simple it's just going to automatically process customer orders and then it's
19:12 going to summarize it and send us a report automatically every time we get a
19:15 new order so super cool stuff let's hop into how we're going to build this thing
19:19 all right we are in a Google sheet this is going to be the customer order data
19:22 that we'll be using for this example so I had chat gbt make up some data for us
19:26 we've got stuff like order ID customer name product quantity price order date
19:32 and the status of that order so every time a new row is put into this Google
19:35 sheet it's going to run through nadn automatically it's going to get
19:38 summarized by some sort of large language model like chat gbt or Claude
19:43 and then that summarization is going to be emailed off back to us or back to our
19:48 team automatically so this will be a nice simple example but it's going to
19:52 feature different types of nodes and we'll be able to see the data move
19:55 through real time so it'll give us a really good base we are now in n8n this
19:59 is the canvas we'll be working on and this is the workflow that we'll be
20:03 building here um NN masterclass customer orders so we know the first step that we
20:07 always need to do is add some sort of trigger we'll click in here and we can
20:11 see different triggers like manual um on app event called by another workflow we
20:15 talked about this but in this case we want to make this one automatic so we're
20:18 going to be doing a Google Sheets trigger Google Sheets has three triggers
20:24 it's got on row added on row updated or on row added or updated so we'll do this
20:28 one because that way if you have to go in there and change some sort of
20:31 information about an order like let's say one goes from you know the status is
20:36 pending to shipped or something we'll also get an email about that so we have
20:41 to set up the Google Sheets account um this is where you're going to have to
20:43 set up a credential and I'll walk you guys through how to do this so you're
20:47 going to click create new credential and you'll see this screen pop up where we
20:50 need to grab a client ID and a client secret um this looks a little confusing
20:53 and I was definitely confused when I first saw the screen so what we need to
20:58 do is right here um I talked about how nadn has is really good at having
21:01 documentation that explains stuff so we'll click on open docs right here we
21:05 will see that the prerequisite we need is a Google Cloud account so we'll go in
21:09 here and make a Google Cloud account um and then we can see that it's going to
21:12 walk you through step by step so if my explanation isn't good enough you can
21:16 come in here and grab the docs but hopefully I'll show you real quick how
21:19 to do this so we'll come into Google Cloud um this is what it's going to look
21:22 like you'll have to sign in make an account then you want to go to your
21:27 console once you're in your console you'll see the screen you might not know what to look at but
21:31 all we want to do is we're going to create a project so mine right here is
21:34 just called my first project make sure you're in your project and then you want
21:38 to come in this left hand side to apis and services we're going to click on
21:42 enabled apis and services and at this point you just need to search for a
21:47 Google Sheets so we're going to type in Google um okay we need to do sheets be
21:51 more specific so Google Sheets we can see Google Sheets API we'll click in
21:55 here and then all you need to do is just enable this API so we've got ours
21:59 enabled already um there will be a button right here it's just as simple as that so get that
22:03 enabled and then you're going to come in here go back to your apis and services
22:08 and then we want to go to credentials once we're in credentials um
22:12 this is where you can set up your client IDs to get an ID and a secret so I'll
22:16 just walk you guys through how we're going to do this one you're going to
22:19 click create credentials up here you'll go to ooth client ID once that loads up you want to choose
22:24 the application type this is going to be a web app you can name it whatever you
22:28 want we'll call this one demo for for the sake of this video and then all you
22:33 need to do here is add a redirect URI so this is where you see in nadn you've got
22:39 this UD redirect URL um we're just going to click here to copy go back into
22:43 Google cloud and we're going to add this right in here just just paste it in and
22:48 then you'll hit create you'll get the screen pop up with um your client ID and
22:52 your client secret so it's as simple as copying the ID pasting that into the ID
22:58 field in NN going back to Cloud grabbing your secret and pasting it into the
23:03 secret then you want to sign in with Google so this screen's going to pop up
23:06 it's just going to be a simple prompt to sign in with Google like you would
23:10 normally have um so I'll drag this in right here and now it says that Google
23:13 hasn't verified this app so this is where you need to set up your ooth
23:18 consent screen um so back in here you've got your ID and your secret now you need
23:21 to go back in your credentials right here ooth consent screen all you need to
23:25 do here is either make sure that your app is published so um you need to make
23:29 make sure the app is published so that it has you know access to actually go
23:33 through and grab information out of your Google Sheets your drive your email
23:36 whatever it is or you can add yourself as a test user so I've got my emails
23:40 down here as test users this also will allow these emails to sign in and go
23:45 through but if you're getting blocked for some reason it's probably because
23:48 you didn't set this up right so just make sure it's published or that you're
23:51 in there as a test user so back into nadn um we've got this signin field we'll hit continue just
23:59 make sure you give this email access to everything give NAD access and then
24:02 you'll hit continue and then pretty much you'll be good to go you'll see we got
24:05 this account created right here it's green we're good so we will come out and
24:10 now we're connected so now that we're connected we can configure the rest of this node it's
24:16 going to be running every minute and that's when it's going to be checking
24:21 for if a row was added or updated now we can select the document that we want so
24:24 it's really nice you can choose from a list you can enter the URL or the ID of
24:29 your document but list is so much easier it's just going to access your Google
24:33 Drive and see what sheets you've got so we're going to do customer orders um
24:37 there's only one sheet in this document so we'll grab that sheet and it's going
24:42 to trigger on row added or updated so if we can fetch a test event here we'll see
24:46 some of our sample data coming through so as you can see we've got um five
24:50 items we've got the columns up here and then we have all of these orders that we
24:53 just had right here in Google Sheets so we've got John Jane Mike Emily Robert
24:58 Brown and in here you can see we've got John Jane Mike Emily and Robert Brown so
25:02 this node's working we've got our information coming through into NN now
25:06 we want to add an open AI node so we'll just click on this plus right here or
25:09 click on the plus up in this top right corner and you can search for a new node
25:13 we're going to grab open AI you could use a different large language model if
25:15 you wanted to but I'm going to be using open AI you can see we've got 15
25:20 different actions within this node what we want to do here is message a model
25:22 basically just means that we're going to be talking to chat GPT just call this no
25:29 summarize and now we need to hook up this node with our credentials so at
25:32 this point if you don't have an open AI account you need to do so and then once
25:36 you do that you can come in here click create new credential this time all we
25:41 need is a single API key so once you have your open AI account you'll come
25:44 into it on left hand side you'll see all the stuff but we just want to go to API
25:48 Keys up in the top right you can click create new key give it a name and then
25:53 it will give you a value to copy so pretty simple same thing you just want
25:57 to come in here and copy that information in or sorry past that
26:00 information in hit save and it will go green once you're all good um so that is
26:05 all you got to do but pretty much every time that you need to configure a node
26:08 you're going to have to grab some sort of key so just keep that in mind so as
26:13 you can see the resource is text the operation is messaging a model and now
26:16 we need to choose what model we want to message so I'm going to come in here and
26:22 grab GPT 40 right there and now we need to configure the rest of this node so
26:26 this is the message that we're sending to GPT 40 you have a couple options here
26:32 you can have it be a user message an assistant message or system message you
26:35 can see the differen is right here usually when you're going to be
26:37 prompting the node how to act we're going to choose system so in here I'm
26:42 going to type a quick prompt and I'll be right back to explain it all right here
26:46 is the system prompt that I came up with just typed this out really quick so I
26:50 said you are in charge of client orders your job is to take incoming information
26:53 regarding new orders and give a nice summary that will be emailed to the team
26:56 the email should be signed off from customer success team and then we want
27:00 to give it the information from the previous Google Sheets trigger that's
27:04 coming in here on the left we need to actually give it the information to
27:07 summarize so it's going to be getting order ID customer name product quantity
27:11 price order date and status and so all we need to do is come in here and drag
27:15 and drop each of the fields into the prompt and it will be a
27:20 variable so it will change for each one so I'll just show you guys order ID we
27:24 drag this in and I don't know why it does that um we want to make sure that
27:32 right here with order ID so first of all first thing to note this is a green
27:36 variable with the two curly brackets around it that just means that it's a
27:40 JavaScript variable so this doesn't involve any coding it's as simple as
27:43 dragging and dropping but this just means that it's going to change based on
27:47 whatever value is in this field so as you can see in the result tab right here
27:52 we've got the the json. order ID is coming through as 101 because that's the
27:56 first order and you can see similar things when we drag in customer name
28:00 we'll get in the the results we got John Doe um we'll drag in everything else and
28:04 then I'll show you guys so we're just going to drag in product quantity price
28:10 order date and Status so that's assigned wherever it needs to be and then as you
28:12 can see in the result we've got here's the information on client orders we've
28:17 got the correct order ID name price quantity all this kind of stuff we have
28:20 the actual information coming through as you can see and then the last thing that
28:23 we wanted to say was please output the following parameters So based on this
28:27 information that it's getting right here that it's going to sum summarize it's
28:31 going to Output an email subject for us and an email body for us so we can go
28:36 ahead here and hit test step and I'll show you one thing about how we want to
28:40 Output this content as Json so I didn't check this yet and so that means that
28:44 this is going to execute and it's going to all come out in one sort of like
28:50 large string so as you can see we've got um for the first order email subject new
28:55 order confirmation order ID 101 here actually let me make this a little
28:58 bigger so it says hello team we have a new order that has been successfully
29:01 processed and shipped below are the details so it's going to summarize out
29:04 for us and then it signs off thank you for your attention best regards customer
29:08 success team but this is coming through as one big chunk of text called content
29:12 so what we want to do is output the content as Json we'll test the step
29:16 again and now it's going to come through as two separate Fields one will be the
29:20 email subject and then one will be the email body and this is just important so
29:24 that we can drag and drop the next Fields later when we want to configure
29:27 the actual Gmail node so as you can see right here we've got the subject and
29:30 then we've got the body and we've got the subject and the body we'll read one
29:35 more real quick so order 103 we've got the subject and then the body says we
29:39 have a new order summary order ID 103 Mike Johnson you got headphones at $200
29:44 just one pair please let us know if you need further details so as you can see
29:47 these are all coming through as an email subject and an email body and this will
29:51 be important when we set up this next node here which is going to be a Gmail
29:56 node this time we're going to add the node by clicking the plus up here it's
29:59 the same thing as this plus but just wanted to show you guys different ways
30:02 we're going to grab a Gmail node and there's 25 actions within Gmail as you
30:05 can see there's a lot of stuff you can do which is just awesome but here we're
30:08 going to be sending a message so we'll click on send a message um real quick let's just make
30:13 sure we wire this one up otherwise it's not going to work and then we'll come
30:16 back into the node and we can configure it so first thing you got to do is
30:20 obviously set up your new credential you'll come in here just got to grab
30:23 that same client ID and secret from the previous one so we'll come back into um
30:28 our enabled apis and services you want to go to credentials and then you can click into
30:35 that um client ID that we just made and then all you got to do once again is
30:39 copy and paste that information in so let me just do this real quick we'll
30:41 grab the secret paste that in there and then once Gmail it's again going to make you
30:51 verify the app we'll go through give access to everything and then we go
30:55 green because we're good to go so we've got that set up now all we need to do is
30:59 configure the rest of this node so as you can see the resource is a message
31:02 the operation is that we're sending a message now you can see why it's so
31:06 important that we set up the email subject and the email body as two
31:10 separate Fields because we output it as Json so all we got to do is drag in this
31:15 subject right here where it says subject so the subject of this Gmail being sent
31:19 off will be order confirmation 101 for John Doe and then same thing with body
31:22 you're going to grab that and put that in the message field where this is the
31:26 actual message that's going to be sent in the email we we want to make the
31:29 email type is text that's just how I usually like to do it and then for the
31:34 sake of this example we will just put in my email so we can see this email coming
31:38 through and you could make this variable you could make this change based on the
31:40 order if you wanted to but right now let's keep it simple we're just going to
31:45 send it to nerk 88@gmail.com every time and finally you've got some options here
31:50 you could attach things you could CC people you could change the sender name
31:54 variably whatever you want to do here I usually just will come in here and click
31:57 append and add an attribution and make sure I turn that off otherwise at the
32:01 bottom of the email it'll just say this email was generated by nadn or sent by
32:06 nadn so this looks good to go we can test this step and it will it should be
32:11 firing off five emails because we have five emails um in the sample data so you
32:16 can see these came through it's just giving us a message ID and a thread ID
32:20 which right now we don't need but you can see that all of these got sent so
32:24 let's hop over to the email I will refresh and we should see five new
32:28 emails in my inbox so yeah we've got order um 101 102 103 104 and 105 so this
32:35 is information from all the orders as you can see this one says new order from
32:39 Robert Brown he got a tablet three of them actually 600 per unit so the total
32:45 price was 1,800 it was on August 28th and the status is still pending so thank
32:49 you best regards customer success team so all that came through exactly how we
32:52 wanted it so that's good to see now we're back in n8n and we're
32:58 pretty much done with this workflow we've got three nodes in here and we can
33:04 save it and now what we want to do is check this box to inactive or sorry to
33:09 active so all this means is that now that the workflow is activated it will
33:14 regularly check Google Sheets for events and then it will trigger executions each
33:18 time that um a row is added or updated and they won't show immediately
33:24 in the editor so that means like we won't be seeing like these turn green
33:27 every time it actually is going through but they will'll be going through so
33:30 let's hop into the Google Sheets real quick add a new row and then let's let's
33:34 wait for the email okay so I've got this information I'm about to paste into here
33:40 we've got order 106 for Phil dumpy he ordered 500 crayons $5 for each one
33:45 we've got the date and we got the status so now we're just going to hop into our
33:49 email and I'll just refresh and we through okay so I just refreshed and we
33:57 can see this new New Order we've received the New Order from Phil dumpy
34:01 here are the details 106 Phil dumpy 500 crayons $5 per unit we've got the date
34:07 and then we have the status so um as you can see the date is actually coming
34:10 through is January 20 2025 um and we did not put January 2025
34:14 so what you can do here is because there's you know a discrepancy we will
34:19 go back and N ITN we will go to our executions over here or right here so
34:23 executions we can see this is the most recent execution we'll click into here
34:27 and we can see what's actually taking place so as you can see the trigger went off
34:32 it grabbed one new item we'll open up this message and model node so we can
34:35 see the information coming through and you can see the date come through here
34:37 as 45585 so that's not what we want um that's why it's coming through as um
34:46 January 20 2025 so what we need to do is come in here and fix this specific node
34:49 because we see exactly where the issue is happening I think the issue here was
34:53 just weird formatting with numbers coming through as far as dates so let's
34:57 just try this one again I just out of this row so it should be working right
35:01 now to fire off this email to us but we kept this one as just plain text so
35:04 hopefully it reads through an n and end as plain text but let's take a look at
35:07 the email and then we'll take a look at the actual execution okay just refreshed
35:11 got this new order it's coming through order 106 and we got the date correctly
35:16 as October 20th 2024 which is what we put right here so let's go back into Ed
35:21 and let's refresh this page so we can get the most recent execution and making
35:24 sure all the data is coming through exactly how we want it and it's a great
35:27 thing to keep in mind that you're able to go into the executions you can see
35:31 exactly how stuff's coming through so from the Google Sheets trigger we're
35:35 getting this information and the date's now coming through correctly how we want
35:38 it previously it was coming through as just like 4554 whatever sometimes in
35:42 sheets it can be weird with date formatting and then it's being able to
35:46 come through correctly order date and it's giving us a nice summarization
35:49 right here we've received New Order with the following details order ID 106 for
35:55 Phil dumpy crayons 500 all this kind of stuff and then it's just going to take
35:59 that subject and and um body and put it into a Gmail node which is being sent
36:04 over to Nate herk 88@gmail.com which is what we see right here so that
36:10 was it for this first example I know it was very simple we just utilized three
36:13 nodes to build this workflow that automatically takes data every time a
36:18 row is added in your Google Sheets it's going to summarize it with a large
36:22 language model of chat gbt 40 and then it's going to move into the Gmail node
36:25 which actually sends it off and this was one execution of this work worklow okay
36:28 Part 3: RAG and Vector Databases
36:30 now we're moving into part three of this master class which is going to be
36:34 talking about Rag and Vector databases I'm sure you've heard these terms but
36:36 maybe you don't completely understand them so I'm here to break it down for
36:39 you and then we're going to end this part with going back into nadn building
36:45 out a simple rag AI agent and this will include you know actually uploading
36:49 information into a vector database and then being able to use an agent and rag
36:55 What is RAG?
36:55 in order to go talk to that PDF or file and get answers back okay so what is is
37:00 rag rag stands for retrieval augmented generation and it's a very powerful
37:03 technique that's going to combine two different approaches the first part is
37:07 retrieval and then the second part is Generation so this technique really
37:11 helps AI models provide accurate and relevant answers especially when you
37:14 need upto-date or specialized information so the first part here is
37:19 retrieval when you ask the AI a question instead of it making up answers based on
37:23 its training data it's going to retrieve relevant information from um external
37:28 sources so in this case the pine cone Vector database that we're going to be
37:31 setting up um so this is obviously going to be the database but it could be other
37:36 documents or it could be websites and then the generation aspect of it is
37:40 after it retrieves back this information that's relevant and accurate and up to
37:45 date then the AI model will use this information to generate an answer so
37:49 this is where the AI actually crafts a human readable response with the
37:53 information if you don't already understand from that previous slide why
37:56 rag matters let's break it down real quick let's say for this example you're
38:01 using an AI assistant that needs to answer questions about your company's
38:04 internal policies you don't want this thing to just guess um answers based on
38:09 its training data it might be out of date because you're going to update
38:12 policies stuff like that so in this case the AI assistant will use rag to
38:16 retrieve the most relevant information from the system it's going to generate
38:18 an answer based on that specific information which makes the AI far more
38:23 What are Vector Databases?
38:23 reliable and up toate for your needs okay rag is a pretty simple concept to
38:26 wrap your head around now we're going to move into databases which I think are a
38:30 little more complicated but once you really break them down not that bad so
38:35 in order to make rag work the system needs a way to store and retrieve data
38:39 efficiently this is where the vector databases are going to come into play so
38:44 in simple terms Vector databases store data in the form of vectors which are
38:49 just numbers that represent the meanings of words or text or whatever it is and
38:53 it's going to store these vectors into a multidimens dimensional database so
38:57 these vectors are going to help us find find similar or related information much
39:02 quicker than sort of like a relational um structured database this one's going
39:05 to be using a lot more unstructured data so even if the words are not the exact
39:09 same for example you're asking about cars the vector database might also help
39:13 you find related information about vehicles or automobiles as you can see
39:17 in this picture down here we've got um wolf dog cat and then the query is a
39:22 kitten so it's going to be searching for a kitten information about kittens and
39:26 it will kind of be um in this three-dimensional database store it'll be seeing like
39:32 similarities based on characteristics of these things and as you can see like
39:34 we've got fruits over here and then you might have vehicles down here and you
39:38 might have like you know information related to certain types of products up
39:42 here so that's kind of how this works just as like from a visual perspective
39:46 so if you're wondering how Vector databases work in relation to rag the AI
39:51 is going to convert documents or text into Vector stores and it's going to put
39:54 them in the vector database where they need to be then when a question is asked
39:57 the system is going going to look for similar vectors and sort of search out
40:02 the right area to pull information back um you know relevant documents or data
40:05 and then once it finds these most relevant vectors it's going to retrieve
40:09 that information and then finally it's going to generate an answer for the
40:13 human once you understand what a vector database is what Vector stores are you
40:17 need to understand how can you actually get information into a vector store so
40:21 this next slide is going to talk about sort of embeddings and stuff like that
40:25 all right so embedding data into a vector database this this slide is going
40:29 to be kind of tailored towards doing this in n8n there's other ways to but NN
40:34 is the way I do it so real quick let's just break down this picture so what's
40:37 going on here is we're testing the workflow it's going to be searching a
40:41 Google Drive for a specific file it's going to pull that file and then we need
40:45 to embed it into the pine cone Vector Store Pine Cone is just a vector store
40:50 database that we use um it just seems to be you know very cheap very easy to use
40:53 so this is the one we're using but there's other Vector databases out there
40:55 you might have heard of something like super base but this one's really simple
40:59 then what it's going to do is it needs to load the information so the type of
41:03 information coming through whether it's Json or binary it's going to load that
41:07 it needs to be able to split it up you know it's going to chunk it up and then
41:11 it's going to use the open AI model to embed it into the actual Vector store so
41:15 I know that this stuff may not make sense yet we'll get into an actual
41:19 example in NN where we're building this out and we're getting real PDFs from our
41:24 Google Drive up into pine cone and we'll see all that take place but we just
41:27 wanted to give you a quick visual real quick quick so you can understand what's
41:29 going through the first thing I'll touch on real quick um is the default data
41:34 loader aspect of this so in NN when we connect the vector store we have to load
41:38 the data this node is basically just going to allow us to load data from a
41:42 previous step flowing through um you know right here and then we need to load
41:45 it into here so that we can actually chunk it up and get it embedded into the
41:50 vector store so this note is pretty much just going to be looking at what kind of
41:54 data we're loading in um if it's like Json or if it's binary that sort of
41:58 stuff and then we can just you know configure how much we want to pass
42:01 through stuff like that and then we move into actually text splitting so right
42:05 here I have a recursive character text splitter as you can see right here the
42:08 three options in NN will be character recursive character or by tokens so the
42:13 first option is character text splitter this is just going to split the text
42:16 into chunks based on a set number of characters so you might want to use this
42:19 when you want to break down text into equally sized pieces regardless of where
42:24 sentences or paragraphs end um and then the next one we have is recursive
42:28 character text splitter which I seem to use the most because this one is going
42:31 to split text by characters but it does so intelligently because it's going to
42:36 break down logical points like after a sentence or in between paragraphs stuff
42:39 like that but same concept of just chunking stuff down so this is
42:43 recommended when you want to keep the text meaningful instead of cutting off a
42:46 sentence in the middle it's going to split at natural breaks like after you
42:50 know a period or a comma something like that and then finally the token splitter
42:55 this is going to split text based on tokens which are usually words or
42:59 subwords that the model understands and you kind of want to use this when you're
43:02 working directly with a language model like Chachi BT because it's going to
43:06 process text in terms of tokens and you know it's going to chunk It Down based
43:10 on how the AI model reads the text so you know if you're processing data for a
43:13 model it's going to split the text accordingly hopefully I didn't confuse
43:16 you guys too much maybe I went into too much detail but just wanted to break
43:20 down those different types of splitting but best practic is a lot of times you
43:23 can just use recursive character so the information stays meaningful but um just
43:29 a quick summary here so the rag is going to be um retrieving information from
43:33 documents right here that we're putting into a vector store in order to give us
43:37 intelligent answers then the vector database is going to store text in a way
43:42 that allows us to quickly and efficiently search based on meaning not
43:45 just exact words that are you know hardcoded in we're looking at stuff
43:49 that's related to specific meanings of words and then we're going to use a text
43:54 splitter to um help break down the large documents into manageable pieces in
43:57 order to put them into to the vector database and then open I AI here in this
44:02 case is just going to embed it into the vector store so that is basically how
44:07 Building RAG AI Agent
44:07 it's going to work and we'll hop into NN and actually show you guys this as you
44:10 can see what we're going to do here is build an RG rag AI agent and in this
44:16 workflow we'll be using a Nike earnings PDF and we're going to put that into
44:20 pine cone which is the vector database that we'll be using and then we can chat
44:23 with the agent in order for it to retrieve information about Nike earning
44:26 so that we don't have to read through the PDF we you can just ask questions
44:30 about it all right like I said we're going to be looking at this PDF of Nike
44:34 earnings reports so we're going to see this is the PDF that we're looking for
44:37 it's 10 pages we don't want to really have to read this thing we want to be
44:41 able to just chat with an agent and it can pull the information for us so first
44:45 up here get some sort of document that you want to put into pine cone Vector
44:49 store then as you can see I have this in my Google Drive right here so that we're
44:53 able to actually you know call this information and push it into pine cone
44:58 through nn and then you want to go into pine cone it's just type in Pine cone.
45:02 it's free to get started you want to set one up you'll come into here and all you
45:05 want to do is you're going to create an index so you can name it whatever you
45:10 want um I'm pretty much just going to keep everything as is the only thing
45:13 that you want to make sure that you set up here is right here you want to set it
45:16 up by model and you want to choose text embedding three small so you'll set that
45:20 configuration and then you'll just hit create index your index is going to pop
45:24 up right here if you click into it you can see that there's no information you
45:27 can see that there's no name spaces in here um just a really quick explanation
45:30 of name spaces you can have different name spaces within each index like let's
45:36 say I was in here and I had one for um internal documents and then I had one
45:40 for um client a and then I had one for client B that's just going to help your
45:43 agent be able to search for the information quicker because it can sort
45:46 of break it down by okay I need to go to this index and I need to go to this
45:49 namespace and then here's all relevant information regarding this project or
45:54 client once you've got all that information set up we are good to hop
45:58 into to NN and start pushing information into that pine cone Vector store so the
46:02 first thing that we're going to do here is I'm just going to make this a manual
46:05 trigger in the future you could have this where every time you upload a
46:10 document to a certain drive it would do a Google Drive trigger and then it would
46:13 automatically push that information into pine cone which is super cool because
46:16 then your database is going to you know stay up to date every single day every
46:20 single time you add more information but right now we're just going to be doing a
46:23 manual trigger next thing we need to do is add a Google Drive node because we
46:26 need to get that information from Google Drive drive into NN so we're going to
46:31 click on this plus button going to type in Google and we will see Google drive
46:36 right here once again lots of actions the Integrations are awesome but what
46:39 we're going to do here is download a file so if you haven't got this node
46:43 configured yet it should be super easy because you've already set up your
46:46 consent screen and your client ID and secret and all that but in here you just
46:49 need to go and make sure that you have enabled the right API so as you can see
46:52 here I've got Google Sheets Google Drive Gmail Google Docs custom search all the
46:57 different apis that I can use within in NN so set that up make sure you're
47:01 connected to the right account and then we're going to be downloading is the
47:05 operation and we're grabbing a file the resource and once again we can choose
47:09 from a list which is awesome we're going to come in here and look for the Nike
47:15 press release PDF so I'll grab that and then what we're going to do is just hit
47:17 test step because then we can see the information coming back so on the output you can see that
47:23 we're getting this information one thing that's really important to know is that
47:26 it's not coming through as Json there's no information here it's coming through
47:30 as binary so we don't have to get too technical on what exactly that means but
47:34 we have to just make sure we know how this information is coming through so
47:37 that later when we want to embed it into the vector store we can make sure it's
47:40 getting loaded correctly and I'll I'll show you guys that later but for now
47:44 just remember that this PDF is coming through as binary so we can view this
47:48 PDF make sure it's the right one as you can see it's Nike earnings so we're good
47:51 to go here and we can move on to the next step we've got our file next we
47:56 need to add the actual pine cone Vector store so so we can push the information
47:59 into pine cone so we're going to add this we've got four actions within pine
48:03 cone right now we're just going to be adding documents to a vector store but
48:06 as you can see you could also retrieve you could update all that sort of stuff
48:10 and we will be retrieving later in order to actually chat with our agent about
48:14 this PDF once again it's a little Annoying to have to set up the
48:16 credentials for everything but once you have them you're good to go so in here
48:20 we need to set up the pine cone I'm going to create new credential and as
48:23 you can see we need to grab an API key once you hop back into pine cone you can
48:27 see obvious you've got your indexes on the left hand side you can go down to
48:30 API keys and then all you're going to do is just copy this value with this button
48:34 right here copy that and then you're just going to really quickly paste that
48:37 into the API key hit save and it should go green because our connection is
48:42 successful now we're actually able to insert documents to the index so the
48:46 index that we want to insert to is called sample and for the sake of this
48:50 video let's add it to a namespace so click on ADD option Pine code namespace
48:55 and we will just call this one Nike and now we're good to go with this
48:59 node but what we need to do is we need to set up like I talked about earlier
49:03 the the default document loader how we're going to check Chunk Up the text
49:08 and then the actual embedding so first we will do the embedding I'm going to
49:13 use open AI you you should have your credential already set up and then we
49:16 need to choose the model so if you remember when we set up our pine cone
49:21 index we set up the model of text embedding three small so we don't want
49:25 to do Ada O2 we want to come in here and grab three small so that it's being
49:28 being embedded properly then we need to choose this plus button and we're going to do the
49:34 default data loader like we mentioned now here is what I talked about with we
49:37 need to remember how the information is coming through this Google Drive so
49:41 remember we came in here we see the output is binary not Json so binary is
49:45 how we want the information to come through so in the data loader we need to
49:49 make sure we're selecting the type of data is going to be binary otherwise
49:52 you're probably not going to get any information put into pine cone so we're
49:58 good to go here the last step is just to set up the text splitter so like I
50:01 talked about the differences between these three as you can see there's also
50:04 a short little description here so if you forget you can always come in here
50:07 and read what they do but we're going to choose recursive character text splitter
50:12 the chunk size like we talked about is just how many characters are going to be
50:17 within each chunk and the overlap um we don't want to have any overlap and chunk
50:21 size 1 th I'm sure that's fine for now the PDF is pretty big but we can see how
50:25 this works so let's just hit save and then we will test out this workflow so
50:29 it's a manual trigger so we're going to hit test workflow it's going to grab the
50:33 file download the PDF as you can see it went through the data loader it went in
50:37 here and then it had to embed it until it came into the actual Vector store so
50:42 let's hop back over to Pine Cone let's go to our database let's go to the index
50:46 called sample we can see that we have information in here now and if we click
50:50 on names spaces we will see that we just created a name space called Nike and
50:54 there are 29 vectors in here and as you can see 29 items left the pine cone
50:59 Vector store node all right our information has been successfully put
51:03 from Google Drive into pine cone now we need to build an agent workflow that
51:06 we'll be able to chat with in order to get answers from this PDF all right
51:10 we're in a new workflow here and once again we got to add a trigger so the
51:15 first step is going to be a chat message because we want to talk to the agent in
51:18 order for the workflow to start execution so we'll click on chat message
51:23 we can leave this as is because we'll be using this button down here to actually
51:26 you know talk to the agent and that that's how it's going to work but we
51:29 have our chat message trigger now we're going to add a new node we can come in
51:34 here to Advanced Ai and we see there's a ton of different AI things we can do um
51:37 there's even some templates up here to see you know what's possible and you can
51:40 download those and start playing with them but we're just going to come in
51:43 here and grab an AI agent now within this AI agent you have different types of Agents you can use
51:50 you've got tool conversational or openi functions agent you can read a little
51:54 bit about what each of these do but because we're giving these agent
51:57 different tools I think that we'll just keep this one as a tools agent come in
52:03 here and call this guy our Nike agent and then you can also do things like add
52:07 a system message you can return immediate steps you can have him have a
52:11 max amount of iterations we will add a system message right now it's just going
52:15 to say you're helpful assistant we can set this up in a sec once we get all the
52:18 tools configured but this is where we sort of tell the agent you know this is
52:23 your job here's background information here are the tools that you have here's
52:27 how you use them here's like an example flow so we'll talk about all that after
52:31 we get the rest of this workflow configured we've got our Nike agent and
52:34 then you can see there's different things we need to set up so the first
52:38 one is going to be the chat model I'm going to grab an open AI chat model and
52:43 connect our credential once again and then we choose the type of model we want
52:46 since this is going to be pretty conversational I think I'm going to use
52:49 40 it just seems to be the most consistent it's kind of the one that I'm
52:53 pretty loyal to but sometimes for smaller things like if you're just
52:57 labeling emails or if you're um doing some sort of classifier where you just
53:00 need to parse the information and see um like a category maybe then you could
53:04 come in here and grab you know 35 or 40 mini but don't get too caught up on what
53:09 each model's good at but right now 40 is kind of the most expensive but it is the
53:12 most powerful so we set that up with 40 now let's really quickly add a memory so
53:19 this is super super easy we just want to grab a window buffer memory um this is
53:23 super easy because that's all we have to do we don't have to set anything up you
53:26 could change the context window length but five chats is how many the model is
53:31 going to remember so I'm fine with that but this is a really easy way to give
53:35 the agent some context of what's going on otherwise when you're chatting with
53:39 it let's say you asked um what was Nike's earnings in you know quarter 3
53:44 and then if it came back with the information and then you said okay what
53:47 about quarter 4 it would be like what are you talking about quarter 4 for what
53:51 so that's going to give context of oh he just asked about earnings now he wants
53:55 to know about quarter the next quarter so just just going to give context to
54:00 your agent super easy way to add that memory then finally this is where all
54:03 the magic happens this is where you can add different tools So within here we
54:07 have you know different things that we can give our agent access to of course
54:10 we've looked at all the different nodes and the actions they can take but we can
54:15 see here that this is where it's really powerful because we can call an NN tool
54:20 or an NN workflow as a tool so that workfl that we just made about um you
54:25 know getting information into pine cone we could call as a tool here but that's
54:29 not exactly what we're going to do we are just going to call um sorry a vector
54:33 store tool and this is the one that's going to be getting our um Nike information so we
54:40 will just call this um database and then you need to give it a description of
54:45 when to use this tool so we'll say call this tool to um read to get get
54:53 information about Nike's earnings to answer the user question okay so that is the description
55:02 for this tool now we need to set this up with the actual Vector store because we
55:05 need to connect this to Pine Cone and then a model of course so let's add the
55:09 model real quick pretty much same exact thing we're just connecting the
55:12 credential we're adding a model I'll just do foral mini here um and then we
55:18 can see we need to grab the vector store so we have in memory we have different
55:21 options here super base that I talked about but this is how we actually want
55:24 to work with data within our pine cone Vector store so we're going to click on
55:27 that um I'm going to set this up real quick and now we see there's different
55:32 operations this is the time we want to actually retrieve documents we don't
55:34 want to put anything in there right now we're just trying to get information so
55:38 we'll click retrieve we need to choose the index that we want which is just
55:41 sample and then here's another option where we can add the name space for this
55:45 agent to go search through so we called ours Nike so make sure you put the right
55:49 name space in here and make sure it's spelled correctly too so now we have
55:52 that set up so we're almost done with this agent last thing we need to do here is ADD the
56:01 embedding which once again we did um three small so we need to set up three
56:05 small once again okay so this is pretty much it for this agent we should be able
56:09 to talk to it and have a conversation with it now so let's hit save and let's
56:13 just give it a shot so real quick let's go to the PDF and ask about something so
56:17 we can see the gross margin for the fourth quarter increased 110 basis
56:21 points to 44.7% so let's ask about um the gross margin for the fourth quarter so we'll
56:28 come back into nnn we'll chat with his agent um we'll just say how was
56:36 Nike's um gross margin for says Nike's gross margin for the fourth
56:45 quarter was 44.7% so that was right that's the information we're getting but we maybe
56:50 don't like the way that this agent's talking to us so that's where we need to
56:54 actually come back into the agent and prompt it so let me just type out a real
56:58 real simple prompt and then we will take another look all right I went into chat
57:02 gbt and I said hey can you help me prompt this agent it needs to understand
57:06 its role some context instructions I want to give it some example flows of
57:11 how it should operate and we got a pretty good prompt out of it so let's
57:14 just read through it real quick we said you are a friendly and helpful Nike
57:18 representative tasked with answering any questions users may have about Nike's
57:21 earnings you have access to a vector database with all the relevant data on
57:24 Nike's financial performance including Revenue profits other earning related
57:29 info when a user asks a question you should search this database to find the
57:32 most accurate and up-to-date information and respond in a friendly approachable
57:36 tone be sure to add humor and use emojis to make the conversation fun and
57:40 engaging then we gave it instructions for an interaction flow so basically we
57:43 said a user asks a question you're going to search the database you're going to
57:46 respond and then we gave it some information or some examples of a
57:52 friendly tone greeting the user throwing emojis using jokes um all that kind of
57:56 stuff and then we wanted to give it a sample flow sort of like more exact um
58:00 the more examples that you can give an agent about you know what it might run
58:05 into different situations the better and then finally we said the actual tools
58:09 that it has so Vector database is really the only tool we hooked up and we said
58:12 to use this to retrieve specific earnings information and financial
58:16 performance remember your goal is to provide accurate data while keeping the
58:19 user engaged with humor emojis and a conversational tone all right so let's
58:24 give this a save and ask another question let's let's just come in here
58:30 and say um who is Matthew friend because he's the Executive Vice President and
58:35 CFO of Nike so we'll say who is Matthew friend and like what did he say I guess
58:39 let's see what we get from that who is Matthew friend and what are
58:51 thoughts okay so here's what we got from the agent Matthew friend is the
58:54 executive VP and CFO of Nike he's the financial Mastro and ensuring the Swit
58:59 stays profitable and Innovative and then we have um two emojis there let's see he
59:04 said he G the agent gives us the quote that he said and then at the end it says
59:07 if you have any more specific aspects you're curious about I can dig up his
59:11 latest commentary for you so good emojis very friendly um let's just say sure can
59:18 we get some more info and this is information this is important because it's going to remember
59:23 what we were just talking about which was Matthew friend and we can see if
59:26 there's anything else in this PDF that he said um so here's a slice of wisdom
59:32 from Matthew friend the CFO he recently highlighted that while Nike is driving a
59:35 better balance across his portfolio the fourth quarter brought some challenges
59:38 but no worries he's on it Matthew emphasized that Nike is taking strategic
59:41 actions to reposition itself for sustainable profitable long-term growth
59:47 okay so we're seeing a conversation with this agent right here in the log you can
59:51 see exactly what's happening so you can see our agent um it updated the memory
59:55 it went to the chat model it read through it prompt and then it basically
59:59 is like making sure it knows what to do it's going to go to the vector store
60:03 tool and we have the query which is Matthew's friend Matthew friend's recent
60:06 statements or comments and then it got an output from the um pine cone database
60:11 so if you don't understand what's going on here basically it's just being able
60:14 to see the flow of what's going on so that you can um you know troubleshoot if
60:20 need be but this is super cool and it just shows you how you can connect
60:23 different tools so we could even come in here and add a um what is it Wikipedia
60:28 so this is going to let it search in Wikipedia so if there's information
60:33 maybe that's not about um that's not on this PDF it could also access this tool
60:36 and we'd have to obviously prompt it a little bit to do that but let's just see
60:39 if this is going to work we can say what is the capital of Florida and it should
60:44 be searching through wikkipedia to answer that question so the capital
60:47 Florida is Tallahassee it's not just about beaches and theme parks haah nice
60:53 and friendly but um you know this information the capital of Florida I
60:56 doubt that it was on this earnings report from Nike so that just shows you
61:00 that it actually went and searched through this tool and you know you can
61:03 also add like a calculator in case you want to make sure it's doing you know
61:07 math accurately um so we got a calculator tool here now too so we would prompt in
61:13 that but it's super cool because like I said you can connect different workflows
61:17 that you build within NS tools so let's say we have this agent here and we give
61:22 it a tool that um can send emails because we're going to build a workflow
61:25 of automatically sending an email and and then we would just give the agent
61:29 this this tool so that if we wanted to chat with the agent and say hey by the
61:32 way could you send this information to um you know Matthew friend in an email
61:36 and it would actually be able to go to do that as long as it had Matthew
61:40 friend's email which we would give it in some sort of vector store as well so um
61:45 I hope that that you know is a breaks down the concept of rag Vector databases
61:50 um pine cone Vector store how you can link all these together when it comes to
61:53 giving an agent access to all these different things in order to do what you
1:01:56 Part 4: Expanding Agents
61:58 wanted to so at the end of that last build we saw we started expanding on
62:02 that agent and giving it access to you know Wikipedia and a calculator tool and
62:05 so I wanted to talk a little bit more about how you can actually expand on
62:08 these agents to make them even more powerful and scalable um you know like
62:13 giving an agent access to more tools giving an agent access to agents to call
62:17 on it's it it's super powerful the stuff you can do so in this part just wanted
62:21 to quickly talk about building workflows as tools how that all works how that all
62:25 comes together and the importance of it and then we'll just go through a couple
62:28 examples in NN of some agents that I've built and you can just see the way that
1:02:31 n8n Workflows as Tools
62:32 they use different tools all right the power of being able to build custom
62:37 Tools in NN it's it's honestly insane so first we have the fact that agents can
62:41 use these tools obviously you can build a tool and have an agent call on it like
62:46 in this example down here you can see um I have get email tool send email tool
62:50 update database summarize database set calendar event and get calendar all of
62:55 these are tools that I built within nadn so these are workflows I'll show you
62:59 guys them once we hop back into nadn but these are all different tasks that I
63:03 built out in nadn and then the agent is able to decide based on what I tell it
63:08 texting it on telegram based on what I tell it to do it will decide which tool
63:12 to use in order to go complete that task and then it will either tell me that it
63:15 did the task or it will give me you know the summary of a database or my calendar
63:20 that sort of stuff so agents can use these tools um you know like a smart
63:24 agent or a smart AI assistant that can call these workflows so this is a great
63:28 example right here of a personal agent we also have the fact that tools can be
63:32 reused and recombined so now that I have these tools built out I have a send
63:36 email tool if I ever need to build a different type of agent to send emails I
63:39 can just give it this tool I've already built it so it's already there in my
63:42 workflow and I can call on it in multiple different agents it won't
63:46 really matter so that is super cool they can be reused anytime and they can be
63:51 combined with other tools and now for scaling so this is what I talk about the
63:54 fact that as you build out tools you just have more and more tasks that you
63:58 can complete um more things that you can give your agent to do and then it gets
64:03 even more powerful because um let's say you want to not just have a send email
64:07 tool but you want to have an agent that can do everything within email so you
64:10 would have an agent and you would give it a ton of different tasks and email so
64:14 youd have an agent with get emails send emails label emails draft emails delete
64:19 emails all this kind of stuff and then you could give your overarching like
64:23 larger agent access to the agent that does email stuff so this agent would be
64:28 able to decipher okay do I need to go into Outlook or calendar or teams or
64:33 slack and then you would down here have one agent that does everything in slack
64:37 One agent that does everything in teams One agent that does everything in your
64:40 calendar and then you can just build on top of each other and also that's going
64:43 to make your workflows more efficient rather than trying to you know send a
64:47 prompt through with like giving this agent you know 50 to 60 tools like that
64:52 would be way too much even I think like 20 is probably too much but that way you
64:56 could give the agent other agents and it's just like you know the hierarchy of
64:59 it's going to go through this guy then it's going to go to these agents and
65:01 then it's going to come back so it's just you can get really creative here
65:06 with how you can get stuff done and all you have to do is break it down by tasks
65:12 so take a task and combine these with a larger workflow of getting all these
65:16 tasks done and then you know larger just just scale up pretty much so now let's
65:20 just hop into nadn and we can take a look at you know this assistant and a
1:05:23 Showcasing Agent Examples
65:23 couple other ones all right so this is the personal assistant that we were just
65:26 kind of taking look at back in the slides but as you can see it's got just
65:30 pretty much seven tools it's got database information so for something
65:34 like getting or sorry sending emails it needs you know contact data information
65:38 who do I actually send it to what's their email address and then we have
65:41 these different tools get emails send email get calendar set calendar and then
65:47 update or summarize the database so real quick I'll just show you guys how I
65:50 talked about these ra all tools within my nadn so if I go back here we can see
65:55 um here's the update database tool here's the calendar email so we can like
65:59 click into one of these so let's do summarize database as you can see it's
66:03 just a very simple workflow we've got different nodes we've got um the actual
66:07 database it's going to call on this database it's going to summarize it
66:12 aggregate everything into one clean field and then it's going to send the
66:17 response of the information back to the agent so it's going to go through this
66:20 process then it's going to have a summarization right here once we get
66:24 that information summarized it's going to go back to the agent and then it
66:27 knows its job is done so then it's going to Output a telegram message back to me
66:32 so real quick let's take a look at this database this is the project database
66:35 that I'm summarizing in this case so we've got different tools or sorry
66:39 different projects we've got notes about the project and then we have the
66:42 different statuses so I know it's a very simple example but that's just you know I was
66:47 testing out this personal assistant and trying to make a video about it so
66:50 here's the assistant let me just pull up my telegram with my that I talked to for
66:55 my AI assistant um as you can see there's different information that I've
66:58 been testing out with other workflows and other executions but let's just come
67:05 in here and say can you summarize our database and so this is going through
67:09 telegram the agent is under getting this prompt right here can you summarize our
67:12 database it's figuring out which tool it needs to call in order to do that and
67:15 then it's going to summarize the database as you can see we just got this
67:18 message back here's a summary of the current status and contents the a AI
67:22 project is complete the marketing campaign is pending it involves drafting
67:27 content this that is ready and awaiting review by the marketing
67:32 head um mobile app project this project involves developing a user
67:34 authentication module which is currently ongoing beta testing has been scheduled
67:39 indicating progresses in the works so as you can see it's you know summarizing
67:42 all this information for us could be super useful if you were on the road and
67:46 you need to send a quick email so you just have to text this agent real quick
67:49 or you know on your way to a meeting and you need to summarize get some quick
67:52 information summarized it could even summarize all the emails you've gotten
67:56 from a certain day so that is a cool example of um building an agent and
68:01 giving it examp giving it access to different tools that you've built in NN
68:04 by the way if you if you want to know more about what this agent can do please
68:07 go watch the video I'll tag it right here um I made a whole video about you
68:11 know building this personal assistant and sort of like the capabilities of it
68:15 and how you can expand on it so definitely go watch that video if you
68:18 want a more in-depth look at what this agent does here's another quick example
68:22 of a different way you can structure an agent this one is being triggered by
68:26 Gmail so every time I got a new email it's going to come through here it's
68:30 going to classify the email give it a label of high priority customer support
68:33 promotion finance and billing and it will actually give it a label on Gmail
68:37 and then for each of those types of email it's going to come through here
68:40 and select for high priority one it's going to create a draft and then it's
68:43 going to have the draft sitting in our email and then what I would do is um
68:47 actually I made a video about this one too so if you haven't seen it I'll tag
68:51 this one too and you want to you know go look and see how this works and how to
68:54 build it but then what I did in the video is we hooked it up to a send text
69:00 message node right here in telegram so I configured this and then it was able to
69:05 let me know hey we made a high priority draft for you based on this email from
69:09 Kevin and now it's like there for you and then I did the same thing with all
69:12 these other ones so like for customer support we let it actually create an
69:16 email and reply to it so it actually sends off an email and then the telegram
69:21 message says um we sent off an email for you based on you know it was a customer
69:24 support email same thing with these two down here in you know if I pull up
69:27 telegram we can actually see these past interactions I've had so like for a
69:32 finance and billing one down here we wanted it to summarize the information
69:35 and then send it to the finance department so right here we see you
69:38 received a finance and billing inquiry from Angela from the accounts Department
69:41 we've notified your finance department of this email um right here it's like a
69:45 promotional one so here are details regarding a promotional email from Nate
69:49 it gives us a summary of the promotion and then it gives us a recommendation so
69:52 that's something that we crafted out right here and all of these were linked
69:54 up to different telegram nodes to let us know notify us of what's coming through
69:59 and what the agent had done so like I said go watch that video if you want a
70:03 more in-depth run through of what this um agent does but the purpose of me just
70:08 showing you guys this real quick was just to open your eyes about how you can
70:12 expand how you can build off of you know different ways you can structure agents
70:15 and how you can you know make them do exactly what you want to do and remove
70:18 yourself out of that process to automate things so just super cool stuff moving
1:10:20 Part 5: APIs & HTTP Requests
70:23 on to part five which is going to be talking about apis and HTTP request
70:27 quests um this kind of stuff can sort of get a little Technical and seem
70:30 confusing but I'm here to make sure we just sort of break it down as simple as
70:34 possible so before we really get into the content of this part I wanted to
70:38 just stress that you know we've already been working with API calls and API
70:43 tools whether you've known it or not all of the preconfigured nodes in nadn are
70:47 pretty much just HTTP requests in some way or another so when you're using
70:51 these nodes naden is doing all that hard work of making the API call for you you
70:55 know either fetching or getting some data like in that previous example when
70:59 we were using that Google Drive node to get information to put it into our pine
71:03 cone Vector store that was pretty much an API call to Google Drive looking in
71:08 our Google Drive grabbing the file and then we got the information back in Ann
71:13 so we're pretty much already doing that you only will really need to use apis
71:17 and HTTP requests in nadn if you want to connect to something that there's not an
71:21 integration for which um is kind of rare but it's good to go over just in case
71:26 you do need to do this so yeah the an NN they know exactly what to do exactly
71:29 where to go where to send their requests and how to get the information you need
71:32 or put information somewhere that you need to so now we can move into talking
1:11:33 What is an API?
71:38 about apis so what is an API it stands for application programming interface so
71:42 basically just think of it as the bridge that is going to allow two different
71:45 softwares to talk to each other like nadn and Google Drive whatever it may be
71:51 so here's a concise summary about API endpoints calls and HTTP requests so so
71:58 um the endpoint is just basically going to be a specific URL or address within
72:02 the API where a certain service or piece of data can be accessed so it's like the
72:06 exact path that you need to take once you access that API you have that
72:10 endpoint so it's going to specify where you need to go then the API call is just
72:14 that request that you're making to the API asking it to you know perform some
72:19 sort of task or provide some sort of data so it's like you're placing an
72:23 order and then the HTTP request is the actual method that you use to send that
72:28 API call over on the internet so it's sort of just the messenger that's going
72:31 to carry your request to the API endpoint and then it's going to bring
72:34 the response back in a nutshell you're going to be making an API call using an
72:40 HTTP request which is going to be sent to a specific API endpoint and then
72:44 we'll get the information back from the API and then the HTTP request is going
1:12:49 What is an HTTP Request?
72:49 to return the information to us okay so what is an HTTP request think
72:54 of this as just the way that your computer or nadn is going to be talking
72:58 to the other service so you can do things like get data which will be sort
73:04 of a g HTTP request or you can send data which will be a post HTTP request which
73:08 you'll see once we hop into NN and actually look at some examples but just
73:11 as simple as either asking for information or sending information
1:13:14 How They Work Together
73:15 somewhere I remember when I first heard about all these different terms I
73:18 thought to myself like that sounds so similar how do you really distinguish so
73:22 let's just quickly talk about how they actually work together so like we said
73:25 an HTTP request is is how you actually make an API call it's the messenger
73:30 that's going to carry your API call to the server so we've got a quick
73:33 restaurant analogy let's think about it like this so we have the API this is
73:37 like the restaurant itself so this is the service that you're talking to the
73:40 restaurant is going to provide different services to its customers you know just
73:45 like an API the restaurant offers a menu of things that you can request different
73:49 actions or different data then we have the API endpoint the API endpoint is
73:53 like this specific kitchen station that you're talking to so it's going to
73:57 handle a particular dish there are different stations for each tasks you
74:01 know cooking pasta making pizza so the end point is like going to the correct
74:05 station in order to get the specific dish that you ordered then we have API call um an API
74:11 call is like placing the order it's the actual request so in this case you know
74:15 we wanted spaghetti that's how we know to get it to the right spot but um you
74:18 know you look you you'd order the specific meal and then um that's just
74:24 making the request um for data or for a specific service from the API and then
74:29 finally we have the HTTP request which like we said is pretty much just the
74:32 mechanism that's being used to deliver the request so in this analogy it's
74:36 going to be a waiter who's going to take your order bring it to the kitchen staff
74:39 and then when they bring the dish the waiter is going to bring back that food
74:43 to bring back that information that you were looking for so hopefully that was
74:48 simple enough API call is the concept HTTP request is the tool so you're
74:52 asking for something with an API call and then the request is going to be how
74:56 you're delivering it over the internet all right now let's just get into NN
74:59 real quick and just look at a few examples of an HTTP request node and
75:03 sort of what it looks like to configure something like that we are now back in
1:15:04 HTTP Request Examples in n8n
75:06 nadn as you can see I've got three different HTTP request nodes in here so
75:09 you would just come in here and grab HTTP request as you can see right here
75:15 um but these first two we've got two gets so we'll be asking for information
75:19 in one way or another and then this last one will show a post where we're
75:22 actually sending information somewhere so let's just go into this first example
75:25 here so this one's going to be a really simple one we're making a get request
75:30 like I said so we're asking for information here would be like sort of
75:33 that API endpoint like we talked about so we're going to be going to
75:37 openweathermap.org um we're going to be asking for weather you can see here's
75:41 some parameters Q equals New York so we're looking for weather from New York
75:46 and then we have a little credential here we had to set up an API key to
75:50 actually be able to access um the API of open weather map and get into you know
75:54 that's my API key so it knows that we have permission and we'll hit test step here so we can
75:59 just see that this request is working we can see information coming through on
76:02 the right hand side we've got clouds we've got temperatures we've got wind um
76:05 and then as you can see it came back for the name the city of New York so we know
76:10 that this request was working I won't go too much right now into you know setting
76:14 up parameters and headers and body for your request but usually when you want
76:18 to connect to a certain API they're going to have documentation on it so in
76:21 this example for open weather map they have exactly like the end points that
76:25 you need to find or they they'll give you what you need to type in and how to
76:28 specify parameters it's not like you have to know how to just find the stuff
76:32 cuz that seems pretty technical um so yeah most of the things that you want to
76:35 connect to if there's not an integration in NN already we'll have documentation
76:38 on their website of how to connect to different things how to request for
76:41 different things how to send different things so you'll just have to read
76:44 through documentation but another cool thing obviously like we were getting
76:48 weather from open weather map but as you can see like open AI already or sorry
76:52 nadn has Integrations for this where it's a lot easier because this is
76:55 basically setting up that API call they just did all the coding the technical
76:58 stuff on the back end of that so we have this basically the exact same thing okay
77:04 so this next one is another get request this one is as you can see we're going
77:08 to be searching Google so we have the endpoint right here of google.com/
77:13 search but we did want to set up some parameters here so we have q like we saw
77:16 that last one Q equals New York this time Q is equaling site colon
77:20 linkedin.com slin okay so this is the URL that we're basically trying to access so if we p
77:28 ped this into Google right here we would see like it brings us up Google so
77:33 that's what we're searching on and then within Google we want to be searching
77:38 for site umon linkedin.com so we go back to Google paste that in there and you
77:42 can see what's coming back is actual LinkedIn just LinkedIn profiles so
77:47 that's sort of how this parameter is working and we can go ahead and test the
77:50 step real quick we can see exactly what's coming back which is going to be a nasty chunk
77:55 of HTML a lot of information in here your next step here would be to parse
77:58 through this information with a different node that would grab you just
78:02 LinkedIn profiles so like if I come in here and search um linkedin.com you can
78:07 see like I'm sorry we've got a lot of hits 173 hits and we can sort of go down
78:11 until we find actual profile so that's what you'd have to be parsing out but
78:16 right here we have Robert W Livingston so if we go back to the actual Google
78:19 search we can see that first profile coming through is Robert
78:23 Livin um and then if we were to continue to go down and look through all the
78:26 different results we'd see all these different profiles coming through into
78:29 our naden so that is the way that this request is asking for information from
78:35 site colon linkedin.com in and then we're actually getting back the
78:38 parameters from or sorry the information from Google through that request and for
78:42 this final one we're making a post request as you can see right here so I
78:46 click into this we'll see what's going on in this node this is a post request
78:50 and I was able to go to Google apis in order to see how to access my calendar
78:53 there's going to be different API endpoints in their documentation of like
78:57 you know copy this URL if you want to create event copy this URL if you want
79:01 to update an event copy this URL if you want to get information back on your
79:05 events so that's all I did I I hooked up that that API endpoint in here obviously
79:10 had to set up my credentials and then in this example we have to send a body
79:13 because we're posting data sending information and so this is really simple
79:18 it's just Json um sort of setting up the criteria for the event you could you
79:22 know go into chat GPT and say hey I'm like accessing a Google API for my
79:25 calendar can you help me set up a body and it should work with you there but in
79:28 this case the summary of the event that it's going to be making is meeting with
79:33 team we have a start date um noon we have an end date of 1:00 and then we can
79:37 add like attendees and different emails and real quick I'll show you this is the
79:40 calendar that I'm accessing right here so there's nothing going on today and
79:43 we're going to make the event for noon so if I hit test step it'll come through
79:47 and it'll say that it worked and we can see on here we just got our meeting with
79:52 Team from noon to 1:00 p.m. and the information coming back here is just
79:55 going to be like you know meeting link it's just going to basically tell you
79:58 that that post request went through successfully all this kind of stuff but
80:03 another case where that would just be over complicating things you've got
80:07 Google Calendar right in here um where is it right here we can get availability
80:11 we can create an event so all we did right here was create an event this is
80:15 going to make it a much easier way to actually send that request because you
80:18 just have to fill in different parameters and you don't have to worry
80:21 about the API endpoint putting that in you don't have to worry about um you
80:25 know the Json sending over the data in that post request you could just do that
80:30 right here as well now that that concept of just how you access endpoints and how
80:33 you actually send or receive data makes more sense what you would want to do
80:37 from here is like the more realistic use case when you're building stuff like
80:41 this and you need to you know integrate with something is going to be a web hook
80:45 trigger so you can see like you've got your url here you have an HTT method and
80:50 this is the kind of stuff that you'd be more familiar with setting up once you
80:53 understand the basics of um sort of these noes but these are going to be
80:57 really powerful tools because these will let you trigger a workflow based on um
81:01 information coming through from another site so if you wanted if you had some
81:04 sort of form on your website and you wanted to hook up to that and then every
81:07 time someone filled out the form you could have this go through where it's
81:10 going to you know notify you that someone filled out the form it's going
81:13 to send them an email sort of welcoming them it's going to throw them into a
81:16 database and then it's going to send slack message to your team something
81:19 like that so these web hooks can be very powerful when it comes to automating
81:23 other processes as well and getting pretty customized but before you get in
81:27 here and you want to start configuring stuff I think it's just important that
81:31 you understand the the framework and the basics of you know apis and points HTTP
81:36 requests and how all that stuff is going to work in nadn and then you can really
81:39 explore with stuff like web hook triggers which are very cool and offer a
1:21:42 Part 6: The Final Part
81:43 lot of flexibility all right we have now made it to part six which is going to be
81:47 the final part of this master class you know we've covered a lot of ground we
81:51 started the basics of NN building your first workflow we created an AI powered
81:57 agent using RG Rag and Vector databases we made API calls and HTTP requests we
82:01 talked about extending your workflows with custom tools and web hooks so
82:05 you're no longer a beginner you have the tools and knowledge to create powerful
82:08 automations that are going to transform your productivity the way you approach
82:11 your automation projects and I just wanted to close off with talking about
82:16 error workflows um just sort of best practices when it comes to creating
82:19 workflows in na then and sort of how you can do that most optimally and then um
82:23 just some final next steps and just closing thoughts all right back in NN here we have a
1:22:24 Error Workflows
82:29 error demo workflow which is just an error workflow that I just created real
82:32 quick as you can see it's going to start off with an error trigger so this
82:36 workflow is going to execute whenever there's an error and another workflow
82:40 that we're hooking up this one too so that'll make more sense once we actually
82:44 configure it but as you can see It'll Get triggered and then it will come in
82:48 my telegram um which will be sending me a message so it's going to notify me
82:51 that there's an error it's going to tell me the workflow that's erroring it's
82:54 going to tell me the error message message that happened and then it will
82:58 give me a link to the actual execution of the error so that would all just pop
83:02 up on my telegram I can click on the link and come in and see what's going on
83:07 but in this case this is going to be you know a personal assistant I showed this
83:10 a little bit earlier so this is the workflow we want to hook up to that
83:14 error workflow we come in here up top right grab that three dots click on
83:18 settings and then right here you can see error workflow so a second workflow to
83:22 run if the current one fails the second workflow should have an error trigger
83:27 node so we saw the error trigger node we saw that this workflow is called error
83:30 demo so we've hooked that up as this error workflow and um now we just need
83:34 to make sure that this workflow is going to error so let's just delete the brain
83:38 of the assistant so this one should error for sure as you can see it already
83:42 is and um it's going to be calling this and then it's going to be filling in the
83:47 information when it airs so let me just pull up my telegram real quick as you
83:51 can see this telegram this is my AI personal assistant so this is how we
83:54 talk to it and this is how how it talks to us back right here if you can see
83:58 this flow but let's just ask it to do something like can you get my
84:04 emails this should airor and as you can see we got the error notification the
84:07 workflow is personal assistant which is right up here the message is that a chat
84:11 model subn node must be connected so that's the eror that's going on right
84:14 here and then we have a link to that execution I can click on that link and
84:19 it should bring me into what exactly just happened and we can see why it's
84:22 erroring so as you can see this is the most recent execution that just happened
84:25 um it's going to take a second to load up but basically the error is just
84:29 happening because a chat model sub node must be connected that's why it aired
84:32 and as you can see that's exactly what it told us in here okay so that's kind of how this
84:39 works um you know you could even go you could expand off of this so let's say
84:42 you want to get notified um but then let's say that we want to you know send
84:47 an email to the team that says hey this this isn't working right now um we're
84:51 working on this to get fixed so let's just come in here and let's send a
84:55 message um obviously we need to set up all this information so let me do this real quick
85:00 really quickly configured this node obviously we're sending a message put
85:03 who you want to send it to this could be you know a ton of different emails you
85:06 got the subjects which is going to be error and then it's going to tell us the
85:10 error message and then the message of the email is going to say hey team we
85:14 received an error in blank workflow we're working to resolve the issue
85:17 thanks so if I just you know test this step we would see that that came through
85:22 um let me pull up the email real quick so here you can see we got the error
85:26 example error message hey team we received an error in example workflow
85:29 we're working to resolve the issue um so let's just quickly go back and end it in
85:34 turn off the append attribution and we'll save this and then we can um pull
85:40 up telegram we will ask it to get the emails again and we will get an error
85:44 notification in our telegram right here but then we should also get a new email
85:48 with that information coming through um so we'll just give this one a sec here
85:52 okay now we got an error a chat model sub node must be connected hey team we
85:55 receiving error and personal assistant where we're going to resolve the issue
85:58 so obviously that's just a very quick example email um you could configure the
86:02 subject and the message however you want but that's just goes to show how a quick
86:07 error workflow you can set that up you can hook it up to multiple different um
86:10 agents multiple different workflows that you have that when they when they error
86:14 this logic will take place and you'll get notified right away so that's just
86:18 another cool feature of net all right if you guys have made it this far really
1:26:20 Best Practices
86:20 appreciate you sticking it through all the way hopefully this has been a really
86:25 helpful session but before we close out let's quickly go over some best
86:28 practices for workflow optimization to ensure that your workflows are staying
86:33 efficient maintainable scalable and you know all this kind of stuff as you build
86:37 out more complex automations so the first thing I wanted to touch on real
86:39 quick is just keeping your workflows organized as they grow you got to keep
86:43 them well organized it's going to save you a ton of time down the road when you
86:46 realize uh oh like we have to redo this or there's a problem and now we are all
86:50 confused about what's going on here so make sure you use you know descriptive
86:54 node names you can throw in comments really easy with a little sticky note um
86:57 you can you know make notes in your workflow so that if anyone else wants to
87:00 come in and look at what's going on or wants to help you out in the future they
87:03 can quickly understand what the workflow is doing what each part of the workflow
87:07 is doing then we want to be able to use sub workflows for reusability you don't
87:11 need to reinvent the wheel every single time you want to do a similar task in
87:15 these different workflows consider creating subw workflows like we talked
87:18 about with you know maybe one for sending email one for creating calendar
87:22 events and then you can hook that up to a bunch of different agents or even have
87:27 agent that's you know a specialist in one certain type of platform so that's
87:31 going to make it sa saves you a ton of time later down the road when you want
87:34 to make more complex automations you don't have to build out the same you
87:38 know five nodes that are going to be the same staple for every single thing that
87:42 you need to do in that space um so that's just going to save you a lot of
87:46 time and avoid redundancy and the third thing we want to do is Implement air
87:49 handling so already talked about that a little bit but you can even take it a
87:53 step further so you know errors are going to happen no no workflows immune to issues like an
87:59 API failing or something like that so if you build in some of these issues or
88:02 error handling issues it's going to ensure that your workflows remain robust
88:05 you can be notified when something goes wrong you'll have like a safety net
88:10 behind each of your automations and then finally just you want to optimize for
88:13 scalability so as your workflows get bigger efficiency is going to be super
88:16 important so you want to use features like batch processing or pagination you
88:21 want to have a lot of conditional logic in there in order to handle larger data
88:25 sets more complex branching workflows so scaling doesn't just mean bigger
88:29 workflows it also means making them smarter workflows and next steps now
1:28:30 Next Steps
88:33 that you've made it through this master class you built a solid foundation I
88:37 encourage you to keep pushing your boundaries there's so much more that you
88:41 can explore in nadn and your next step should be about expanding your skills
88:44 and experimenting with sort of more advanced templates so in order to do
88:48 this to continue growing and learning I definitely want to invite you all to
88:51 join my fre School Community where we all you know share ideas workflows cool
88:56 things that we've built using nadn it's all about collaboration and inspiration
88:59 so whether you're looking for feedback or you just want to brainstorm new ideas
89:03 or get some questions answered um it's nice to have a very supportive Community
89:06 to share your progress with and it's going to make the experience a lot
89:09 better so please hop in the link for that is going to be in the description
89:11 and I'll also be sharing a lot of resources in there that I I use in each
89:15 of the videos and stuff like that so I'd love to talk to you guys and I'll see
89:19 you in there the first thing here is going to be just to get in and start
89:22 building you know the power of learning by doing is insane a
89:26 but really anything that involve tools like n is it's best to just learn by
89:30 getting your hands dirty you know as you build workflows experiment with things
89:33 push the boundaries of what you can automate you're going to run into
89:36 challenges and you're going to have some failures but that's definitely a good
89:39 thing like it's just part of the process and when you fail and you can go in and
89:42 figure out what happened and actually solve that problem you're going to just
89:46 understand the process way more than someone who you know is not actually
89:50 getting in there and doing things just watching YouTube videos stuff like that
89:54 you even every time I build out any sort sort of agent any sort of workflow it
89:57 always fails and it's just going to happen but that's how you really
90:00 understand you know the logic of stuff moving through so these moments where
90:03 you're going to gain the deepest understanding of how n in works and how
90:06 you're able to actually improve on your skills so you know don't be afraid to
90:10 make mistakes it's just going to happen then I would say you want to get in and
90:14 start exploring some Advanced templates so at the beginning of this master class
90:17 we looked at sort of the community in nadn and the template Gallery which is
90:21 just a gold mine of ideas and pre-built workflows so you can dive into those and
90:24 you can see how people are building things you know there's no one right way
90:27 to build an automation so you can see different ideas and it will really help
90:31 you sort of expand your skills there too the third thing I would say would be to
90:35 experiment with new Integrations you know don't be afraid to try out new ones
90:38 even though naden supports over 300 Integrations for you know popular CRM
90:43 systems social media platforms databases um it's really important to just get in
90:47 there play around with HTTP requests different web Hooks and see all the
90:50 possibilities of how you can automate stuff and it's really just going to you
90:55 know expand your your capabilities and then you can always start to build and
90:58 share your own templates once you really get experience with um building out
91:02 different things and you you start to get more creative with your workflows so
91:05 that'll be really cool you can share them with the community it's a great way
91:09 to inspire others and also get feedback on the sort of builds that you're doing
91:12 and how to optimize them so yeah that is going to be it for the master class
91:16 those of you that made it this far I really appreciate you taking the time to
91:19 you know sit down for however long this video was and um just listen through all
91:24 this kind of information and I really uh try to structure it in a way where you'd
91:27 really be able to come from a beginner and really understand what goes on in NN
91:30 and how to just get in there and start building some simple agents and then
91:33 just make them more more complex as you learn but like I said that's the end so
91:38 congratulations for making it this far thank you guys so much for your time and