WEBVTT

00:00:00.000 --> 00:00:02.720
If your Outlook inbox looks like something like

00:00:02.720 --> 00:00:06.519
this, but you want it to look like this, I'm

00:00:06.519 --> 00:00:08.400
going to show you how to get there by building

00:00:08.400 --> 00:00:12.179
a simple autonomous AI agent in Microsoft Copilot

00:00:12.179 --> 00:00:15.320
Studio. This autonomous AI agent will automatically

00:00:15.320 --> 00:00:19.059
monitor your inbox as emails are coming in, decide

00:00:19.059 --> 00:00:21.899
what folder to place them in, and notify you

00:00:21.899 --> 00:00:24.940
on Teams for the urgent ones. My name is Shervin

00:00:24.940 --> 00:00:27.480
Shafi and I'm a Copilot Principal Engineer at

00:00:27.480 --> 00:00:30.579
Microsoft. now let's get started right now what

00:00:30.579 --> 00:00:32.280
i'm going to do is i'm going to send an email

00:00:32.280 --> 00:00:35.859
to arnold let me just send that it's coming from

00:00:35.859 --> 00:00:39.520
albert so we're looking at arnold's inbox right

00:00:39.520 --> 00:00:42.140
now and so here's albert einstein hey arnold

00:00:42.140 --> 00:00:45.280
i'm your boss we need to meet right away last

00:00:45.280 --> 00:00:47.039
time you said i'll be back and you never came

00:00:47.039 --> 00:00:51.509
back albert And if we go over to the agent that

00:00:51.509 --> 00:00:54.490
I built and we select activity, here's the email

00:00:54.490 --> 00:00:57.649
that just generated this autonomous action. You'll

00:00:57.649 --> 00:00:59.829
see that there's a trigger of when the email

00:00:59.829 --> 00:01:04.750
comes in. It initializes this team's model context

00:01:04.750 --> 00:01:08.769
protocol tool. It says trigger detected, which

00:01:08.769 --> 00:01:13.129
is the email that came in. And then this agent,

00:01:13.209 --> 00:01:15.989
which is email genie, we're just calling it that.

00:01:17.180 --> 00:01:22.379
It uses this move email to move the email to

00:01:22.379 --> 00:01:25.420
a folder. So if we switch over to the inbox,

00:01:25.540 --> 00:01:28.920
you'll see that in this inbox, there is no email

00:01:28.920 --> 00:01:31.680
anymore. However, on the left hand side, I created

00:01:31.680 --> 00:01:36.280
these folders for customers, for internal and

00:01:36.280 --> 00:01:39.799
for everything else. And you can see that there's

00:01:39.799 --> 00:01:43.659
a one here. where this email from albert einstein

00:01:43.659 --> 00:01:47.099
it just got moved into leadership and also if

00:01:47.099 --> 00:01:52.239
i go over to arnold's teams i told the agent

00:01:52.239 --> 00:01:56.340
to create a chat called urgent emails and another

00:01:56.340 --> 00:01:59.219
chat that we'll look at as well the play by play

00:01:59.219 --> 00:02:04.640
and here this is the notification urgent leadership

00:02:04.640 --> 00:02:10.120
email received from albert and it has the message

00:02:10.120 --> 00:02:13.659
as well and all of that is detailed here in the

00:02:13.659 --> 00:02:16.719
activity of the agent the movement that happens

00:02:16.719 --> 00:02:19.919
the message that gets posted using the teams

00:02:19.919 --> 00:02:23.419
message and then below you're getting all this

00:02:23.419 --> 00:02:26.699
information with respect to what's actually happening

00:02:26.699 --> 00:02:30.199
and looks like there are no errors and then there's

00:02:30.199 --> 00:02:32.479
also a play -by -play reporting that i asked

00:02:32.479 --> 00:02:35.259
it to send inside teams so if we switch back

00:02:35.259 --> 00:02:39.360
to teams and click on this play -by -play you'll

