Create REALISTIC AI Voice Agents (That You Can Sell for $1.5k+)
45:43

Create REALISTIC AI Voice Agents (That You Can Sell for $1.5k+)

Nick Saraev 27.02.2025 62 714 просмотров 1 649 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
Join Maker School & get automation customer #1 + all my templates ⤵️ https://www.skool.com/makerschool/about?ref=e525fc95e7c346999dcec8e0e870e55d Want to work with my team, automate your business, & scale? ⤵️ https://cal.com/team/leftclick/discovery?source=youtube Watch me build my $300K/mo business live with daily videos + strategy ⤵️ https://www.youtube.com/@nicksaraevdaily Make.com & VAPI Webhook Templates ⤵️ https://leftclicker.gumroad.com/l/nepczn Summary ⤵️ Voice agents are getting pretty good. In this video I show you how to build one with VAPI, Make.com, and a little bit of old fashioned engineering 🕵️♂️ My software, tools, & deals (some give me kickbacks—thank you!) 🚀 VAPI: https://vapi.ai/?aff=nicksaraev 📧 Anymailfinder: https://link.nicksaraev.com/amf-short 🤖 Apify: https://console.apify.com/sign-up (30% off with code NICK30) 🧑🏽💻 n8n: https://n8n.partnerlinks.io/h372ujv8cw80 📈 Rize: https://link.nicksaraev.com/rize-short (25% off with promo code NICK) Follow me on other platforms 😈 📸 Instagram: https://www.instagram.com/nick_saraev 🕊️ Twitter/X: https://twitter.com/nicksaraev 🤙 Blog: https://nicksaraev.com Why watch? If this is your first view—hi, I’m Nick! TLDR: I spent six years building automated businesses with Make.com (most notably 1SecondCopy, a content company that hit 7 figures). Today a lot of people talk about automation, but I’ve noticed that very few have practical, real world success making money with it. So this channel is me chiming in and showing you what *real* systems that make *real* revenue look like. Hopefully I can help you improve your business, and in doing so, the rest of your life 🙏 Like, subscribe, and leave me a comment if you have a specific request! Thanks. Chapters 0:00 Introduction 1:27 Scheduling a Quote 2:06 Understanding AI Models 5:56 Setting Up Assistant VAPI 7:38 Exploring the Dashboard 10:15 Cost and Efficiency of AI 13:21 Configuring AI Assistant Functions 17:40 Building a Tool for Calendar Events 25:34 Testing Calendar Availability 27:43 Integrating Google Calendar 31:55 Transforming Busy Information 34:59 Finalizing Calendar Availability 39:50 Booking Appointments with AI 45:20 Conclusion and Future Opportunities

Оглавление (14 сегментов)

Introduction

what's going on Steph how you doing today hey there I'm doing great just chilling and ready to how about you what can I do for you today fantastic I'm just looking for a quote for uh my property awesome I can definitely help with that first could I get your full name please my full name do you really need all that well I mean it's kind of like a secret handshake but for CS just helps us keep things organized you know so what's your name okay I'll give you my first name it's Nicholas thanks Nicholas that's a solid name now can I get your address please yeah it's a 100 barard Street do you mind spelling my first name back to me short that's ni h o right no it's ni k o actually oh go n i k or NS thanks for correcting me no when do you want to schedule that quotee got a date and time in mind uh do you mind giving me your availability for I don't know like tomorrow maybe no hold on February the 28th at 3 p. m. checking down great I have some times for you do you have your calendar handing yeah I do I can book anytime let me know also I've got availability to you on February 28th at 9:00 a. m. 10: a. m.

Scheduling a Quote

and pretty much any anytime after that until 5:00 p. m. what works best for me can we do 9:30 how long are quotes sweet a quote usually takes about 30 minutes you'll be in and out in not time so to confirm I've got you down for February 28 at 9:30 a. m. sound good yeah that sounds good add Dr you've been op do you need anything else while you us uh maybe one final funny joke all right here it goes why did the air conditioner break up with the heater because it needed some space you got my business that's for sure thank you very

Understanding AI Models

