I'm super excited to share this AI agent build with you guys today I definitely think that it's going to change the way that I do my business especially anything personal Administration related and that's because I'm going to consider this a human personal assistant except for unlike a human this thing is going to be available to me 24/7 it's going to respond to me immediately and truly it costs a fraction of what it would be to hire an actual human personal assistant so this is the build right here as you can tell the way that we're interacting with our agent is through telegram so I can pull that up on my phone or on my desktop and all I have to do is ask it to do something for me it's going to run through through this logic and then it's going to Output either a result to me or it's going to tell me that hey I went in the back end and I did that for you you know updated the database or set a calendar event whatever it may be so I'm going to walk through exactly what's going on in each step and we'll jump into each of these sub tools and all of these are sub tools that I built also with an nadn but before we get into you know the details let's just do a quick demo of what this thing looks like in action let's say you're running late to a meeting and you don't feel super prepared so you want to get caught up on emails real quick let's just go into our telegram app on the phone and type in can you summarize my emails from today then we'll see we got two emails that we want to read real quick here's a summary of your emails from today first one's from Amanda she provided an update on a redesigned project completed homepage layout updated branding mobile optimization blah blah blah the project is on task to complete by the 20th and she requests approval of the blog page mockup and details by the 14th she also invites any questions second one is from Mike Mike informed you about a billing discrepancy on the recent invoice from the 5th we were buil 550 but the correct amount should have been 475 so we have to settle within 7 days to avoid penalties and it gives us an emotes reach out to there so these two popped up in here because they were marked as unread so that's the ones that are coming through as and getting summarized for us and all the ones that are red as you can see that we wouldn't have got back even like this one um was from today but we're not getting it because it was already red all right that was a quick demo of what it looks like how it works how it interacts with us now let's look at what's actually taking place within this agent workflow so the first thing we'll look at is the open AI chat model obviously we're using um GPT 40 right here and this is just sort of the brain that we're giving to the actual agent entity itself so this is the brain right here then we've got the vector store tool this is just you know we're connecting it to Pine Cone and pine cone is the vector store database that we've been using this is just where in this use case we have contact information so you can say can you email Mike can you email Jenny and it will know how to go find Jenny and find her email address and actually send an email and then we've got um obviously you need to connect different embeddings to these tools but that's pretty much it for those and then all the other tools that we'll be using today were tools that I built within nadn so as you can tell by this little logo that just means that you're connecting a tool that you built in this software as well but we have get emails send email get calendar set calendar update database and summarized database so we'll be going through each of these tools I'll show you guys the logic behind each of these and um we'll get we'll do a demo for each one as well and since the demo we just did was forget emails we might as well hop into this one first what I think makes the most sense when I'm showing you guys each of these little workflows is actually seeing live data move through so I'm looking at an execution we're looking at the one when I just asked it through telegram to summarize emails from today and that way real data will be moving through each node and you'll be able to see it and I can explain it better and it will make more sense hopefully for everybody so all that's happening right here is this workflow is being executed by the AI agent the AI agent is call calling this tool in order to get the job done so as you can see this is the workflow trigger and all that's coming in through here is what I said in the telegram sort of a summary of what I said but summarize emails from today that's what is feeding into this whole process so this first node is an open AI node and as you can see the first thing that we wanted to do was give it a prompt so I said your job is to identify what date the user is asking for based on the Json query and what the current date is so I gave it the current date of now this is a JavaScript script code it just says you know dollar sign now and that Returns the date time of what is right now current so that's all that's happening right there and then I gave it two examples the first one is if the query asks for today you would return today's date and if the query asks for yesterday you would return the day before yesterday and sometimes you just have to outline that um it might seem self-explanatory but open AI doesn't always know that you know yesterday was the day before or two days ago was going to be today's date minus two so giving it examples in ensures that it's as consistent as possible and then down here we just have to drag in the actual information for it to use so we're dragged in the Json query which was right here that says summarize emails from today and this is what gave us as the output we got um October 11th which is in fact today so it did its job right so from there we're going to move into a Gmail node in this one we're just grabbing all the emails from the date so we can see we have get many we're getting 10 and these are the labels that we wanted to filter on so like I mentioned earlier we just want um emails that are in our inbox and that are marked as unread and then we want anything that was received after 101 so October 11th because this is the day that was asked for when we prompted the telegram and this is just coming from that previous open AI node where it gave us the date so then you can see we've got these two emails that came back um these are the ones that got summarized so if I go over here to text we have the update on the redesign project and all the way down here we've got the invoice so this is what we saw in the summarization so once we get the content of the emails from this Gmail node we want to move into another open AI node to actually summarize this information so we said your task is to give a concise summary of the emails that you will receive please include who it's from and the text of the summary of the email so if we click in here we can see that the live information is coming through we've got it's from Nate herkelman and we've got the summary of the email right there and we got this on the left hand side we'll just close out of headers we Drgged In text right here because because this is the sum this is the actual email content and then if we go down more we can see we got who it's from so we have the name and address right here so I just dragged in the from into this column so that that's the information that it will use and then on the right we can see the output we've got this first email and we've got this second email and they're summarized a lot shorter to actually be sent back to us on telegram the next up we just wanted to aggregate those real quick so a simple aggregate node rather than outputting two items we wanted to Output one otherwise it would have only message us back on telegram that first email so this way if we had like eight emails it needed to summarize it would be able to send us all eight of them then finally we just needed to actually respond with this information so we came in here and we set the response field to the content that we were getting from that aggregate node and as you can see all of that is in one big chunk right here and we called it response because this is the field that the agent is looking for after it calls the tool it's looking for the field response to to Signal like either that it's done or it's going to give information back to the agent to give back to us on telegram so that's what's happening in the git emails workflow so now we're going to do the send email workflow which is right here so what I'm going to do first is actually talk to our agent on telegram to get it to send an email and then we can look at the actual execution to see that data moving through all right so I said can you send an email to Colin asking how the project is coming along let's see what we get here the email has been sent to Colin asking for an update on the project perfect and now let's hop into the email and see what we got do so project request update hi Colin I hope this finds you well I am writing to ask how the project is coming along can you please provide an update at your earliest convenience thank you best regards Nate so we can see that that worked now let's hop into the execution of that workflow in order to see the data passing through all right here's this workflow it's only four nodes it looks a little more simple so as you can see what's information coming in we've got um who the email is going to we've got the subject and we've got the the message so I hope this message finds you well I'm writing to ask how the projects coming along just what we read so that's what's being fed into this workflow then we need to go to open AI note in order to get that information parsed through correctly so we pretty much just asked it to parse it through um in the different parameters and once it did that it's going to Output you know the message the send to the subject all that kind of stuff and then we can use that in the Gmail node super simple again all we got to do is drag and drop the fields in so two obviously we're looking for an email so send to we've got Nate 8@gmail. com for subject we're just going to drag in the subject message we're going to drag in the message and then I usually just make sure that the email type is text and that's really all you got to do especially you know after you got everything configured um you can test it and we can see that it actually got sent out once again this workflow has to actually communicate back to the agent that it took care of business so we're going to add an edit field set once again we'll add a field we'll manually call it response and then we set that field to sent so you can also do done but anything that can sort of indicate to the agent that the the workflow has completed successfully back to the agent we're going to move on to the calendar events now so the first one what we'll do is get calendar so open up telegram once again and I'm going to ask the bot to um grab my calendar events for tomorrow so what does my calendar look like tomorrow so we'll ask that we will actually real quick go check what the calendar looks like tomorrow we've got you know different stuff going on throughout the day so hopefully this will come back correctly and now let's look at the telegram message tomorrow on October 12th your schedule is as follows 8:00 a. m.
to 900 a. m. we've got gym 11:00 a.
m. to 12:00 p. m.
we've got a meeting then we got lunch and then later in the night we've got dinner with friends enjoy your day wow super friendly super helpful um that's a lot quicker than you know pulling up your calendar especially if you're you know in the middle of something so we've got our calendar events here now let's go into the actual execution of what just took place and look at the data moving through there too okay so now we're in the workflow of the tool that gets calendar events and then spits them back out in a nice in a nice short summary so as you can see this one's a little bit longer than the send email tool but still not that bad once we break it down piece by piece once again the workflow is being triggered by being called by another workflow which is the agent they all the tools that we make in nadn are going to be called the same way like that so in here we see that the data that's coming through is to view events for 2024 1012 which is tomorrow because we asked for tomorrow and and so that's really nice that it did that already because I prompted the agent to know what the current date is but just in case we always do it here sometimes it slips through especially when I'm building something fast and I'm you know trying to trying to prompt it as simple as possible but here we've got the first open AI node and this was basically the same thing we wanted to find the current day so we can see here your job is to identify what date the user is asking for based on the query which is coming in through Telegram and today's date which is now and you can see it's coming in with the live variables you should return this date field called requested day and only include the date we don't care about the time and then I said some examples so if the query asked for today it be today yesterday be the day before tomorrow is the day after same thing as that one of those other workflows and then I said after this please outut output a field called next day which should be the day after the date you've already returned so it may seem a little complicated but basically all we want is we want the the day that the user requested and then we want to get the next day that the user requested and you'll see why once we get into the calendar node going to open up this calendar node here connect the calendar choose the right calendar and now you see why we wanted to get the requested date and the day after because we wanted to select the options of we're returning calendar events that fall after 1012 but they also have to fall before 10:13 otherwise it would pull you know all the events that you have tomorrow and the next day and the next day and all you wanted to see was tomorrow's date or tomorrow's events so you have to tell it how to cut that off here and as you can see it pulled back those four events events that I put into the calendar gym client meeting lunch dinner we've got a bunch of different fields here we also have the start time and the end time but we have the information we need now we just need to figure out how we get it to be concise and summarized in a way that we can digest moving on to the next node we've got the edit field set once again we're going to set but we're not going to do response we're setting three Fields here because that's all the data that we want to move through we want the event we want the start time and the end time so we're once again just going to be dragging in these variables from that previous node for the event we've got the json. summary which is right here and as you can see it comes through his gym and then obviously we want the start time and end time because that's important when we're asking to get our calendar so we're just going to drag in the start date and time and then the end date and time from right over here and we can see that we're getting the information back and it's outputting just what we wanted just what we asked for and you know super simple so we've got those three fields that we want now we're going to move into an open AI node that's going to help us summarize this information so I said you're an assistant and I need you to summarize my day by looking at events in my calendar and then I gave it details I gave it the event name start time end time and then you can see in this output it worked so for example this first one on October 12th you invent scheduled from 8:00 a. m.
to 9:00 a. m. for a gym session and then does the same with the rest of them then from there we need to actually aggregate those into this into one field once again otherwise it would only return that first calendar event in our schedule so clicking in here we can see we aggregated and we just aggregated on message.
content which is just the summary that came through in the open AI node once again we drag that in and then you can see they're coming through in sort of a list format so this is the information that's going to come back to us on Telegram and then we need to do a final response to the agent that we've done the task but instead of just saying done we need the information that we got through this workflow so we put in the content of the list and then it's going to come back with all four of those events and it's going to send it back to us on telegram moving on to the second calendar tool let's say we don't want to get calendar events but we want to actually put something on our calendar we can use this setup calendar event so let's open up Telegram and talk to our agent in order to do that so I'm going to say can you set an event with Colin for 5:00 pm today and now I'm going to hop over to the calendar we'll pull back over Telegram and we can see this stuff happen in real time it should pop up with an event right here at 5 and it should tell us so the event Colin has been scheduled for five and now we can see right here meeting with Colin we can click on that and we can sort of get information on that and you can make that more detailed if you want if you wanted to actually include a link to you know a zoom meeting or send him an email about it we can hook that kind of stuff up too but that's just a simple look at how that just happened there so let's hop into the execution of what we just asked this agent to do we are now in the set calendar tool this one is again only four nodes so it looks a lot less intimidating but all of them are very simple once you break them down pece back piece once again being triggered here by um being called by another workflow this information we've got here is said an event with Colin and it gave us his email to for 5:00 p. m. today the next node is going to be an open AI so we'll click on this one we're going to message a model and we're going to ask this node to determine the following output Fields based on the user query so we wanted to take what we set over here to set an event and we want it to give us what the name is the start time and the end time of the event and then at the end I put use now once again it's going to give us the current time time and date but we want Ed now as the current date if an end time isn't specified assume it will be 30 minutes after the start date so if you guys may be wondered how did it know to make the meeting from 5:00 p.
m. to 5:30 p. m.
and it's just because I specified if we don't say how long it's going to be just assume it's 30 minutes so that's what come through over here we've got the event name the start time and the end time and now we can move into the next node The Next Step here is taking this information into a calendar node and this one's pretty self-explanatory we're going to be creating event rather than getting events um we're we're choosing the calendar obviously and then we need to set up the start and end time for the event so we can just drag these in based on that open AI node we just configured and then we had to add an additional field down here because otherwise if we didn't do this it would just create an event on our calendar and just it would be Untitled event but we add this summary and we that's why we wanted it to extract an event name so we put this in here and now we can see it output sort of some information for us it gave us the status confirmed it gave us this link so the link is cool because then you could could have it also automatically email you know Colin or whoever you're making an email with and it could give them this link too and all this kind of stuff but at this point this note is done so we can move on to the last step which is just informing the agent that we did the task once again we do this with an edit Fields set node and this time we added a field called response and we put the response value to done so that the agent knows that we're done and it can telegram message us back and say we did that for you okay now we are on to our last two tools down here which are both having to do with databases so we can update one or summarize one and this is just based on a Google Sheets database that I'm going to be using for this example so first let's go into the update database one and see what this looks like here's an example database that I made for this workflow now I'm just using Google Sheets but obviously you could connect this to air table or notion or whatever sort of backend database software you're using but in this case this is just project database so we've got names of the project we've got notes on the project and then we've got their status so for example let's say that we just you know wrapped up a call and we wanted to update a note or a status or both about a project so let's come in here and say can you update the notes and status of the AI tool project to complete and so this should change both the notes and the status of this first row in here to complete and then it should tell us that it was able to do that for us so let's see the status and notes of the AI tool product have been updated to complete and as you can see right in here we've got these two rows or sorry the row with the two columns that were updated to complete so that's how this one works let's hop into the actual execution of what we just asked telegram to do all right thank goodness for another four node workflow they're super simple and really it's just two nodes because the set and the trigger don't really count but as you can see it's another trigger and it's saying update the AI tool project status to complete and notes to complete so it split that up into two different things which was awesome because it knows that it wants to change the status and the notes not just one or the other so then of course we're going into a open AI node we're prompting it based on the Json query which we gave the information here and then I said you need to justify or sorry you need to identify and output the following Fields separately and the fields are project name notes and status as you can see over here we got the project was called AI tool and the notes and Status were both set to complete and so we've got the information here now we just need to actually get that updated in Google sheets so we'll do that here with a Google Sheets node we want to append or update row we just have to connect our credentials grab the document grab the sheet and then we wanted to match each column on the field called project so we just dragged in Project name over here because then it's saying it's only going to update if it sees that one project in sheets is called AI tool in this case and then one project over here in nadn is called n is called AI tool it's going to match those and then it can update that row and so it's going to update the column of notes to complete and the column of status to complete based on the information we just dragged in right here and here's what a little look of what it looks like um we've got the project notes and status and we know that worked so once again we just have to get back to the agent and say that we did it so we've got response and we set that to done and now we can move on to the last tool of this workflow this last one I think is something that's super cool it's going to be able to read all of the information in your database and give you a sum of it so this could work really well if again in another use case you're running late to a meeting or before you're going to meet with a client you just want to get caught up on what's going on in their profile you could have um your telegram bot just sort of summarized that information for you so let's hop into um this database real quick so we can give a look at what's going on and then we will ask it to please um summarize our database so obviously nothing's going to happen here because it's not changing anything it's just is going to be giving us a summary of this information but hopefully we'll see a quick blurb about each project and the status of each one so as you can see we've got the five projects here um AI tool project has been successfully completed it involved training an AI model blah blah blah some details on that we can see that this marketing campaign one is listed as pending and we can see this last one Cloud migration it involves transferring data and service to the cloud data backup is complete and the migration of servers is scheduled for the weekend the project is currently in the scheduled phase so that is super cool cool if you need you know a quick little rundown or you could ask for a quick rundown on a specific one rather than sort of getting a summary of everything we are now in the most recent execution of our last tool for the day um this one is kind of a mix of all the other ones because it only has three real nodes but again we had to aggregate everything at the end to give us an actual summary so let's see how the data is moving through this workflow of course we've got the call in the beginning by another workflow I need a summary of our current database including key projects recent updates and overall status so it's actually giving us a better prompt than we gave it initially on telegram which is pretty cool then we move into a Google Sheets node this one is also pretty simple all we're doing is grabbing rows and we're grabbing every single Row in this case because we didn't specify we only wanted a certain project then in here of course we're taking these five items these five projects into an open AI node The Prompt here is please Summarize each project in the database based on their details and then all we have to do was drag in Project name the notes and the status so then you on this right hand side you can see that each of them got their own little custom summary based on their information so we took those five items and we wanted to turn them into one as you can see after the aggregate node it goes from five to one so in here all we did was we wanted to um aggregate this field which was message. content which is basically just all the summaries of all of the projects that the openi node gave us and then on the right side you can see that all five of these um usually sort of coding languages count from zero so that's why it says four but these are indeed the five projects we got those over here into one field and then we're able to respond to our agent with that information sort of aggregated together in one field because we gave it the response of json.