WEBVTT

00:00.080 --> 00:04.320
Okay, it's time to build the final subagent of the program we're going to amplify.

00:04.360 --> 00:06.160
We're going to account executive.

00:06.200 --> 00:16.640
We create a new workflow and we're going to call it the demo booking Subagent B booking agent.

00:16.680 --> 00:17.640
There we have it.

00:17.680 --> 00:19.400
We're going to add a first step.

00:19.440 --> 00:22.000
It's going to be on a chat.

00:22.040 --> 00:23.480
We'll change that later.

00:23.920 --> 00:28.480
And we are now going to add a agent shockingly.

00:28.680 --> 00:31.120
Uh, and uh that all looks great.

00:31.120 --> 00:31.640
For now.

00:31.960 --> 00:33.200
Give it a chat model.

00:33.200 --> 00:34.600
I'm going to pick OpenAI.

00:34.640 --> 00:37.400
You pick whatever you want and we'll come in here.

00:37.400 --> 00:40.520
I'm going to pick GPT 5.2.

00:40.800 --> 00:42.600
Uh, a good strong model.

00:42.600 --> 00:44.920
But again it's totally your choice.

00:44.920 --> 00:48.080
I'm going to say I want the reasoning effort to be low.

00:48.760 --> 00:54.680
And that's a sensible starting position for us for our last AI agent.

00:54.680 --> 00:58.600
And we're now going to add a tool and we're going to add in one new integration.

00:58.600 --> 01:00.580
But it's an easy peasy one.

01:00.580 --> 01:06.100
We are gonna add in a tool, which is one of the first ones people show you with, and which is the

01:06.100 --> 01:07.660
Google Calendar.

01:07.940 --> 01:09.860
An easy thing we can put in here.

01:09.900 --> 01:11.540
Google calendar tool.

01:11.580 --> 01:15.020
We have to select a credential, create a new credential.

01:15.180 --> 01:22.460
This is one of the OAuth tools where if you're on a cloud, they've already got the OAuth two setup,

01:22.460 --> 01:27.060
the OAuth two app set up so that all you have to do is press connect with Google.

01:27.100 --> 01:30.260
It comes on in here with the usual kind of pop up.

01:30.300 --> 01:36.020
Choose an account, choose this account, continue and connection successful.

01:36.020 --> 01:37.700
I can now close that window.

01:37.860 --> 01:38.860
It's green.

01:38.900 --> 01:40.860
We're connected to my Google calendar.

01:41.020 --> 01:42.780
It's it's crazy simple.

01:43.220 --> 01:44.700
All right, back we come here.

01:44.700 --> 01:46.140
We can now choose this.

01:46.140 --> 01:47.380
What do we want to do.

01:47.380 --> 01:53.140
So we can either choose to to look at individual events and get my events from the calendar.

01:53.300 --> 01:56.100
Or we can look at overall calendar availability.

01:56.260 --> 01:58.580
Um, so we want to think about what we want to do now.

01:58.730 --> 01:59.010
Okay.

01:59.050 --> 02:04.610
So the purpose of this agent is going to be to negotiate a good slot when I can give a demo to the person

02:04.610 --> 02:08.410
that's reaching out, that's being that's come in to, to communicate.

02:08.410 --> 02:15.050
And, uh, I'm mindful of the lethal trifecta and making sure that since this information is going to

02:15.050 --> 02:20.490
be available externally, I want to be careful to avoid exposing private data.

02:20.690 --> 02:25.970
Now, the typical way you might do this is by exposing my event information so that the agent can negotiate

02:25.970 --> 02:28.010
a slot knowing all of my events.

02:28.010 --> 02:33.890
But but again, my my lethal trifecta alerts my spidey senses ringing there that I probably wouldn't

02:33.890 --> 02:34.530
be comfortable with.

02:34.530 --> 02:40.250
All of my calendar events are exposed to the internet, so maybe a better approach instead is only to

02:40.290 --> 02:45.090
make available, uh, whether or not I'm available for a particular event.

02:45.090 --> 02:45.490
So.

02:45.490 --> 02:46.530
So that's what I'm going to do here.

02:46.530 --> 02:48.570
I'm going to make the operation availability.

02:48.570 --> 02:50.250
I pick my calendar here.

02:50.370 --> 02:56.690
Uh, and I'm going to say the model should choose the start and end time.

