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 Name | Data Type |
|---|---|
| Title | Single line of text |
| Description | Multiple lines of text |
| Due Date | Date and Time |
| Assigned To | Person or Group |
| Priority | Choice (Low, Medium, High) |
Now follow the steps below:
- 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.

- Then, select the ‘+ New agent flow‘.

- 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.

- Then, choose your SharePoint site and the list you created (Task Priority Tracker or any list you want to use).

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.
- Add the Run a prompt action under the Prompt, click + New custom prompt.

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.

Now follow the steps below:
- Prompt Name: Give your prompt a meaningful name, such as ‘Analyze Task Priority’.
- 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.

- 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.
- Click the Test button to check how Copilot responds.
- You should receive one of the values: Low, Medium, or High.

- Once you are satisfied with the results, change ‘Text‘ to ‘JSON’, then click ‘Save’ to add the prompt to your flow.

Connect the Prompt to Our Flow
- 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.

- 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.

- 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.

- 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.

- 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}

- 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).

- 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.

- 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.
- 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.

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

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

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.

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

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

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.

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:
- Add Copilot to Power Apps
- Create Autonomous Agents in Copilot Studio
- Add a List in Power Pages
- Create a Power Apps Weather App
- Add a Multistep Form in Power Pages
- Import CSV Data to Microsoft Dataverse Using Power Automate

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.