Okay, it's time to build the final subagent of the program we're going to amplify.
We're going to account executive.
We create a new workflow and we're going to call it the demo booking Subagent B booking agent.
There we have it.
We're going to add a first step.
It's going to be on a chat.
We'll change that later.
And we are now going to add a agent shockingly.
Uh, and uh that all looks great.
For now.
Give it a chat model.
I'm going to pick OpenAI.
You pick whatever you want and we'll come in here.
I'm going to pick GPT 5.2.
Uh, a good strong model.
But again it's totally your choice.
I'm going to say I want the reasoning effort to be low.
And that's a sensible starting position for us for our last AI agent.
And we're now going to add a tool and we're going to add in one new integration.
But it's an easy peasy one.
We are gonna add in a tool, which is one of the first ones people show you with, and which is the
Google Calendar.
An easy thing we can put in here.
Google calendar tool.
We have to select a credential, create a new credential.
This is one of the OAuth tools where if you're on a cloud, they've already got the OAuth two setup,
the OAuth two app set up so that all you have to do is press connect with Google.
It comes on in here with the usual kind of pop up.
Choose an account, choose this account, continue and connection successful.
I can now close that window.
It's green.
We're connected to my Google calendar.
It's it's crazy simple.
All right, back we come here.
We can now choose this.
What do we want to do.
So we can either choose to to look at individual events and get my events from the calendar.
Or we can look at overall calendar availability.
Um, so we want to think about what we want to do now.
Okay.
So the purpose of this agent is going to be to negotiate a good slot when I can give a demo to the person
that's reaching out, that's being that's come in to, to communicate.
And, uh, I'm mindful of the lethal trifecta and making sure that since this information is going to
be available externally, I want to be careful to avoid exposing private data.
Now, the typical way you might do this is by exposing my event information so that the agent can negotiate
a slot knowing all of my events.
But but again, my my lethal trifecta alerts my spidey senses ringing there that I probably wouldn't
be comfortable with.
All of my calendar events are exposed to the internet, so maybe a better approach instead is only to
make available, uh, whether or not I'm available for a particular event.
So.
So that's what I'm going to do here.
I'm going to make the operation availability.
I pick my calendar here.
Uh, and I'm going to say the model should choose the start and end time.
And just to be clear, I'm going to give a manual description of this, uh, whether, uh, the user
is available to give a demo, uh, from the given start time to end time.
That makes super clear what's going on here.
These times are defined by the model.
And let's go with that.
That is the Get Availability tool set okay.
Next the final tool here is going to be one to actually create the event.
So back we go to the Google Calendar tool.
And this time it's going to be something creating an event.
We'll pick my calendar.
There it is.
We'll let the model choose the start and the end.
And we're going to add in some other fields.
And look here is where I'm going to to be a little bit lazy.
And what I'm not gonna do is I'm not going to have it actually invite the person that we are going to
be having this demo with.
And there's a reason for that, which is that we are going to be rolling this, this, this course out.
I'm hoping lots of people like yourself are going to be taking it.
And I am fearful that if I'm not careful, someone is going to accidentally run this and invite a bunch
of senior CFOs at companies like Accenture to to fake sales meetings with them.
So I'm going to fall short of actually inviting a third person to it, third party to it.
But hopefully it's super clear to you how you can do that should you wish to do it for your business.
Uh, but otherwise you can assume that you would either automate it here, or that you would have that
as a manual step, that you would actually do the final stage of inviting a third party.
When you see the invite in your calendar and when you get a push notification.
Okay.
So we'll add in a description field that the model can set.
But for we won't add in the invitees, uh, for for this go round.
And you could certainly take that as a challenge to yourself.
And then make sure, of course, that you're testing it thoroughly before you actually start inviting
people out there on the internet.
But but because we're doing this in a very careful way, it should be very robust.
Okay.
So with that, we might as well, uh, give it a manual description as well, a create an event to represent
a demo, uh, at a time that is available.
Uh, okay.
That's all great.
I think we're in really good shape here.
Let's go back and, uh, set up our prompt and then give this a try.
All right, here we go.
We're going to our agents.
We are going to add a system message.
We're going to put in here.
You're provided with a person who would like to receive a demo of the account product and their preferred
time slot.
Use your tool to check the calendar's availability and then book the demo in the calendar.
Reply with the results.
Um, okay.
And now I'm going to say require output format.
Let's get out of here.
Let's go to the output parser.
You know, I like structured outputs.
Let's just have it like this.
But what we'll have is simply success.
Or whatever.
We'll be optimistic.
And then we will have, uh.
Summary.
Summarize the outcome here.
Uh, okay.
Uh, and, uh, that should be great.
Let's now just go and add in some if here if routes based on the results.
We know what to do now.
We won't make a mistake again.
This should be an expression.
It should be.
I'll let you say it out loud.
JSON output dot success.
Close brackets like so.
Uh, okay.
And then this goes to Boolean.
Goes to is true.
All right.
That looks right to me.
And now we'll add in two push notifications here.
And we should be ready to try this.
Okay.
And I've done all of that.
I've put it in the push notifications on the true and the false.
So that and I've also added in the stickies.
So we've now got a nice little setup there where based on what comes in, it will try and book a meeting
and then report on it.
Let's give this a shot.
Wait.
Just before we run it, let's make this feel even more real.
Go into the calendar.
Here we've got the, um.
We've got the fields that we are populating.
And there's, of course, a bunch of fields we're not populating intentionally because we don't don't
want this to go to go wrong.
But I might just populate a few more.
Let's populate location.
This is where you could put your zoom, uh, your zoom link so that people can have a video call with
you.
So let's put in something fake here.
Uh, like zoom us a b c d e f.
Imagine that.
That's actually my zoom account.
So it's going to go in there.
Let's add another field and let's have this be the summary field.
And we'll let the model populate that.
And that's just going to make it a little bit more well rounded.
And with that let's open the chat and give this thing a try.
Okay.
So now in the chat I'm going to say book a demo with Tom Jones singer at a 2 p.m. eastern on Jan five,
2026.
All right, let's see what happens.
The AI agent goes out there.
It's going to be looking at my availability.
Things are happening.
Tools are being called.
Stuff is in the works.
Drum roll please.
It's back.
Trying to make the structured outputs, and the workflow is executed successfully.
And they're there.
I hope you heard that.
We have liftoff.
Okay, so apparently it's created something in my calendar.
Let's go have a look.
Well, let's go and take a look at the calendar.
Here is my calendar.
Here's Monday, the 5th of January.
There appears to be a booking at 2 p.m..
Here it is.
It's for an account AI demo with Tom Jones.
It's on my zoom link.
And there's the details.
It's all there.
It all happened just as we'd expect.
Fantastic.
Okay, that's the last subagent.
We just have to package it up to be a subagent, and then we can move on to the final agent of the course.
Okay, so back here I'm going to remove the chat message.
It's not going to be triggered by chat message.
We're going to have it triggered.
And again I press tab to bring up these I'm going to trigger not as a executed by another workflow but
again a webhook call I'm going to do.
So I'm going to do HTTP post again.
And I'm going to have it respond using the respond to webhook node as we did before.
Um, and now I'm going to connect this in here.
I'm going to open up my AI agent, I no longer have a connected chat trigger node I want to define below
and an expression and I will punch in my expression in here.
Please book a demo with dollar name.
That's the incoming JSON.
We look in the body of the post, we get the name and then the body time slot, which is going to be
some description of when.
And so then this will, this will appear a bit like that.
Uh, and uh, and that's still going to fit nicely with this system message.
So that should work.
Great.
Let's save it.
And now go back here.
And finally we have to add in the responses at the end okay.
So I'm going to add in here a respond to webhook.
And we will have this thing respond with uh some some text.
That text can be an expression.
And what we'll have it respond with is going to be uh, just exactly what came out here, this Summary
right here.
We'll have that be.
Be what it comes up with.
Uh, that is perfect.
Uh, and, uh, yeah.
You know, I basically we want exactly the same thing for this other leg as well.
And of course, there'll be a way to bring them together and do it once, but we'll just do it this
way.
This seems fine enough to me.
Respond to webhook.
Uh, and, uh, uh, make this be, uh, sorry.
The the, um, respond with text.
And again, we come into the AI agent, we make this an expression and we take the summary.
We drop that in there.
I must have missed that.
Try that again.
Summary in there.
And perfect.
We now have everything set up to be responding back to the webhook when this webhook is called.
And that then means we can now save this and publish it.
And we have now published our two Subagents.
Finally, we are ready for the last agent of the course.
Let's go and do it!