today we are building a Nia agent that's going to automate your entire life take a look at this so cool it's going to be working literally 24 hours per day to do all the heavy lifting that you don't want to do this AI assistant can do really anything it is you want instead of just rambling on let me show you what this looks like so the first thing I want to do is activate the AI voice agent hi I'd like to book a barber shop appointment between 2: to 5:00 p. m. tomorrow at my favorite Barber and can you ask if Tom is available please and so just like that we're going to send this message off the first thing we're going to do is transcribe that message into text then it's going to call the right tool which is checking our calendar to make sure we are available then once that's done it's going to actually call that barber shop for us take a listen to how this sounds so I'm going to turn it on speaker a hair appointment yeah of course how can we help I'm assisting jono in booking a haircut appointment we're aiming to schedule at between 2 p.
m. and 5:00 p. m.
on February 15th do you have any availability during that time yeah we have some availability uh 3 P. M works great could you please confirm that the appointment is scheduled for 3 P. M on February 15th oh and one more thing is Tom available as the stylist for that timing actually you know what Tom is available at 3 p.
m. so we'll schedule you in for 3 p. m.
and can I get a name please that's perfect Jon Smith will be coming in for the haircut okay thank you for your help will J receive a reminder of the appointment yep we'll send it over to him thank you for your assistance okay have a great day thanks you to byebye so obviously it kind of butchered my name it said Jon O Smith it's like most generic name in the world but uh anyways that's pretty cool right it's it's the technology is almost there to be able to do this fully autonomously and so just like that we booked this appointment right and the next step is is once this appointment has been uh finished we're going to add that to our Google Calendar and once it's in our Google Calendar then we'll go back and notify us that everything's been taken place right so obviously that's super super cool let's go ahead take a look confirm that it is in our uh calendar which we can see here and if I Circle back we should have gotten that message back just saying hey everything's confirmed at this date and time so that's just one of the many tools that we can do here now the next thing that I want to do is talk about documents right so let's say for example we want to upload a document like receipt or a contract and then automatically send that to Google Drve or to Google Sheets let's do that please upload this document to Google Drve and sheets and so just like that we can enter that in to our messaging platform and by the way this can be telegram it can be twillo it could be WhatsApp could be what whatever it is that you want I'm just using telegram because it's quite easy to set up here and so once that's been officially uploaded we're going to take that document and then we're going to run it through our AI agent one more time and we're going to send it over to the right tool now this tool is going to take that document and it's going to upload that into our Google Drve account here and we can see that document just coming in right now and I'm actually going to take a look at this document right so there's a lot of information here and maybe we want to strip info off of this so for example maybe we want to take line items because there's just so many different line items here and we can just take that data and we can insert that straight into a Google sheet just like this so in this example I think I ran it like twice here and I forgot to clear it the first time but essentially it's pulling in all of these additional line items and sending it straight into the Google sheet right and so that's really really cool it's going to notify us that after it's been successfully uploaded that we've done it and we're good to go right and so that's the second tool now moving on here we can also manage our inbox we can also manage our calendar invites all straight through this AI agent as well so I'm going to go ahead and schedule a uh coffee uh appointment with jonno tomorrow at 2 p. m. hey can you please schedule an appointment with jonno for 2 p.
m. tomorrow for coffee not only do I want you to send this or create a calendar invite but please send him an email confirming as well and so we're going to send that message off it's going to transcribe that message send it to to the right AI agent the first thing that we want to do is first of all take a look at our Google Calendar make sure that everything's confirmed and we're actually available at that time and then it's going to create that particular Google Calendar event and then send off an email to jono notifying him so we have the Google Calendar event scheduled here let's go over to our inbox and we also have our coffee appointment confirmed as well and you'll notice here that I literally didn't even put in an email address it pulled out that email address just by me saying the name jono how cool is that right that's that's really really powerful stuff we're going to be going into how to build that out in this tutorial I'm just going to Showcase a couple more things here the next thing is is of course if you want to manage maybe tasks or all that kind of stuff we can do that straight through air table so I'm going to go ahead and this time type out a message instead of saying it please create a task in airt able um to go to the gym tomorrow I'll send this off and it's going to call the correct tool which is air table and it will create that task for me here right and then it's going to notify me that everything is good to go and it's sent off let's take a look at air table and we can see this next task here which is to go to the gym but maybe I'm like man like I'm I'm feel feeling kind of lazy today I got to change this priority to hide because I know if I change it to high well then I'm definitely going to go and so we can come back here and follow up and say um please change the priority to high and just like that it's going to actually do a couple things it's going to remember the record ID and then it's going to update that so we're actually building in storage memory all of that kind of stuff and it's now changed that priority over to high now the last thing that I want to showcase here is that we can do tons of things on social media as well so the last thing I'm going to say here is please generate me a blog post about the rise of AI agents once again the rise of AI agents so we'll send that off and it's lastly going to go to our social media posting tool here and it's going to go ahead and generate a blog post for us now keep in mind that we do not just have to create blog posts we can also you create posts on X or LinkedIn or WordPress or whatever it is that we want to generate posts on let's go back and we can see that the blog post has been created and we've sent a message back to ourselves let's take a look at this and we can see our blog post titled the rise of AI agents Transforming Our interaction with technology so that's obviously really cool we could obviously upload that into WordPress or or send that to wherever we want maybe even Medium as a Blog posting platform as well and so this is such a powerful AI agent it could potentially run your life of course these are just six incredibly um useful tools but you could literally just hit this plus button and add on any tools outside of this scope that you want to add on and maybe even expand this to double or triple the size and just run every single part of your life it's like having a mini AI virtual assistant that's just going to help you with all of the heavy lifting with all the tasks that you probably hate spending time doing if you guys want this particular blueprint and all of the additional six other blueprints as to how to build this out it's all going to be free in the description below all you have to do is download the blueprints come into your n8n account hit these three dots in the corner and you're going to um import from file all of the blueprints and you'll have this in a matter of seconds we're going to be building we're going to be talking about how to build this out from the start all the way to the finish line so that if you guys do decide to use this you know exactly how to set this up tweak it and make it optimized for your use case scenario let's get into it just before jumping into the workflow I want to let you guys know that I just released my school Community yesterday so if you guys are interested in learning more about Ai and automation get direct help from me whether you're stuck with problems you want to learn from over 100 unreleased videos or you want to jump on live weekly group calls and just be surrounded by a network of amazing people that love automation this is the place for you so let's dive into actually building this out so the first thing is is that we have this telegram trigger here and this is essentially saying hey when we receive a message in telegram let's go ahead and start this particular workflow now you don't just have to use telegram you could use WhatsApp as well or you could use twilio now twilio is just a software platform to allow you to send like text messages and receive text messages so that's another option too I just happen to use uh telegram here just because it's way faster and way easier just to get your foot in the door and get this up and running really quickly now essentially what we're doing here just at a like a 40,000 foot view is we're taking this telegram message and we're sending this into the AI agent right now the thing is is that we are receiving multiple different messages so it could be a text message here it could be an audio message and could also be a document right and so the thing is is that we need to treat these differently so if it's an audio message the first thing is is we need to get the file we're going to need to then transcribe that file and turn it from audio into text if it's a text file luckily there's not much we have to do and then also if it's a document there's not too too much we have to do now the only problem is is that we need to use this merge field here to essentially get the data into this field here this text field now the problem is is that all three of these fields whether it's the documents or the audio files or the text they all give these different Keys here and so that's problematic because because we need this to all be one standard key otherwise we're not going to be able to reference the doc the data properly right and so how we do that is through the merge field so I'm going to switch over to my Blackboard here and just show you guys what this looks like because I think it's a bit easier if I write this out so we have three different data types here we have documents we have audio files and this is supposed to be a phone but you know it's my writing is absolutely horrible and then we have text here right and we are send these into a merge field here and this merge field is essentially where we get the data and then we send it into the AI agent right and the AI agent needs to take the data in a certain way and we're that certain way is through a key value pair and that key is called text here right so if we zoom out and we go back we can go into the AI agent and we can take a look and see that the key here is text so we need to put it here and we need it to be standardized across all three Fields whether it's a document audio or text file and so how we do that is we're just essentially switching the keys here so this key is coming in as caption this key is not even it's not even giving us a key it's just giving us an audio message and this is giving us a key of text and what we're doing is we're taking all these keys and we're merging it together into one key and we're saying hey no matter where it's coming from we're changing changing the key to text so no longer is this going to be caption it's going to be text no longer is this going to be an audio it's going to be text no longer is well this is going to stay the same and be text so no matter where the data is coming from right it's all going to land right here so that we can proceed forward with a standardized field which is the text field enter that into this particular AI agent and now we have the same text no matter where the data is coming from document audio file or text field inside this AI agent we have a system message which essentially just goes through and labels all of the tools and and talks about how to call them so for example call the book hair appointment tool to book a hair appointment at the barber shop before calling this tool please call the calendar tool to take a look at my calendar availability so that I don't book a conflicting event passing my calendar appointments for the next two weeks just to make sure you know if the agent calls that calendar or that uh Barber Shop they have my availability for for two weeks so there's no conflicts going on um and so on and so forth so this is just essentially the instructions we have rules down here as to what to do and what not to do this is all going to be in the blueprints if you guys want to download this for free and then once we um with the AI agent tool we're essentially sending the output back to telegram so once we get a response from this we're sending it back to Telegram in terms of this AI agent there's three components to it there's the chat model you can think about this like the brains of it this is like a mini chat gbt which sends messages retrieves messages and processes things so it's like the brain behind the operation understanding what to do next and then we have this memory section here which is just providing um memory for past messages and so why this is important is because let's say we all of a sudden wanted to update this particular task here so we create it in one step and then we want to go back and update it with the memory we're going to remember that we already created it we're going to remember the record ID and then we're going to be able to retrieve that record ID to change for example the priority from medium to high right and so that's where the memory comes in so that we have access to past messages and we can adapt the conversation accordingly and so we also have uh all these tools here now these tools are really powerful let's go through all of them together just a brief overview so the first one is a calculator in case you want to do math or anything like that it's just built-in native there's really nothing else that you need to do then let's go over this voice assistant so with this voice assistant it's um more or less just a few nodes here the first thing is is we have the trigger here which is when executed by another workflow it's going to start so essentially more or less this is only saying that hey this workflow starts when it's being um called to start by another workflow so only start this when another AI agent like this says hey we want to start this tool and so when we start it we're going to do something called an HTTP request now an HTTP request is um you can simply think of it like literally doing anything like sending something to Google Drve or to Google Sheets or to air table the only difference between these is that with Google Calendar they actually have the built-in integration here like you can just select like you know tools and Google Calendar but the thing is is not all these applications have like native Integrations and that's where HTTP requests come in because all of these things technically are HTTP requests it's just that instead of having native integration we actually have to build the integration ourselves and that's that's where an HTTP request comes in because we're essentially building this ourselves and so with this all we have to do is if you download the blueprints you really don't have to really change anything other than just swapping out your authorization key here right this is something that you can get in vapi we're using vapy here which is a AI voice agent that can essentially do your calling for you and so that's more or less all you have to change out here everything else is going to work outside of the box the only other thing that you may want to do here is just switch out this Json and so if I log into my vapy account here and I go to the dashboard you're going to have to sign up you can get a free account and do most of this for free um all you have to do is change a couple different keys here so once I log in here you'll see that I have this phone number key here right and we need we just need to place this ID in here and how we get that ID is if we go into phone numbers in vapi and we just get this ID key right here we can just paste that in or you can add phone numbers and there's always going to be an ID key there the next thing is is that we have this assistant ID which is right here and again you can just choose like the assistant or The Voice or all that kind of stuff and so um you can create as many assistants as you want here and then that ID is going to be here Ava and a phone number are going to come by default in vapy so you can just plug and play this in in like two seconds once you create your account and then you'll just want to choose the number that you're wanting to call and lastly you're going to want to put in the first message which is essentially when that call goes through what's the first thing they're going to say and in this case Ava said hey I'd like to book a hair appointment and then the context down here which you can just think of like a classic prompt where you're just essentially saying hey this is what I want it to do right and I'm passing in additional variables like book a time between this time and this time right because if you're booking a hair appointment obviously they're you're not going to know exactly when they're available so you want to give them a Time range to work with and so on and so forth so this is essentially The Prompt that I've gone ahead and created here now once we have triggered this this is going to start the call right and the problem is is that with this section here we need to wait until that call is done and there's a lot of different ways to do this I just found that this was the easiest way using naden and so what we're doing is we're essentially having another HTTP request waiting for that call to come in and once that call has been completed we're going to retrieve everything we're going to get the call log we're get everything from it and then we're going to return that but the issue is is that this call could take 30 seconds a minute 2 minutes and so what we're doing is we're just setting up a wait SE section here where it waits 5 seconds and if the call has not been completed it's going to uh request again to see if it's been completed if it hasn't been completed in 5 seconds it's going to wait another 5 seconds and then keep going through this Loop until this call has returned back saying hey it's been successful we have ended the call and once that is complete then it's going to finish the call wrap it up and then send it back to our main AI agent here and so that's essentially how this Ai call or voice agent works and you can have one voice agent here you could have 20 voice agents here um if you wanted to get super technical I'm sure that you could pretty much incorporate 20 different variants of AI agents within this one module here and then tell it hey this is for hair appointments and this is for um I don't know calling you whatever whatever the case may be right so um I that's so bad I can only come up with one example right now but anyways moving on um the next one here that we're that that I want to talk about is um actually uploading documents into Google Drve just like this this uh this document here right and so how I built this is again it's being called by the main workflow here so when we send a message through telegram that's being received in the documents workflow right so this is calling sub workflows then it's going to start this first thing I want to do is I want to get that file so we're essentially passing through the ID of the file from telegram so message comes in in this message it's going to store the ID we're going to pass that to the tool here and then once it's in this workflow we're going to download the file based on the ID that we had and we got this ID again because um well we had to essentially we had to upload it to telegram here so it's being passed in here all the way into this workflow then we're going to upload that to Google Drve we're going to download it again from Google Drve because when we download it from Google Drve it gives us the right format that we're looking for which is this output here which is like an actual binary document and then we're going to extract the text from that PDF file and we're going to turn it into like Json data here pretty much and so once we have all or sorry text here and once we have all this text then we're going to run it through chat GPT and we're essentially just going to say hey I want you to pull out all the necessary information and you can structure this in any way you want right there's there's a million and one ways to do it but essentially we have three messages here the system message you can think of as instructions so I'm just saying hey you're an intelligent bed extracting data from documents the second message is a user message and this user message is essentially saying hey this is this is the input so user message is the input this is what I want you to do so I want you to take these line items or the we want to take this information out of this document and then lastly and most importantly we have an assistant message and you can think of the assistant message as the output so system message is the information or the context user message is the input assistant messag to the output and we're just essentially saying hey we want you to structure this in Json data and this is essentially exactly how I want you to structure it if you guys are unfamiliar with Json no problem this is super easy all you have to do is head over to chat GPT and you're going to effectively just ask it uh can you please generate me Json data for an invoice right and it's going to give you Json data and all you have to do is hit this copy button and if maybe you don't want the due date you can just remove this this and copy it and put it back into your uh section here and then you can customize the data that you're pulling out if you're like hey I want to add something in here you just say hey can you add in this additional thing can you add the date in or whatever can you add the due date and then it'll pull that in and and and you can use that here and it'll pull out that data and then you can push that into a Google sheet just like this right and so how we're doing this is once we've pulled out the correct data it's going to look like this on the side here schema might be a bit easier to look at but essentially what we're doing here is we have this array and an array is just a fancy way of saying a list and this is the this is what an array looks like in nadn and an array is just a list you can think of it like a grocery list I'm going to the grocery store and I'm going to buy apples bananas oranges same kind of deal but inste instead of this the the list is going to be line items of this document so we have a list of all of these line items DJ service deposit DJ travel deposit DJ parking deposit we're going to pull out each one and add them into this and we're going to do that one by one and so we have this data and the split out is an iterator what an iterator does is it takes that list of nine line items and it goes through it one by one first we're going to do this one once that's been added to the sheet then we're going to do this one added to the sheet then we're going to do this one and so on and so forth until it's all done and added into the Google sheet now the next um subflow that I want to talk about here is the Google Calendar appointment and so we have this Google Calendar agent here as well that essentially manages our entire calendar it allows us to add the coffee appointments onto the calendar the barber shop appointment allows us to delete it update it all of that kind of stuff and so how this works this is really cool is again it's called from the main agent these are all called from the main agent and then we're going to take a look and see hey are you providing us with a name and so if we look at the data here maybe it's providing us with a name here and is like hey I want you to add this person as uh an attendee onto this event well you can simply just pass the name and the first thing it's going to do is it's going to pull that name in and it's going to search for that contact in Google contacts so I'm just going to run this to load in some data here and you can see that essentially it's like saying hey invite jono for coffee at 5m jono and as long as you have these contacts in your Google contacts it will find that person based on their name here and you can see here it pulled in the data gave me my email here and my name and all that kind of stuff and then I can just add that in that person onto that Google Calendar event I literally just created another one here and I just added myself as a guest onto it via that email so that's that's really cool stuff and with this we can update events right we can delete events we can get all events we can create events we can create it with attendees all of that kind of stuff right and so this is kind of like a sub um this is like a sub AI agent so you have one main AI agent that is now communicating with a sub AI agent and we're sending data or tasks to this AI agent to complete so you can see here it's like sending a message invite jono for coffee at 5:00 p. m.