00:02:39.360 --> 00:02:43.039
see that here you get this detailed of everything

00:02:43.039 --> 00:02:45.939
that this agent does. Now let's look at how to

00:02:45.939 --> 00:02:48.240
actually build this step by step. Okay, so the

00:02:48.240 --> 00:02:50.020
first thing you're gonna need to do is you're

00:02:50.020 --> 00:02:52.419
gonna go to a web browser and you're gonna type

00:02:52.419 --> 00:02:58.919
in copilotstudio .preview .microsoft .com. The

00:02:58.919 --> 00:03:01.219
preview is a trick that gives you access to preview

00:03:01.219 --> 00:03:04.500
features. So if I actually go to my agents, I

00:03:04.500 --> 00:03:06.639
have a bunch of different agents, some of which

00:03:06.639 --> 00:03:09.560
you've seen in different videos. Now, if we go

00:03:09.560 --> 00:03:12.120
to this email genie, we'll start from the top

00:03:12.120 --> 00:03:14.740
and work our way down. So first, you give it

00:03:14.740 --> 00:03:18.020
a name. You can select edit. And I gave it the

00:03:18.020 --> 00:03:20.680
name email genie. And you can also change the

00:03:20.680 --> 00:03:23.560
icon. I just found this cool picture, so I put

00:03:23.560 --> 00:03:26.419
it in there. And then you give it a description.

00:03:26.719 --> 00:03:28.919
And so the description here is this is an autonomous

00:03:28.919 --> 00:03:31.500
agent that monitors your Outlook inbox and sorts

00:03:31.500 --> 00:03:34.419
and organizes emails based on predefined rules

00:03:34.419 --> 00:03:37.280
and priorities. Fair enough. Good description.

00:03:37.740 --> 00:03:40.879
Next. You can select your agent's model. This

00:03:40.879 --> 00:03:43.379
is pretty cool. Some of you may or may not have

00:03:43.379 --> 00:03:47.860
seen this. Now you can actually specify the GPT

00:03:47.860 --> 00:03:51.840
model from OpenAI. I'm using GPT -5 Auto, but

00:03:51.840 --> 00:03:55.020
you can use anthropic models as well if your

00:03:55.020 --> 00:03:57.879
IT admin has allowed you access. So that's a

00:03:57.879 --> 00:04:00.520
question. The next part that's important is this

00:04:00.520 --> 00:04:03.159
trigger. This is what wakes up the agent. So

00:04:03.159 --> 00:04:05.840
the trigger that we use is this when a new email

00:04:05.840 --> 00:04:09.199
arrives v3. and so all you need to do since you

00:04:09.199 --> 00:04:11.439
won't have it yourself is you select plus add

00:04:11.439 --> 00:04:14.400
trigger and you can see that if you select all

00:04:14.400 --> 00:04:17.220
there's 844 triggers so you can you can look

00:04:17.220 --> 00:04:19.980
for it or you can just type in something like

00:04:19.980 --> 00:04:23.720
outlook email and then it'll look for those outlook

00:04:23.720 --> 00:04:26.800
email triggers the one i use is when a new email

00:04:26.800 --> 00:04:31.339
arrives v3 you select it you click next it asks

00:04:31.339 --> 00:04:35.160
you to log in and if everything is okay then

00:04:35.160 --> 00:04:37.459
you can basically click next and then it adds

00:04:37.459 --> 00:04:39.240
it. So I'm not going to add it because I already

00:04:39.240 --> 00:04:41.800
have it in there but that's the process. The

00:04:41.800 --> 00:04:44.939
next thing is all the instructions and I put

00:04:44.939 --> 00:04:47.540
a ton of detailed instructions in here to get

00:04:47.540 --> 00:04:50.160
the agent to do what I want it to do. So this

00:04:50.160 --> 00:04:53.540
is what I will copy and paste and put it in a

00:04:53.540 --> 00:04:55.560
pinned comment so you can just copy and paste