much Stephen okay so that was Stephen my HVAC booking bot you can set this sort of thing up for basically any business in less than half an hour in this video I'm going to show you how to do it using make and vapy to super simple tools but I'm also going to help instill the principles and strategies you need to really copy and paste this on any no code platform and any voice platform as well let's get into it okay just before I actually go ahead and build it let me run you through what's really happening under the scene so we obviously have some sort of user right that user in my case that's me what I'm doing is I'm speaking into a model now the model itself is composed of a bunch of submodels it's not actually a unified model it's not like we're speaking to one unified thing um we may think that the output is a unified thing but in reality it's working in concert with four different components the first is we have what's called Speech to Text Okay speech to text is exactly what it sounds like it's a program or in our case probably a very element AI model that takes as input a bunch of speech AKA sound and then it converts it into text speech to text models are also typically called transcription models so you know I say high okay High which is you know high. MP3 It's like a it's like a sound becomes High um as like a txt and that's all this stt model does after that we now have a big string of text just like anything else so because it's a big string of text obvious L we can now feed it into AI um so after the stt what we do is we feed it into a reasoning model now this reasoning model is usually like GPT 40 mini or something maybe five or six by the time you're watching this who knows maybe AIS have turned the whole world into paper clips and you're actually a robot yourself um so GPT 40 mini basically has some instructions right you are an assistant you do you know book somebody basically here is the prompt okay and then uh sorry here is the input and then what they'll do is you know you have this kind of prepended prompt where it tries to tell the model what to do and then it provides the input which is the thing that we just speech to textify which is high and then it you know it goes through some big reasoning thing the big neural network and it comes out with an answer okay after the answer well it's one thing to see text on a screen but it's another thing to hear it you know said back to you by an artificial intelligence so what we do is we do the inverse of the St we do a text to speech okay so instead of transcribing we're now taking a string of text we're turning it into a sound so now this is like you know thank you let's say dot um mp3 again now what we do is you know in our case vapy we have some sort of like user interface which sometimes adds an additional bit of lag or whatever but anyway this is basically what's going on under the hood now the reason why these are actually to the point where we can you know have a conversation with them just like I was doing back there is because this whole step here this used to take a very long time okay and now you know when I said a long time I me like 1. 5 seconds or something like that um and you can't really have a conversation with a human being at 1. 5 seconds it's like hello hello how are you just sounds weird right um now that's kind of down to around 0. 5 to 0. 7 seconds and now it's like hello hey how's it going no I'm doing great thank you very much how are you doing oh fantastic my wife Stacy just bought me some you know X Y and Z like we're getting to the point where this is actually reasonable but I just want you guys to know that all this stuff is happening behind the scenes and under the hood it's important that you understand that because the vast majority of like um issues with models like this or approaches like this they just stem from one of these could be the stt could be the reasoning model could be the TTS um and I guess it could be the user interface for using VAP or

Setting Up Assistant VAPI

whatever let me actually walk you through what this is going to look like now so the very first thing we're going to have to do is set up um an assistant vapy so I'm going to go through log out and just pretend I'm making a new account just to show you guys what this looks like in order to do that we just go vy. and we click um at the top right hand corner I think for you it's going to be open dashboard that's going to ask you to sign up okay take you to the same page that I'm at um right now so then you enter your username and password whatever you want then you want to create an account oh sorry I failed my sign up because I'm not actually I don't actually have a username or account at this um email address so now I'm going to put in uh my own username and password we're going to go through their onboarding flow it's probably going to send me an email yep check your email for the confirmation link let's do it just exit out of this I have a million in one tabs open and now uh we're going to confirm the signup so I'm just going to copy this link address and actually go back here and paste it in sometimes you have to do this because the services that you're using re you to um confirm your email in the same tab that you uh requested it in and then on the left hand side here if I just zoom in a bit we got a bunch of different things assistants workflows phone numbers files tools blocks whatever the one you're going to want to use is this assistance call okay now they'll give you Mary's dental and appointment schedule right off the GetGo just so you could see how this works but I want you to know that like this isn't enough to actually do the thing that I showed you in a moment because this is all on vapy and VAP is great and all but it's just like it's just a conversational model it's an engine if you want to take that engine and if you actually want to do something with it you got to stick it in a car you got to slap wheels on it you got to put a steering uh wheel on it handbrake and all that stuff that that's kind of where a no code tool comes in

Exploring the Dashboard