02:56.850 --> 03:03.950
And just to be clear, I'm going to give a manual description of this, uh, whether, uh, the user

03:03.950 --> 03:13.150
is available to give a demo, uh, from the given start time to end time.

03:13.150 --> 03:14.950
That makes super clear what's going on here.

03:14.950 --> 03:17.670
These times are defined by the model.

03:17.830 --> 03:20.350
And let's go with that.

03:20.550 --> 03:24.110
That is the Get Availability tool set okay.

03:24.150 --> 03:28.790
Next the final tool here is going to be one to actually create the event.

03:28.790 --> 03:30.950
So back we go to the Google Calendar tool.

03:31.510 --> 03:36.350
And this time it's going to be something creating an event.

03:36.510 --> 03:37.870
We'll pick my calendar.

03:38.150 --> 03:38.830
There it is.

03:38.830 --> 03:42.230
We'll let the model choose the start and the end.

03:42.270 --> 03:43.990
And we're going to add in some other fields.

03:44.270 --> 03:48.510
And look here is where I'm going to to be a little bit lazy.

03:48.510 --> 03:54.390
And what I'm not gonna do is I'm not going to have it actually invite the person that we are going to

03:54.390 --> 03:55.590
be having this demo with.

03:55.630 --> 04:00.330
And there's a reason for that, which is that we are going to be rolling this, this, this course out.

04:00.330 --> 04:03.050
I'm hoping lots of people like yourself are going to be taking it.

04:03.050 --> 04:08.730
And I am fearful that if I'm not careful, someone is going to accidentally run this and invite a bunch

04:08.730 --> 04:14.610
of senior CFOs at companies like Accenture to to fake sales meetings with them.

04:14.610 --> 04:19.690
So I'm going to fall short of actually inviting a third person to it, third party to it.

04:19.690 --> 04:25.770
But hopefully it's super clear to you how you can do that should you wish to do it for your business.

04:25.890 --> 04:30.250
Uh, but otherwise you can assume that you would either automate it here, or that you would have that

04:30.250 --> 04:35.210
as a manual step, that you would actually do the final stage of inviting a third party.

04:35.250 --> 04:40.010
When you see the invite in your calendar and when you get a push notification.

04:40.370 --> 04:40.970
Okay.

04:41.010 --> 04:45.290
So we'll add in a description field that the model can set.

04:45.290 --> 04:49.370
But for we won't add in the invitees, uh, for for this go round.

04:49.370 --> 04:52.210
And you could certainly take that as a challenge to yourself.

04:52.210 --> 04:56.760
And then make sure, of course, that you're testing it thoroughly before you actually start inviting

04:56.760 --> 04:58.600
people out there on the internet.

04:58.600 --> 05:03.080
But but because we're doing this in a very careful way, it should be very robust.

05:03.680 --> 05:04.360
Okay.

05:04.560 --> 05:11.360
So with that, we might as well, uh, give it a manual description as well, a create an event to represent

05:12.040 --> 05:18.240
a demo, uh, at a time that is available.

05:19.160 --> 05:20.200
Uh, okay.

05:20.240 --> 05:21.680
That's all great.

05:21.920 --> 05:24.200
I think we're in really good shape here.

05:24.520 --> 05:29.520
Let's go back and, uh, set up our prompt and then give this a try.

05:29.560 --> 05:30.960
All right, here we go.

05:31.000 --> 05:32.440
We're going to our agents.

05:32.480 --> 05:35.520
We are going to add a system message.

05:35.800 --> 05:37.520
We're going to put in here.

05:37.840 --> 05:42.080
You're provided with a person who would like to receive a demo of the account product and their preferred

05:42.120 --> 05:43.000
time slot.

05:43.040 --> 05:47.440
Use your tool to check the calendar's availability and then book the demo in the calendar.

05:47.440 --> 05:49.200
Reply with the results.

05:49.760 --> 05:51.160
Um, okay.

05:51.280 --> 05:55.020
And now I'm going to say require output format.

05:55.380 --> 05:57.100
Let's get out of here.

05:57.100 --> 05:58.740
Let's go to the output parser.

05:58.780 --> 06:01.180
You know, I like structured outputs.

06:01.340 --> 06:02.740
Let's just have it like this.

06:02.740 --> 06:05.500
But what we'll have is simply success.

06:08.460 --> 06:08.980
Or whatever.

06:08.980 --> 06:09.940
We'll be optimistic.