00:04:55.560 --> 00:04:58.310
the instructions into yours. But I highly suggest

00:04:58.310 --> 00:05:02.250
that you modify them for your use case so you

00:05:02.250 --> 00:05:04.970
can customize it to what is important to you.

00:05:05.009 --> 00:05:07.329
Who is your boss? What's considered high priority?

00:05:07.569 --> 00:05:09.750
Do you want to create a Teams chat for play by

00:05:09.750 --> 00:05:12.069
play? All that kind of stuff. The details are

00:05:12.069 --> 00:05:14.470
in here. But if we look at it kind of broadly,

00:05:14.670 --> 00:05:17.610
I define the purpose, which is similar to the

00:05:17.610 --> 00:05:21.399
description. And I also told it. Look, it's important

00:05:21.399 --> 00:05:24.639
to remember that you're autonomous so that if

00:05:24.639 --> 00:05:27.579
you have a question, don't ask me the question.

00:05:27.680 --> 00:05:29.560
Just go ahead and execute it because I'm not.

00:05:29.980 --> 00:05:31.639
I'm not chatting with you. You're just doing

00:05:31.639 --> 00:05:33.839
things in the background. I don't know how effective

00:05:33.839 --> 00:05:36.699
this instruction is, but so far it seems like

00:05:36.699 --> 00:05:38.860
the agent is actually just making choices and

00:05:38.860 --> 00:05:41.339
going ahead. And this depends on your model as

00:05:41.339 --> 00:05:43.459
well. Then I told it that each time you run,

00:05:43.620 --> 00:05:46.399
whether you're successful or not, I want a summary

00:05:46.399 --> 00:05:48.680
report. This includes reports for what you did

00:05:48.680 --> 00:05:51.439
and why for each email, as well as any error

00:05:51.439 --> 00:05:54.180
handling anytime an error occurs or you can't

00:05:54.180 --> 00:05:56.120
complete a task. Or even if you have a question

00:05:56.120 --> 00:05:58.920
for me, you can send me a Teams message using

00:05:58.920 --> 00:06:02.420
this microsoft teams mcp tool check to see if

00:06:02.420 --> 00:06:04.620
there is already a one -on -one chat called email

00:06:04.620 --> 00:06:07.560
genie play by play and if there is use it and

00:06:07.560 --> 00:06:09.579
send me the summary if there isn't create one

00:06:09.579 --> 00:06:12.439
so the first time it's going to create it and

00:06:12.439 --> 00:06:14.220
then it should just see that there is one and

00:06:14.220 --> 00:06:16.000
just reuse it over and over again that's why

00:06:16.000 --> 00:06:19.459
when you go to mine the play by play you'll see

00:06:19.459 --> 00:06:22.120
previous stuff because it's been reusing it including

00:06:22.120 --> 00:06:24.920
the one that we just ran today so this is an

00:06:24.920 --> 00:06:28.779
option for you to either keep this section or

00:06:28.779 --> 00:06:31.519
remove it but I like to see the play -by -play

00:06:31.519 --> 00:06:34.379
because I want to get an insight into into its

00:06:34.379 --> 00:06:37.420
decision making this Microsoft Teams MCP tool

00:06:37.420 --> 00:06:41.899
if we scroll down it's actually right over here

00:06:41.899 --> 00:06:45.079
under this tool section so this is the Microsoft

00:06:45.079 --> 00:06:48.480
Teams MCP tool and there's also this move email

00:06:48.480 --> 00:06:53.220
v2 the move email v2 shows down here further

00:06:53.220 --> 00:06:57.089
down here and For whatever reason, if I go to

00:06:57.089 --> 00:07:00.370
edit, I can actually select slash and go to tools,

00:07:00.389 --> 00:07:03.610
and then I'll be able to choose the move my email

00:07:03.610 --> 00:07:08.029
V2, but MCP, I can't select it from this slash

00:07:08.029 --> 00:07:11.730
menu. So I ended up calling it out specifically