okay but anyway just to walk you through what I'm seeing here on the right hand side obviously we have the title up here and you can change this title however you want so maybe I'll go back to Steven or something let's call him him George um next up we have the assistant ID all the stuff that occurs that you see written here in sort of monogr or whatever the name of the font is mono code um that has a copy assistant ID and then maybe a little demo button all this stuff is just important for us to use in the API so anytime you see that just know that like that's where you with your developer hours um are going to be coming in we then obviously have the talk with assistant button we have the ability to check call logs we can duplicate the assistant you can also delete the assistant underneath you can see we have a bunch of boards the First shows us our cost so we can actually see how much cost it it will take us in order to communicate with the model now this one is 9 cents a minute I just want you to think right now about how much secretary or a front of Staff assistant usually costs it a business front of staff assistants you know can cost between 20 to 30 bucks an hour let's say 25 okay 25 divided by 60 technically puts their hourly rate at um 41666 okay which is 40 cents a minute this model is 9 cents a minute now you might be thinking well actually Nick that's not as big of a differential as I was thinking um and you'd be right except the way that these models work is you're only getting build when somebody's actually having a conversation with them so as opposed to an assistant that you might hire to manage your front of house that you might have to pay for 80 90% of their time being completely and utterly wasted with a model like this what you end up doing is you only pay when you absolutely have to when somebody comes in and is legitimately looking for somebody at the front of stock so you have no excess wastage basically you're basically capable of keeping your services always on and it's not all or nothing you don't have to use an AI front of St uh front desk agent or um real human being front desk agents what you can do in practice what I see businesses do is they tear it okay a lot of requests tend to come in during times that front desk staff aren't available what you do is you introduce Ai and sort of this 247 omnipresent um Staffing Agent or booking agent on the hours where the person is not at the desk they could still have requests handled in real time by some sort of assistant to the business and then you know maybe higher Roi queries are directed and handed over to human beings but anyway um I'm getting ahead of myself here the point that I'm trying to make here is this 41c differential if you assume that 70% of time is unutilized what you really end up getting

Cost and Efficiency of AI

is the actual cost of this agent is more like a dollar sorry the actual cost of a secretary a human one is actually about a138 a minute um and if you contrast that to how much this costs we're at about a 15 times differential so the math equation you should be doing in your head is this agent 15 times better or worse basically than um the a real human being and if the answer is there's like a smaller differential than a 15x then it's worth it to use something like this okay great so um that's the cost in the left- hand side latency very similar to what we just went through it's about 750 milliseconds right now the time is made up from the speech to text the model that we're using gbd4 mini um the Texas speech model that we're using in this case caresia and then the Mode web um it just takes an additional milliseconds to push it to web but you have a variety of other ones you could use you could do twilio vonish these are just direct sources that typically for my understanding take less time than the web one does and then down here really is the most important part of our dashboard we have the model so the first message is the very first thing that the model will say when you turn it on in our case it's pre-programmed with hello this is Mary from Mary's Dental how can I assist you today the system prompt is you are a voice assistant for Mary's Dental a dental office located at 123 North Face Place Anaheim in California the hours are 8 to 5 but they are closed on Sundays Mary's Dental provides dental services to the local Anaheim Community yada yada y the most important part I find here is if you want these to work well you basically need to bullet point list the steps that you want the model to take and you can't have too many I've experimented with like seven eight and they tend to get lost and muddled just because these models don't really have very good long-term memory my recommendation is keep it to three to four maybe U make sure that you're getting the full name you know make sure you get the email if make sure the user spells it out letter by letter and that you have some sort of prompt to say it back obviously go nuts here the purpose of this is just to get you from zero to one and then uh you know have something in there that says that this is a voice conversation keep your responses short like in a real talk don't ramble because otherwise you know we tend to use all of the tokens that are given to us and that does two things one outputs take a little bit longer when you use all the tokens um so the conversation is going to seem as if you are like it's going to be more similar to talking to a it's going to conform people's expectations and they have to wait a little bit which kind of sucks you know the whole point of this is to make them think it's a real person uh and then two it's going to favor casual language stuff like you know um well I mean maybe yeah kind of right these little mannerisms and so on and so forth that make people think it's a real human being okay great um then up here you can choose the actual model you want to pick so in my case I'm just defaulting to open AI GPT 40 mini you can also add a knowledge base although keep in mind that at least in my experience when I do this tends to be a little bit slower because now we have to run what's called retrieval augmented generation in addition to this but super easy it's one click right just click add a new knowledge base and then um the documentation here allows you to pick a file upload it and go from there then you can you know change the temperature max tokens and they have the ability to detect emotion I don't recommend this feature just because you can get the vast majority of the data you need just through text and it's going to be a lot faster because of it so we have a bunch