06:09.940 --> 06:12.340
And then we will have, uh.

06:12.740 --> 06:13.620
Summary.

06:15.700 --> 06:19.500
Summarize the outcome here.

06:22.700 --> 06:25.420
Uh, okay.

06:25.700 --> 06:28.540
Uh, and, uh, that should be great.

06:29.060 --> 06:37.580
Let's now just go and add in some if here if routes based on the results.

06:37.780 --> 06:39.100
We know what to do now.

06:39.140 --> 06:40.300
We won't make a mistake again.

06:40.340 --> 06:41.900
This should be an expression.

06:42.140 --> 06:43.020
It should be.

06:44.460 --> 06:45.580
I'll let you say it out loud.

06:45.900 --> 06:49.300
JSON output dot success.

06:50.580 --> 06:53.960
Close brackets like so.

06:54.880 --> 06:55.920
Uh, okay.

06:56.160 --> 06:58.080
And then this goes to Boolean.

06:58.080 --> 06:59.640
Goes to is true.

07:00.120 --> 07:00.960
All right.

07:01.000 --> 07:02.200
That looks right to me.

07:02.360 --> 07:05.880
And now we'll add in two push notifications here.

07:06.080 --> 07:07.600
And we should be ready to try this.

07:07.640 --> 07:07.920
Okay.

07:07.960 --> 07:09.720
And I've done all of that.

07:09.760 --> 07:13.320
I've put it in the push notifications on the true and the false.

07:13.520 --> 07:15.760
So that and I've also added in the stickies.

07:15.840 --> 07:21.800
So we've now got a nice little setup there where based on what comes in, it will try and book a meeting

07:21.800 --> 07:23.280
and then report on it.

07:23.480 --> 07:24.800
Let's give this a shot.

07:24.840 --> 07:25.000
Wait.

07:25.000 --> 07:27.560
Just before we run it, let's make this feel even more real.

07:27.600 --> 07:29.400
Go into the calendar.

07:29.440 --> 07:31.440
Here we've got the, um.

07:32.000 --> 07:34.320
We've got the fields that we are populating.

07:34.320 --> 07:37.960
And there's, of course, a bunch of fields we're not populating intentionally because we don't don't

07:37.960 --> 07:39.880
want this to go to go wrong.

07:39.880 --> 07:41.560
But I might just populate a few more.

07:41.560 --> 07:43.000
Let's populate location.

07:43.000 --> 07:47.200
This is where you could put your zoom, uh, your zoom link so that people can have a video call with

07:47.200 --> 07:47.280
you.

07:47.280 --> 07:48.840
So let's put in something fake here.

07:48.960 --> 07:53.110
Uh, like zoom us a b c d e f.

07:53.310 --> 07:53.950
Imagine that.

07:53.950 --> 07:55.150
That's actually my zoom account.

07:55.150 --> 07:56.350
So it's going to go in there.

07:56.390 --> 08:00.070
Let's add another field and let's have this be the summary field.

08:00.070 --> 08:01.790
And we'll let the model populate that.

08:01.990 --> 08:04.470
And that's just going to make it a little bit more well rounded.

08:04.470 --> 08:07.950
And with that let's open the chat and give this thing a try.

08:07.990 --> 08:08.510
Okay.

08:08.550 --> 08:19.710
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,

08:19.750 --> 08:20.870
2026.

08:21.470 --> 08:22.950
All right, let's see what happens.

08:22.990 --> 08:24.950
The AI agent goes out there.

08:25.110 --> 08:27.670
It's going to be looking at my availability.

08:27.830 --> 08:28.630
Things are happening.

08:28.710 --> 08:29.950
Tools are being called.

08:30.190 --> 08:32.390
Stuff is in the works.

08:34.830 --> 08:36.030
Drum roll please.

08:38.550 --> 08:39.030
It's back.

08:39.070 --> 08:44.230
Trying to make the structured outputs, and the workflow is executed successfully.

08:44.230 --> 08:45.590
And they're there.

08:45.790 --> 08:46.990
I hope you heard that.

08:47.190 --> 08:48.670
We have liftoff.

08:48.830 --> 08:52.770
Okay, so apparently it's created something in my calendar.

08:53.170 --> 08:54.010
Let's go have a look.

08:54.050 --> 08:55.810
Well, let's go and take a look at the calendar.

08:55.810 --> 08:56.770
Here is my calendar.