00:07:11.730 --> 00:07:16.569
up above. But both those tools are in the tools

00:07:16.569 --> 00:07:18.889
section. We'll get to that in just a second.

00:07:19.050 --> 00:07:22.529
Now the step -by -step instructions. outline

00:07:22.529 --> 00:07:26.050
what this agent is supposed to do, right? First,

00:07:26.269 --> 00:07:29.129
it's monitoring my inbox, detecting when new

00:07:29.129 --> 00:07:31.170
emails arrive, which is done by that trigger.

00:07:31.670 --> 00:07:35.209
And once the email is detected, then it proceeds

00:07:35.209 --> 00:07:37.430
to step number two, which is classification.

00:07:38.069 --> 00:07:42.550
And this section, number two, it determines the

00:07:42.550 --> 00:07:45.970
folder for the email. It analyzes the email's

00:07:45.970 --> 00:07:48.490
metadata, the sender's subject keywords, compares

00:07:48.490 --> 00:07:51.350
it against categories. These are the categories

00:07:51.350 --> 00:07:54.189
that I gave it, but you can change it. Categories

00:07:54.189 --> 00:07:57.410
of customer email, internal emails, and everything

00:07:57.410 --> 00:08:00.470
else. And so if we go back to Arnold's inbox,

00:08:00.649 --> 00:08:04.350
you'll see that customer internal and everything

00:08:04.350 --> 00:08:07.930
else is here. And then I further define internal

00:08:07.930 --> 00:08:11.149
by internal leadership and internal informational,

00:08:11.149 --> 00:08:14.449
like information from HR, company news, and so

00:08:14.449 --> 00:08:17.220
on. And then my customers, I have different folders

00:08:17.220 --> 00:08:18.939
that I've made up. These are actually not my

00:08:18.939 --> 00:08:22.040
customers, but just pretend, right? Petco, Costco,

00:08:22.259 --> 00:08:25.100
and so on. And then here's everything else. One

00:08:25.100 --> 00:08:29.699
caveat with this agent is that there is no tool

00:08:29.699 --> 00:08:33.500
to actually create the folder. So if you don't

00:08:33.500 --> 00:08:36.460
create these folders, the emails are just gonna

00:08:36.460 --> 00:08:39.639
stay in your inbox until you do. So just kind

00:08:39.639 --> 00:08:41.639
of a heads up on that. Maybe in the future, we'll

00:08:41.639 --> 00:08:44.590
add an action. to also create folders. And then

00:08:44.590 --> 00:08:47.690
number three actually moves it to the correct

00:08:47.690 --> 00:08:51.110
folder. So here we're saying for customer emails,

00:08:51.370 --> 00:08:54.570
each customer will have its own subfolder. So

00:08:54.570 --> 00:08:58.470
you saw the subfolders. And customer emails can

00:08:58.470 --> 00:09:00.990
be from internal or external sources, right?

00:09:01.149 --> 00:09:03.350
Your team can be talking to you about a customer

00:09:03.350 --> 00:09:06.789
or the customer can actually be contacting you.

00:09:06.950 --> 00:09:09.289
For internal emails that are not related to a

00:09:09.289 --> 00:09:13.179
customer, classify as either informational or

00:09:13.179 --> 00:09:15.740
leadership informational emails you can place

00:09:15.740 --> 00:09:18.379
in a folder and any email from my leadership

00:09:18.379 --> 00:09:22.200
consider urgent and requires a team message finally

00:09:22.200 --> 00:09:24.379
anything that does not fit into these categories

00:09:24.379 --> 00:09:26.980
that's everything else and place them in their

00:09:26.980 --> 00:09:32.740
own folder so it uses this move email tool to

00:09:32.740 --> 00:09:35.370
move the emails you have to call that out and

00:09:35.370 --> 00:09:38.389
then when it's done and it goes to the next step

00:09:38.389 --> 00:09:42.070
which is number four it notifies me of urgent