Configuring AI Assistant Functions

of other settings here I'm just going to gloss over them um until we get to the one that's really important just because feel free to check this out in your own time there's a lot of cont text here most definitely um you know you can choose the voice and so on and so forth what I'm going to do is I'm going to go down to functions because functions is sort of how we put the chassis around our agent so for instance let me just talk with this right now okay and I know that it's George we're using a professional woman for now I'm just going to say Mary I'm going to talk with it I'm just going to ask it a couple questions ask it to do things for me okay and I just want you guys to see what it does oh this is Mary from Mary's Dental how can I assist you today hey Mary I'd like to book an appointment awesome let's get you in first things first what's your full name it's Nicholas sarif nice to meet you Nicholas what's the purpose of your appointment I feel like I have a root canal issue and I want an appointment with a consultation root canals can be a pain in the tooth now when do you want to come in for that consultation I'm thinking February the 23rd cool and what time works for you on the 23rd let's do 2 p. m. good so just to confirm you're booked for a consultation for your root canal on February 23rd at 2 p. m. sound good yeah absolutely thank you Mary anything else I need to do Nicholas just bring your Charming self and we'll handle the rest have a great day thank you very much I appreciate it so that sounded great and you'll know that it was extraordinarily confident in telling me that I'm booked in and all that stuff the unfortunate reality is nothing happened so how do we actually bridge that Gap how do we get a model which may be a great conversation partner to actually go and do things in the real world well that's where a tool like make. com comes in okay so the way that vapy allows you to add the rest of the elements to this car is using um this functions tab and they've since launched an additional feature or they've changed the feature a little bit so instead of being called functions they're now called tools let me run you through how they work and exactly what you need to do to get up and running so the very first thing I'm going to do is I'm going to select create new tool tools are functions you make that can be utilized by your assistant in calls you can connect external automation tools like make go high level or create custom tools for assistants to use let me click new tool here what you'll see as of the time of this recording anyway we all know that these tools change very frequently so if it doesn't look just like this don't worry too much we have three options we can choose a custom tool a make. com scenario as a tool or go high level now they're probably going to be adding more native integration Partners over the course of the next little bit but for now we're just going to use Custom Tool because if you think about it if you use a Custom Tool and you figure out how all that stuff works odds are you're going to be able to do anything else cuz custom tools are the hardest okay so I'm going to head over to my make. com scenario over here let me just make a new one and I'm going to organize my stuff in this folder called vapy voice agent this was a tool that I just built earlier today to verify that everything was good what I'm going to do now is I'm going to rebuild both of these so I could show you guys how to get and book calendar events and I'll also give you some top level instructions on how to do other things as well so we'll go one YouTube Tool I'm going say get calendar event so if you think about it logically in order for us to make some sort of actual business bot some sort of conversational thing that does something we kind of need at minimum two features at least for a front uh desk staff member we need the ability to get calendar events so things that are currently booked in a calendar for a specific date and time and we also need the ability to create a new calendar event at minimum now there are certainly other things you might want to add in the future like the ability to delete a calendar event or the ability to schedule maybe a recurring calendar events or higher level functionality but basically every everything there all of the additional functions that you might want they're just like permutations of these two things they permute on the ability to get a list of stuff from your calendar then add something to your calendar make a

Building a Tool for Calendar Events