08:56.770 --> 08:58.610
Here's Monday, the 5th of January.

08:58.610 --> 09:00.730
There appears to be a booking at 2 p.m..

09:00.770 --> 09:01.490
Here it is.

09:01.490 --> 09:04.330
It's for an account AI demo with Tom Jones.

09:04.330 --> 09:06.010
It's on my zoom link.

09:06.050 --> 09:07.410
And there's the details.

09:07.410 --> 09:08.410
It's all there.

09:08.450 --> 09:11.130
It all happened just as we'd expect.

09:11.130 --> 09:12.370
Fantastic.

09:12.650 --> 09:14.890
Okay, that's the last subagent.

09:14.930 --> 09:20.770
We just have to package it up to be a subagent, and then we can move on to the final agent of the course.

09:20.810 --> 09:23.690
Okay, so back here I'm going to remove the chat message.

09:23.690 --> 09:25.850
It's not going to be triggered by chat message.

09:25.850 --> 09:27.170
We're going to have it triggered.

09:27.170 --> 09:33.010
And again I press tab to bring up these I'm going to trigger not as a executed by another workflow but

09:33.010 --> 09:34.970
again a webhook call I'm going to do.

09:35.130 --> 09:37.650
So I'm going to do HTTP post again.

09:37.970 --> 09:43.330
And I'm going to have it respond using the respond to webhook node as we did before.

09:43.570 --> 09:47.770
Um, and now I'm going to connect this in here.

09:48.050 --> 09:55.550
I'm going to open up my AI agent, I no longer have a connected chat trigger node I want to define below

09:55.550 --> 09:59.830
and an expression and I will punch in my expression in here.

10:00.150 --> 10:04.590
Please book a demo with dollar name.

10:04.630 --> 10:06.030
That's the incoming JSON.

10:06.030 --> 10:12.110
We look in the body of the post, we get the name and then the body time slot, which is going to be

10:12.110 --> 10:14.110
some description of when.

10:14.390 --> 10:17.670
And so then this will, this will appear a bit like that.

10:17.870 --> 10:23.270
Uh, and uh, and that's still going to fit nicely with this system message.

10:23.270 --> 10:24.070
So that should work.

10:24.070 --> 10:24.390
Great.

10:24.390 --> 10:25.430
Let's save it.

10:25.430 --> 10:26.870
And now go back here.

10:26.870 --> 10:30.510
And finally we have to add in the responses at the end okay.

10:30.550 --> 10:34.470
So I'm going to add in here a respond to webhook.

10:34.950 --> 10:40.070
And we will have this thing respond with uh some some text.

10:40.430 --> 10:42.070
That text can be an expression.

10:42.070 --> 10:49.060
And what we'll have it respond with is going to be uh, just exactly what came out here, this Summary

10:49.220 --> 10:49.860
right here.

10:49.860 --> 10:51.420
We'll have that be.

10:51.460 --> 10:52.620
Be what it comes up with.

10:52.820 --> 10:54.100
Uh, that is perfect.

10:54.420 --> 10:56.540
Uh, and, uh, yeah.

10:56.580 --> 10:59.780
You know, I basically we want exactly the same thing for this other leg as well.

10:59.780 --> 11:02.820
And of course, there'll be a way to bring them together and do it once, but we'll just do it this

11:02.820 --> 11:03.100
way.

11:03.300 --> 11:05.420
This seems fine enough to me.

11:05.420 --> 11:06.940
Respond to webhook.

11:07.580 --> 11:11.780
Uh, and, uh, uh, make this be, uh, sorry.

11:11.820 --> 11:14.700
The the, um, respond with text.

11:14.900 --> 11:20.740
And again, we come into the AI agent, we make this an expression and we take the summary.

11:20.780 --> 11:22.060
We drop that in there.

11:23.220 --> 11:24.260
I must have missed that.

11:24.260 --> 11:25.220
Try that again.

11:25.220 --> 11:26.420
Summary in there.

11:26.660 --> 11:28.180
And perfect.

11:28.220 --> 11:35.540
We now have everything set up to be responding back to the webhook when this webhook is called.

11:35.940 --> 11:40.460
And that then means we can now save this and publish it.

11:40.660 --> 11:44.340
And we have now published our two Subagents.

11:44.340 --> 11:47.780
Finally, we are ready for the last agent of the course.

11:47.780 --> 11:48.740
Let's go and do it!
