Introduction
The new Copilot workflows agent will automate your job. And today I'll show you step by step how to use it. If you use Outlook, Teams, or SharePoint, you'll want to learn how to use this simple AI tool to your advantage at work. My name is Shervin Shaffy and I'm a Copilot principal engineer at Microsoft. Welcome to Collaboration Simplified.
Slides on the Copilot Workflows Agent
Let's look at a few slides to level set before we do the build. Building apps, flows, and agents in Microsoft 365 Copilot. We actually have three different applications. There's the app builder, workflows in the center, which we're going to focus on today, and also Copilot Studio, both the light and the full version.
The idea here is that you're basically using natural language and leveraging the Microsoft 365 Copilot license for businesses and enterprises to automate your workflows. In the past, I've done a lot of content on Copilot Studio. What we're going to be doing today is take one of those agents that I built in Copilot Studio, that autonomous email agent, and rebuild it using workflows.
The key with these tools is that they're all conversational AI building tools, meaning that they work in the flow of your work. You can use your words to tell these tools what to do. They can be used for yourself personally, and you can extend them out to your team as well. They already have access to your M365 applications and your data, and they leverage the security and compliance of the Microsoft 365 Copilot ecosystem.
More specifically, this workflows agent allows you to automate your workflows between applications like Teams, Outlook, SharePoint, Approvals, and Planner. Together we're going to build an example of this right now. Okay, so let's get started.
Building a Copilot Workflows Agent
I've already logged into my Microsoft 365 Copilot. I opened a browser and gone to this site. The first thing you're going to do is go to where it says "Explore agents" and select that. This takes you to the agent store. If you scroll down a little, you'll see all the agents built by Microsoft, and this one right here is the workflows agent. Notice that the app builder and workflows are both part of this Frontier program, which is the step before things become generally available.
When you select the workflows agent, you have the option of adding it to your profile. So we'll select Add. Here it is, and it just popped up for me. I can also see that it shows up under Agents on this left rail. Now I have the workflows agent. It gives you a few built-in options right away. For example, this is a prompt you can type in about unread emails: "Each weekday morning, review all the unread emails." You can try this out. I'm not going to, but you certainly can.
Now, the autonomous email agent I built in the past. Those of you who remember Copilot Studio know I created this inbot, and the inbot scans all my incoming messages, uses different knowledge sources, and automatically responds to the emails. Every time a new email comes in, which is the trigger, it has a set of instructions, a bunch of knowledge sources, and then it uses a tool, sending an email, to answer emails for me automatically, which is quite awesome.
We can replicate this. We're going to go back to this workflows agent, and I've written up the prompt. If we expand it, it says: when a new email comes into my inbox, check to see if any questions are directed at me. If they are, use all available knowledge sources, both internal and external, to research the questions in the email. Reply to me by email with detailed responses based on your research. Do not respond to the sender, because I want to make sure it looks okay. If you're really brave, you can send it right away to the sender. Make sure the email is formatted in HTML, respond in a professional manner, and write it as if you were replying to the sender's email. For each question, start a new paragraph and write a detailed response that includes links to all the references. The more verbose, detailed, factual, and illustrative, the better, and include diagrams where appropriate. Sign off with "Regards" followed by my name, and make sure the original email is included at the end. Then send me a Teams message with a summary of who sent the email, what their questions were, and a brief summary of what you responded.
This is new. I didn't have this in my autonomous agent, but I'm leveraging workflows to get a Teams message update as well. So this creates an autonomous agent with a trigger. When we execute it, you'll see it plugging in everything I had to build manually inside Copilot Studio. In Copilot Studio I did everything manually, but here it's doing it automatically inside this workflows agent, which I think is super awesome.
Here you can see it creating a trigger for when a new email arrives in my inbox. It is analyzing the emails for questions, then researching the questions. Then it sends an email back to me so I can proofread it before sending it to whoever sent it to me. And it sends me a Teams summary so I can see what it did, because I might be more active on Teams.
If we scroll up, it tells me everything it did and all the assumptions it made. Check those, and if something is not right, give it more instructions. If everything looks good, click Save. This time, when it saves, it won't actually do anything, because it only gets triggered when new emails arrive. So we're going to send an email into it and see what it does.
Before we do, I want to show you one thing I have set up in Outlook, because I don't want to create a loop. Every time the agent sends an email from my account, if it landed in my inbox, it would trigger the agent again, which would respond again, creating a crazy loop. So I've gone to Mail, to Rules, and created this inbot rule: every time an email comes from me, because the agent acts on my behalf and sends it from me, move it to this inbot folder. I had this previously, but I can leverage it for this workflows agent as well.
From another computer, I'm logging in and sending an email with a bunch of questions. It basically says: "Hello, Albert. You're so smart and it was great meeting you. Can you tell me more about Copilot Studio and how I can build agents? How are agents priced and what license do I need? I'm also interested in M365 Copilot for productivity."
If we go to the agent we just created and click Activity, you can see it running now. If I select it, you can see the trigger got executed. It's analyzing the email for questions, researching the questions, and telling you how the information it gathered as it researched it. It sends the email using this action, and eventually it sends me a report inside Teams.
If we go to my inbox now, there's a number one here, so a new email has arrived. It has the answers to the questions. The first question was: can you tell me more about Copilot Studio and how I can build agents? It gives a response as well as a hyperlink. How are agents priced? It uses metrics such as the number of interactions and APIs, and includes information on Studio pricing. What license do I need? It gives information about the licenses. I'm also interested in Copilot for productivity: what new features are there? It gives information about the features as well as the M365 Copilot blog. It also includes the original email, as I asked.
We also asked it to send us a message inside Teams. Let's open Teams and see if the workflows agent did that. On the left-hand side you have your typical chats, but there are also messages sent by this workflows agent. With that selected, you can see the email summary. It says who sent the email, what the questions were, and a brief summary of all the responses. That's exactly what we asked. So you're not only getting a crafted email you can send to the sender, you're also getting status updates inside Teams.
I hope you found this video useful. I'd love to know how you end up using the workflows agent and what cool prompts or use cases you come up with across the different applications. As always, if you found this useful, give it a like, consider subscribing, and in the future we can do a session on the app builder, because that's the only one I haven't covered to this day. Thanks so much for watching, and I'll catch you on the next one.