change to it okay so we're going to cover these two and then you guys can go nuts after that the very first thing you need in order to make a tool in vapu work so we need to click on this little purple button here just type in web hook okay logically in order for us to have this connect to make. com we need to have some something that's listening some sort of web hook listener and I realized I clicked the wrong button actually don't click web hook response click um custom web hook right over here we're then going to create one I'm going to call Mine vappy YouTube it'll say one and now we're going to have an address here that I'm going to copy to the clipboard I'm going to head back over to my vapy assistant and I think I have two tabs open here right okay yeah I do so I'm going to go to this one because this is my new bot where it says Custom Tool I'm going to paste in the server URL for my endpoint now there are a couple of gotas here so um you know if you're watching this video because you've tried doing this and you've had some issues let me walk you through exactly how this looks it's going to ask for a server URL secret token I leave that out it's going to ask for timeout seconds I leave that out headers I leave that out just click save from here what you have now is you have your server URL basically this is an accessible tool that you can send stuff to but what we need to do is we need to define the data that we're going to be sending right so obviously if asking our tool to check the calendar we're going to need to provide it some sort of date and that's where this next step comes in so I'm going to call this date time just in case the person asks for a time I'm just going to say actually no let's just do date um because even if the person asks for a time why don't we just get all of the calendar information then from there we'll be able to determine the free and busy times and then profer something back that probably makes more sense next in natural language we need to describe what the property is now a big issue that a lot of people have with VAP unfortunately is when they try and do these calls their date always comes out crazy wrong formatted and it's just it's I don't know sometimes it says February 27th written out other times it's I don't know 02 0225 or something like that you know they're all these different date and time formatting so I prefer to standardize them I'd say the date and time let's say the date provided in ISO 8601 format is just one of many standardized dates that you can write this is what it looks like and is this an XKCD ril or something like that I don't know it kind of looks like one but this is how ISO 8601 format looks like the good news is I've tested out um iso8601 with a variety of models and like 99. 9% of the time this is all you have to say and it'll do it right so for instance you know this would be February the 2nd February the 27th 2013 it's kind of interesting how I just mentioned February the 27th like 10 times and this ended up being the date that they provided me as an example odd but anyway um so Define the date very strictly and it'll make everything a lot easier for us later okay so the date provided in ISO uh 6 8601 format it's going to be required okay and we click next now we need to call this tool something I'm just going to say get calendar availability I'm going to say don't ask again for the session dash line before I um eat a shoe uh describe the tool its purpose its use Etc what we're going to have to do here is say what the tool does so this tool gets calendar availability from the HVAC Central HVAC booking calendar okay it takes as input a date formatted in ISO 8601 format constructed in ISO 8601 format and returns a string of availabilities the assistant can use to book a new appointment I'm going to click next here and now we have the ability to send some start messages delayed response messages success messages and error messages now these are uh pretty misunderstood I would say my recommendation here is leave these all extraordinarily brief because if you don't sometimes the model is going to add a bunch of additional words to the beginning or immediately after and the context is isn't going to make much sense these are always going to be the same things every time basically so you just want to make them seem incidental for instance start message for me my best results have always been if I say something like booking now or something or in our case it'll be I'm checking now delayed response message could be as simple as a hm success message could be like got it an error message might be like give me a minute and what you'll see is I'll show you examples of this but when things work okay so first of all the model will say you know oh what times are you available what times you want me to check oh February the 27th okay great let me check that checking now right even if it says the word check before as long as I keep the start message really short it actually doesn't sound super weird it can actually be sort of conversational or a success message right checking now H got it right that actually sounds reasonable if instead you said something like I have acquired a list of events for your calendar then it'll say like you know I've acquired a list of events from the calendar um the says and it just seems kind of weird it seems kind of inhuman so fortunately for us the design of this is just as important if not more important than the actual technology underlying it and you just want to make sure that the packaging is really nice okay so we have the date over here um awesome I'm just going to refresh this tools board and then I'm going to set up the calendar availability what we're going to do is this is my tool called get calendar events the very first thing that always do here is actually just check to see if I can receive and then send back data so receive we're going to test that in a second to send back what you need to do is you need to use the web hook response node and you always need to return things in Json now another big gotch that a lot of people have with this is they don't realize that vapy requires a specific format um if you haven't uh constructed Json before just head over to vapy Tool structure there'll be a uh piece over here I think I'm going to find it for us anyway okay right over here um with a result uh parameter inside it'll be an array of tool call IDs and then results so in order for this to work we actually have to copy this and we have to use this as the body okay just like this now tool call ID is actually going to come directly from the model in order for us to run this and test this we actually have to screw up once and have an error so let me show you what that error looks like I'm going to run this now I'm going to go back to vappy go to my new super beautiful assistant Mary and we're actually going to um try and call this basically try and call the calendar booking so in order to make this work I need to click publish now you need to go over to functions and then down to get calendar availability actually add this so now I'll click publish this is going to publish the model that now has access to this get calendar availability tool and now when we have a conversation with it it'll know this is Mary from Mary how can I assist you today hey Mary I want to check availability on your calendar for February the 27th February 27th well I can totally check that for you just give me a sec to grab the schedule one moment checking now give me a minute okay so do you see what I mean with these short error messages right it tends to add a lot of information before and after the um templated bit so if you keep them shorter results are usually substantially better but anyway that's not the most important thing is we just received data and then we sent it back using make so we've caught it and then we've