00:09:42.070 --> 00:09:44.490
emails or emails from leadership like you saw

00:09:44.490 --> 00:09:47.090
from albert the action is for any urgent email

00:09:47.090 --> 00:09:49.450
send the team's message with the email summary

00:09:49.450 --> 00:09:53.470
using this mcp tool so that is the instructions

00:09:53.470 --> 00:09:56.710
which i'll copy and paste the knowledge is completely

00:09:56.710 --> 00:10:00.230
blank web search is enabled doesn't really matter

00:10:00.230 --> 00:10:03.470
and then the tools are the tools that I've been

00:10:03.470 --> 00:10:05.629
using and referencing in the instructions now

00:10:05.629 --> 00:10:09.789
for the tools all you got to do is Microsoft

00:10:09.789 --> 00:10:13.250
Teams MCP and move email you select plus add

00:10:13.250 --> 00:10:17.529
tool and here if you go to MCP model context

00:10:17.529 --> 00:10:20.809
protocol you'll be able to find this Microsoft

00:10:20.809 --> 00:10:24.509
Teams MCP I hope that you find it if some of

00:10:24.509 --> 00:10:26.970
you don't have it maybe it's coming soon but

00:10:27.450 --> 00:10:29.529
I've heard some people might not have this. And

00:10:29.529 --> 00:10:33.009
if you don't, try using some of the other actions

00:10:33.009 --> 00:10:37.289
that are just available as connectors. And the

00:10:37.289 --> 00:10:40.690
other tool that we have, this move email V2.

00:10:41.029 --> 00:10:44.409
So all you do is you go to add tool and then

00:10:44.409 --> 00:10:49.210
here, just do a search for move email. And when

00:10:49.210 --> 00:10:52.740
you search for it, then it should. show up here

00:10:52.740 --> 00:10:55.980
so there it is move email v2 you select it there's

00:10:55.980 --> 00:10:58.779
nothing else to it no agents no topics no suggested

00:10:58.779 --> 00:11:02.139
topics that's all there was to it let's do a

00:11:02.139 --> 00:11:05.120
little bit of testing as i send other emails

00:11:05.120 --> 00:11:10.039
to this so here's an email that is kind of like

00:11:10.039 --> 00:11:14.340
a junk email it's like a commercial of shopping

00:11:14.340 --> 00:11:21.720
and then here's another one And this is Joe from

00:11:21.720 --> 00:11:24.519
Bloomingdale's and we're interested in a co -pilot

00:11:24.519 --> 00:11:27.899
studio. And the reason why I sent this is because

00:11:27.899 --> 00:11:30.460
I don't actually have a Bloomingdale's under

00:11:30.460 --> 00:11:33.340
my customer. So I want you to notice what ends

00:11:33.340 --> 00:11:35.620
up happening, which is basically it should just

00:11:35.620 --> 00:11:40.700
stay in here. All right, and so this is another

00:11:40.700 --> 00:11:44.139
email saying that. This is sure from Petco and

00:11:44.139 --> 00:11:47.139
we'd like to meet with you. This email should

00:11:47.139 --> 00:11:50.259
get moved to Petco because there's actually a

00:11:50.259 --> 00:11:53.200
folder. Now, one of the emails already disappeared.

00:11:53.600 --> 00:11:56.539
So let's see where that went. And it actually

00:11:56.539 --> 00:11:59.259
went into everything else. And so that was the

00:11:59.259 --> 00:12:02.500
email that was basically commercial. It was just

00:12:02.500 --> 00:12:05.929
junk. So it correctly moved it into everything

00:12:05.929 --> 00:12:08.149
else. All right. It looks like another one of

00:12:08.149 --> 00:12:10.509
the emails just got moved, which it is the Petco

00:12:10.509 --> 00:12:12.769
one. So it got moved correctly to the Petco one.

00:12:13.009 --> 00:12:15.950
And then this one, the one that's from Bloomingdale's,

00:12:16.009 --> 00:12:18.070
I suspect nothing is going to happen to it because

