Create an Agent Flow Using Designer in Copilot Studio

Last week, I assisted a client who was having trouble managing tasks in their SharePoint list. Their team continued to add new tasks, but there was no way to review or prioritize them. Because of this, important tasks were getting delayed.

So, I recommended using Copilot Studio to build an AI-powered agent flow. This flow would automatically:

  • Read the task description
  • Determine the task’s priority as Low, Medium, or High based on the description.
  • Take action accordingly, such as sending an email, a Teams message, or initiating an approval process.

In this blog post, I will show you how to create this type of agent flow using Copilot Studio.

Create an Agent Flow Using Designer

Before I show you how to create an agent flow, we first need to create a SharePoint list.

For this example, I’m using a SharePoint list called Task Priority Tracker. It includes the following columns:

Column NameData Type
TitleSingle line of text
DescriptionMultiple lines of text
Due DateDate and Time
Assigned ToPerson or Group
PriorityChoice (Low, Medium, High)

Now follow the steps below:

  1. Open your browser and go to Copilot Studio. Sign in with your Microsoft 365 account (if not already signed in). In the left-hand navigation menu, click on Flows.
Create an agent flow as a tool in Copilot Studio
  1. Then, select the ‘+ New agent flow‘.
Create an agent flow as a tool  Copilot Studio
  1. In the Designer, click Add a trigger. In the search bar, type When an item is created. From the SharePoint connector, select When an item is created.
Agent Flows Copilot Studio
  1. Then, choose your SharePoint site and the list you created (Task Priority Tracker or any list you want to use).
How to create an agent flow in Copilot Studio

Then, I need a way for the AI to identify task priority based on the Description, so I will add a ‘Run a prompt action’ from the Microsoft Dataverse Connector.

  1. Add the Run a prompt action under the Prompt, click + New custom prompt.
copilot studio natural language input

Follow the section below to learn how we can use Copilot to generate a custom prompt. Otherwise, skip this and jump to the Connect the Prompt to Our Flow section.

Add Custom Prompt using Copilot

After clicking the + New custom prompt, a new window opens where you can define how Copilot should interpret the task description to determine the priority.

copilot studio flow description example

Now follow the steps below:

  1. Prompt Name: Give your prompt a meaningful name, such as ‘Analyze Task Priority’.
  2. Then, under the Get started with Copilot (Preview) ” section, we can describe how Copilot will give a prompt.
Based on the task description provided, determine the priority level. Return only one of the following values: Low, Medium, or High.

Once you’ve written the instruction, click Submit draft with Copilot. This allows Copilot to process your prompt and make it available for use.

copilot studio flow generation screen
  1. Click Task Description (This parameter will be dynamically populated from the Description field of your SharePoint list item.) Then, under the Sample data section, enter a sample task description. For Example:
    • This task involves preparing a critical report for the executive team by the end of the day.
  2. Click the Test button to check how Copilot responds.
  3. You should receive one of the values: Low, Medium, or High.
copilot studio AI suggested steps
  1. Once you are satisfied with the results, change ‘Text‘ to ‘JSON’, then click ‘Save’ to add the prompt to your flow.
agent flows in microsoft Copilot Studio

Connect the Prompt to Our Flow

  1. Now that your prompt is ready, in the Run a prompt action, select your newly created prompt (Analyze Task Priority). Under ‘Task Description’, map it to the ‘Description’ field from the dynamic content.
copilot studio keep it and continue
  1. Next, in the Update item action, provide the Site Address, List Name, Id from When an item is created action, then Priority Value, and give the Priority from Run a prompt.
Edit and manage your agent flow in the designer
  1. After the update steps, click + Add an action. Search for and select Switch. In the On field (the parameter the switch will check), select the Priority value from the Update item or the dynamic content.
Copilot Studio – New Agent Flow Creation
  1. Add Case Equals value Low. Inside this case, add an action: Send an email (V2):
    • To: Assigned To Email (dynamic value)
    • Subject: New Low‑Priority Task: Title
    • Body: Include Title, Due Date, and Description.
Add a Trigger in Copilot Studio Agent Flow
  1. In this case, 2 Equals Medium. Inside this case, add an action: Post message in a chat or channel:
    • Recipient: Assigned To (dynamic value)
    • Message (simple text or Markdown):
📌 New Medium‑Priority Task
Title: @{Title}
Due Date: @{DueDate}
Description: @{Description}
Configure Switch Action in Agent Flow Designer
  1. Inside the High branch, add one extra step before starting the approval. Add Get manager (V2) (from the Office 365 Users connector) under User (UPN): select Assigned To Email (dynamic content).
Agent Flow – Add Variables Step
  1. Add Start and wait for an approval action, and provide the below parameters:
    • Approval type: Approve/Reject – First to respond
    • Assigned to: Manager (dynamic value)
    • Title / Details: Include Title, Due Date, Description.
Steps to Trigger an Agent Flow Automatically
  1. Then, add a condition action to check that the Outcome equals ‘Approve‘. In the True section, add a Send an email (V2).
    • To: Assigned To Email
    • Subject: High‑Priority Task Approved: Title
    • Body: Include Title, Due Date, Description.
  2. In the False section, add a Send an email (V2) and provide the following parameters:
    • To: Created by (dynamic value)
    • Subject: High‑Priority Task Rejected: Title
    • Body: Let the creator know it was rejected and include any comments from the manager.
Track User Actions in Agent Flow Sessions

After creating the flow, click Save draft and then click Publish.

Agent Flow Path Based on User Role

Next, go to the SharePoint list and add an item.

Error Handling in an Agent Flow

After the flow runs, go back to your SharePoint list and refresh the page. You’ll see that the Priority column is now updated automatically based on the task description.

Create an Agent Flow Using Designer in Copilot Studio

In my case, since the Priority was set to High, the Manager received an approval request email.

Dynamic Variables in Agent Flow Logic

Once they respond, the flow will continue, either sending a confirmation to the Assigned To person if approved.

Create an Agent Flow Using Designer in Microsoft Copilot Studio

This way, you can easily create an agent flow that uses AI to handle task priorities automatically. One more thing: Once the agent flow is created in Copilot Studio, you can also access and manage it directly in Power Automate under the Flows section.

Copilot Studio Agent Flow Using Designer

As you can see in the above screenshot, when you go to My flows in Power Automate, you’ll find the agent flow listed like any other. Under the Plan section, it clearly shows Copilot Studio, confirming that this flow was created using the new designer experience.

Also, you may like some tutorials:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App