Testing Calendar Availability

returned it if I go and make here you'll see that we now have a message object that's coming with a timestamp type bunch of objects the one we want here is called tool calls then we want to map this ID as our tool call ID and then inside a function what we have is we have the argument we have the specific date that we actually provideed and fed into our calendar right over here okay so how do we actually make this work with our flow well the very first thing we have to do is you have to map the specific tool call ID stick it right in there now it's going to know what the call was it'll return the answer to the specific call the next is we need some sort of result so I'm also going to hardcode this in just to show you guys what it looks like I'll say free from 2 p. m. to 5:00 p. m. and then I'll have the model tell me this just to verify that I've gotten the information through so I'm going to run this once always testing every time I make a change hello this is Mary from M Dental how can I assist you today could you check the calendar for February the 27th how are we looking so I've got some availability on February 27th from 2: p. m. to 5:00 p. m. pretty Swit right need to book an appointment super sweet thank you Mary you'll have to forgive these models sometimes they can be a little bit boisterous an enthusiastic okay so as we saw there it said checking now got it another design pattern that you might want to use is when there's a success message you might want to ask the user for something additional right otherwise they might just wait there and say got it okay so what does that mean so for instance um just because the way that these models work you can't just double up to two messages one after the one after each other maybe you'll be able to do it eventually but right now it basically always needs to be some sort of back and forth between human being and model so what you could say is you know okay checking now got it do you have your calendar open then the person goes oh yeah I have my calendar open and then Mary will automatically start providing the times that were available but anyway so um you know we we've determined that we can return data right now the data is just hardcoded so obviously we need real

Integrating Google Calendar

data right how do we actually get real data well in make it's pretty easy um you can just go to your Google calendar and there are a couple things that you could do you could search events um you could make an API call you could get free and busy information there variety of ways um if I use the get free and busy information this seems like it' be the most straightforward one but it's actually kind of annoying we have minimum time and then maximum time and the way that this works is you basically have to feed in okay you the date which is nested under function and arguments and then for maximum time what we have to do is we have to add one day to that okay so realistically we have to check for all events on the calendar and you know what I might actually set hour of this to zero and as well I don't really know why we had so many um we had such a snippet there okay great so uh now that we have this just double check in the formatting is good yes it is um we're going to need to add the specific calendar so in my case this calendar over here save and now okay what I have the ability to do is now check my calendar for this particular date I'm going to right click this run this module only and I'm actually going to verify that the date works so 2025 O2 um 27 that's my ISO 8601 format it seems like we have some error with the way that I formatted this so let me just double check so set hour I got the date then I set the hour to zero that's fine set hour zero right so I should have added this and then realistically a um zero then I should have added one there we go okay let's feed this back in the date that I'm feeding in is going to be this awesome now I'm getting 11: p. m just because of my time zone and the fact that make formats this in a really annoying way um you know it's not always like this so we don't worry too hard it's just because of where I am specifically at this moment in time make is not the best at showing you the specific date that it's actually picking um but anyway we've gone through our calendars here and we found that I'm not busy at all on this stretch of time which is fantastic for me basically means I'm free the entire day right so um what do we want to happen when we get that well there are a couple things that I could do like I could just return the busy information but realistically I find that the vapy model that we're using is not the smartest so I actually like to do a little bit of processing myself using AI on this route so what I do is I actually use the create a completion model and then I'll pass in the free and busy information into another model then I'll have that other model tell me whether or not you know I'm free or busy or whatever on that day so I will literally go like this I'll give it its own instruction so now we're kind of training an additional a model together I'll say you are a helpful intelligent booking assistant say appointment booking assistant We'll add a message here under user your task is to take as input a list of busy times and return as output a list of free times we're typically available a string of free times set plus we're typically we're always available between 900 a. m. to 5:00 p. m. you'll receive busy times as Json return free times using this format free times let's get availability string free between dot use natural language awesome now what I'm going to do is let me give it um yeah let me actually just add the let's say busy information now what I need is I need some busy information here now there are a variety of ways you could do this you could parse this out as text or you could just dump this in um as is I believe I'm not entirely sure to be honest uh we'll probably have to parse