00:12:18.070 --> 00:12:20.429
there's no folder for it. So that's it. I hope

00:12:20.429 --> 00:12:22.730
this makes sense. And this is something that

00:12:22.730 --> 00:12:25.690
you can execute for your own inbox. And I do

00:12:25.690 --> 00:12:28.490
want to give you one other tip. If in case you

00:12:28.490 --> 00:12:30.970
have an issue and you're like, oh, I don't like

00:12:30.970 --> 00:12:33.429
this. It's not working. You can always go to

00:12:33.429 --> 00:12:35.830
the agent and all you got to do is go to the

00:12:35.830 --> 00:12:38.149
trigger section, select these three dots and

00:12:38.149 --> 00:12:40.769
delete the trigger. As soon as you delete that

00:12:40.769 --> 00:12:43.389
trigger, there is no more trigger for the incoming.

00:12:43.570 --> 00:12:45.549
And so this agent is not going to be doing anything.

00:12:45.669 --> 00:12:48.429
So just as a heads up, you can always get rid

00:12:48.429 --> 00:12:51.110
of the agent by just deleting the trigger. And

00:12:51.110 --> 00:12:53.970
then you can fix your instructions and add the

00:12:53.970 --> 00:12:56.730
trigger back in to make it go live again. So

00:12:56.730 --> 00:12:59.580
it's as easy as that. Let me know if. you've

00:12:59.580 --> 00:13:02.200
made updates and improvements to the instructions

00:13:02.200 --> 00:13:05.539
or you added some other components to this agent

00:13:05.539 --> 00:13:10.500
to improve it so you might be thinking well sure

00:13:10.500 --> 00:13:13.519
there's already ways of sending emails to folders

00:13:13.519 --> 00:13:15.720
like if you go to outlook which you're looking

00:13:15.720 --> 00:13:18.649
at here and you go to settings you can actually

00:13:18.649 --> 00:13:22.090
then go under mail go to rules and you can add

00:13:22.090 --> 00:13:25.129
a new rule and you can set the different conditions

00:13:25.129 --> 00:13:28.909
like if an email is coming from a certain person

00:13:28.909 --> 00:13:31.909
or there's certain keywords you can then move

00:13:31.909 --> 00:13:34.730
them from an action perspective into different

00:13:34.730 --> 00:13:38.259
folders but this is not really using ai so it's

00:13:38.259 --> 00:13:40.740
not dynamic from an intelligence perspective

00:13:40.740 --> 00:13:43.179
it's very static and it's also not notifying

00:13:43.179 --> 00:13:45.320
you of urgent emails and team and then you might

00:13:45.320 --> 00:13:47.100
be wondering well sure there's another feature

00:13:47.100 --> 00:13:49.879
coming out and it's called outlook prioritize

00:13:49.879 --> 00:13:54.000
my inbox by copilot and it basically prioritizes

00:13:54.000 --> 00:13:57.179
your inbox by copilot marking high priority items

00:13:57.179 --> 00:14:00.320
i've shown this in the past and i actually have

00:14:00.320 --> 00:14:03.360
this feature it's rolling out at the moment so

00:14:03.360 --> 00:14:05.240
it's now fully out and people have been asking

00:14:05.240 --> 00:14:07.320
about it then this is kind of what the feature

00:14:07.320 --> 00:14:10.600
looks like and you can tell it things that are

00:14:10.600 --> 00:14:13.120
higher priority and things that are lower priority

00:14:13.120 --> 00:14:17.440
still this isn't doing the folder routing as

00:14:17.440 --> 00:14:19.440
well as the notification inside team so this

00:14:19.440 --> 00:14:21.899
is good and i'm only showing these because i

00:14:21.899 --> 00:14:24.299
want to show people that there are alternatives

00:14:24.299 --> 00:14:26.740
so if you're not into building an agent in copilot

00:14:26.740 --> 00:14:28.200
studio you can just stop right now