Transforming Busy Information

the Json so why going to go back one more step here then I go let's go just Jason node uh Jason module let us transform to Jason just going to pass in our busy time now we are getting a date that I am not actually busy in so I should probably get something that I'm busy in uh O2 I think I'm probably busy on the I don't know what day is it today 26th okay so it looks like I did not get the busy information why is that uh oh right I need to defeat the first element of that array my bad and please stop talking Mary smart and lovely as you are you actually need to go in here need to feed in this whole busy object it looks like get these output bundles if I just feed this in instead and I run this but then sorry what I actually want just want I want this whole thing if I run this is this going to work it's my question uh looks like it's transforming my actual Json into adjacent string that's not what I wanted let's try that one more time cool awesome so I now have my dates which is great okay as we see here it's basically saying that we are busy from 1700 hours um GMT to 1800 hours GMT I'm now going to connect this over and I'm just going to dump this in plain text Jason's usually the simplest way to do all of the stuff but I'm just going to dump this in plain text I'll go GPT 40 mini and I guess I have to rewrite the prompt unfortunately so I must have deleted it by accident your task is to take is input a bunch of busy information and output an availability in natural language this is a string containing free info like free between 12:30 p. m. 2 p. m. cool now I'm going to feed as input another user prompt and then I'm going to say busy stick in this big long fat string this model is going to then process the information and all I want is I just want to feed in the result here okay sounds pretty simple to me let's give this run and let's see how it goes hello this is Mary from Mary's Dental how can I assist you today hey Mary I'd like to book an appointment I just want to double check your availability for February the 27th can you verify that before we proceed okay how are we looking looks like I couldn't find any availability for February 27 want to pick another date or should I try a

Finalizing Calendar Availability

different day I'm just realizing here that this model did not receive the you are always open um your hours of operation are yeah that's why I kind of screwed up there do not return anything but the Json string and when I'm all actually also going to do it's going to return everything in Jason parse Json response kind of God here what I actually want is I want um result do availability times should be good now yeah that should be fine okay and I don't really like how the tool keeps on returning um checking now H got it do you have your calendar open um checking now got it do you every count open H okay should be fine so now I'm going to run this one final time that didn't work just because the Jason that we sent back was very ugly um and now we're going to save this go back to our lovely assistant then we're going to talk with her hello this is Mary from Mary's Dental how can I assist you today hey Mary I'm looking to book an appointment but I'd like you to check your calendar availability for February the 27th before we do anything else oh sure let me just grabbed that info for you but hey before I check the calendar could I grab your full name yes of course it's Nicholas and my address is 100 barard Street do you have your calendar open I do what times are you free well we're wide open from 9:00 a. m. to 5:00 p. m. except for that sneaky hour from 5: to 6: p. m. so what time works best for you that doesn't make much sense are you free at 5:00 p. m. or are you busy at 5:00 p. m. haha good catch we're actually so I can't squeeze you in then how about an earlier time like 9 10 or maybe even 3 what do you think sure 3:00 sounds great awesome okay so we're going to need a little bit more prompt massaging to make that work iron clad like my first example with Steven but as you see we are now Trucking along we're actually making some pretty solid progress so I'm going to copy this now and we're going to make our second tool which is going to enable us to actually book The Event so I'm going to move over to vapy voice agent here we have the book uh YouTube Tool get calendar events I'm going to have another one here called YouTube Tool get calendar uh sorry book calendar events what I'm going to do is I'm going to paste all this in then go back to vaapi head over to tools now I'm just going to make the exact same thing as this tool over here um we're just going to make one small change and that's instead of get calendar availability it's going to be called book calendar availability so just to make my life easier uh I'm just going to copy this yeah and then let me just double check so checking now got it do you have your calendar open give me a minute okay we're going to Custom Tool um I need to feed in this endpoint meaning I need to create a new one and I really need to name a convention for this stuff as you guys could tell and paste in that server URL save now we can move on to the rest of this we're going to take as input a date um date constructed in ISO 8601 format so you can see here our date looks pretty good let's move over here we'll call this book calendar event books a calendar event using the central booking calendar takes us input a date construction iso8601 format and returns it's code if booked cool all right start message will be booking now delayed response message will be H success message will be like okay you're all booked and good to go do you have anything else you'd like to do today the error message will be the uh I kind of forgot what I put last time but I think it was something along the lines of sorry having some trouble booking this would you give me a minute the value there is somebody will respond with okay sure and then the model can actually rerun um without having to do too much work okay let's

Booking Appointments with AI

head back over to this assistant now let's go to functions and actually add our book calendar event as a function let's then publish this in the scenario here we're actually going to have to catch this but if you think about it we're no longer getting free or busy information we've already verified that the data is okay so actually what we have to do if I just turn off this alarm what we have to do is we have to take in our date which should already be an ISO 8601 format and we just have to book a Google Calendar event so I'm going to create an event now in my case I'm using my own calendar but feel free to use whatever calendar you want duration I'm just going to say 30 minutes the start date I'm going to be grabbing directly from the web hook okay so for now I'm just going to say um I don't know 2025 0227 and let's just go 300 p. m. for now I'm not going to be passing any information in aside from just consultation and the calendar ID is going to be my actual calendar this one here we can also create it in detail or you can do it quickly in natural language if you wanted to sorry I think this is actually 0030 for half an hour right yeah HH stands for hour 30 that would be minute okay cool me check the advanced settings see if there's anything else obviously I could add more data if I want but that's that then going to add a response we're going to need the tool call ID and the result is booked successfully obviously the idea is if you don't get the response you haven't booked it successfully um aside from that yeah I just I need to find a way to get the actual start date in from the calendar right so that's going to be uh embedded in the args I believe um let me just see what I did back here message tool calls function argument state right okay great so I'm actually just going to feed that in directly so that we can do this all in one shot okay great now I'm going to run this now we're going to go through the whole booking flow with vapy um from start to finish right hello this is Mary from Mary dville how can I assist you today hey what's going on Mary can you tell me how I book an appointment oh booking an appointment and brushing your teeth just give me your full name first yeah it's Nicholas sarf just looking to book a root canal well let's get that sorted when do you want to come in what's your preferred date and time would be February the 27th somewhere in the afternoon you have your calendar open yeah I do what times are we looking at okay so on February 27th we have openings from 9:00 a. m. to 5:00 p. m. except after 5:00 p. m. what time in the afternoon works for how about 3 perfect so just to confirm your appointment is for a rig Canal on February 27th at D sound good yeah that's up sounds good to me okay you're all booked and good to go do you have anything else you'd like to do today no I think that's it thank you very much I appreciate it you bet you're all set Nicholas have a great day don't forget to floss we'll do awesome so as you can see there uh We've now actually connected this engine stuck it in a car and then gave it Wheels we gave it the mech mechanisms that it needs in order to get out there and interact with the real world in our case we had two tools one allowed us to retrieve events from a calendar and then get the availability as you see you need to finagle and kind of massage natural language so that it doesn't do things like return you to availabilities um that are technically the same time although maybe some of that is due to some booking convention and then we also uh built-in functionality that enabled our bot to book a new calendar event in now I was just naming all of these simple things like consultation right you can imagine a flow in vapi where you go to the tool that you want and instead of just providing the date you also do things like you provide the full name okay the full name of the patient you know maybe you also do things like provide the email address of the patient right these are all questions that you add in the prompt as your agent interacts with the person and the value here is um now you can connect vapy and make to other tools that automatically have some functionality they might want for instance like a Google Calendar where once you create the event you actually automatically send them an invite now they have it on their calendar just like you do too some of the stuff is a little bit more advanced but hopefully at this point you guys Now understand the building blocks necessary to get out there and make a highly proficient booking agent we're just at the point where the technolog is getting where we can make this stuff actual business utility so my recommendation for you is start building these flows out even if you don't necessarily need them get comfortable with these voice spots and have the infrastructure in place so that when the opportunities inevitably do come and these models get even better and they start getting deployed all over the world and small and midsize businesses want more of them you can be ahead of the curve you can be the one that already has all of the infer built out can provide it very

Conclusion and Future Opportunities

easily hopefully you guys appreciated that video had a lot of fun walking youall through it if you have any questions about this just let me know um as you probably do know I do get most of my questions at this point from my audience uh I do get most of my video ideas from you guys I should say so if you guys have anything that you want me to do that I haven't already just drop it down below more than happy to otherwise if you could give me a big solid like subscribe do all the fun YouTube stuff to bump me up to the top of the ago I'll catch you on the next video bye

Другие видео автора — Nick Saraev

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник