In my previous blog post, I explained how to build Microsoft Copilot Studio agents using Knowledge and Topics (Agent Flows) using a Running Registration Agent example.
In this post, we’ll build an agent that can collect details from the user, generate a Run training plan, and turn that plan into real tasks using Microsoft Planner.

Role of well-defined instructions:
In this example, most of the requirements — asking the right questions, generating a 7-day plan, and using Microsoft Planner only when requested — are achieved through clear and well-structured instructions.
Below are the instructions used for this agent.
You are Run Training Planner.Help users only with running and run-training plans.Be friendly, polite, and encouraging.Keep everything simple and easy to understand.Step 1: Gather basic detailsAsk the user for:- Name- Age- Running goalStep 2: Suggest a plan- Create a simple 7-day running plan- Use easy language- Mix run, walk, and rest days- Show the plan clearly day by dayExample format for a 7-day plan:Day 1: Easy walk + light jog (20 minutes)Day 2: Easy run (15–20 minutes)Day 3: Rest or light walkDay 4: Easy run (20 minutes)Day 5: Walk + short run intervalsDay 6: Easy run or long walk (25 minutes)Day 7: RestStep 3: Planner actions (only when the user asks)Use Microsoft Planner tools only when the user requests it.Create tasksIf the user says things like:- “Create this in Planner”- “Add this plan to Planner”Before creating tasks:- Ask the user when they want to start the plan (today, tomorrow, or a specific date).- If the user says “today” or “start now”, use today’s date.When creating tasks:- Create one task per day using the Create tool.- Set Start Date and Due Date for each task. - Day 1 = selected start date - Day 2 = start date + 1 day - Continue until Day 7- Assign all tasks to the current user.Get / list tasksIf the user asks:- “Show my plan”- “Get my Planner tasks”- “List my running tasks”Use the List tool to show the tasks.Update tasksIf the user asks:- “Update day 3”- “Change the duration”- “Modify my plan”Use the Update tool to update the requested task.If it is not clear which task to update, ask a simple follow-up question.Delete tasksIf the user asks:- “Delete the plan”- “Remove all running tasks”- “Delete day 5 task”Confirm before deleting all tasks, then use the Delete tool.Important rules- Do not create, update, list, or delete Planner tasks unless the user asks.- Ask only for the minimum information needed.- If required information is missing, ask a simple follow-up question.- Do not answer non-running related questions.Tone- Beginner friendly- Clear and simpleExample closing question:“Would you like me to create this plan in Microsoft Planner? If yes, when should the plan start?”
What is Microsoft Planner and why use it here?
Microsoft Planner is a simple task-management tool included with Microsoft 365. It allows users to create plans, add tasks, assign dates, and track progress.
A weekly running plan is already a list of tasks — one task per day. By adding those tasks to Planner:
- each training day appears with a date,
- tasks show up in My Tasks,
- progress can be tracked as the week goes on.
Planner becomes the place where the agent’s output turns into something actionable, not just text in a chat window.
Now that we understand the intent behind building this agent, let’s move on to the configuration steps.
Planner setup:
- Go to planner.cloud.microsoft to access Planner directly from your browser.
- Under My Plans select Create a new plan

- Choose Basic template.

- Provide a Name and click on Create.
- In this example, I created a plan named RunTrainingPlan.

- At this point, the plan contains no tasks.

Copy ‘Plan ID’ and ‘Group Id’:
One important thing to note is that Copilot Studio’s Planner tools require a Plan Id and a Group Id.
- Get the Plan Id from the browser URL as shown below.

- Group Id is the name of the Plan (i.e., RunTrainingPlan).
- Although Planner APIs require a Microsoft 365 Group ID, Copilot Studio’s Planner connector can automatically resolve the group when a plan name is provided
- Save both the Plan Id and Group Id — we’ll use them when configuring the agent tools.
With Planner set up, let’s move on to configuring the agent.
Creating the Agent in Copilot Studio:
- Sign in to Copilot Studio.
- Navigate to Agents → New agent.

- Provide Description and Instrcutions.
- Note : Copy and Paste the Instructions from above sections.

Add Planner Tools:
Next to enable the Microsoft Planner actions in the Agent:
- Go to Tools > Add tool
- Select Planner

- Choose the tools you need. In this example I’ve chosen following tools.

- Note : While adding tools, you’ll be prompted to authenticate. Complete the authentication to proceed.
Configure Tools:
Since tasks must be created in a specific plan (RunTrainingPlan), additional configuration is required for the Planner tools like Create a task and List tasks.
- Open the the Planner tool which you added previously (for example, Create a task)
- Under Inputs, set Group Id and Plan Id as custom values as shown below.
- Note : Copy the Group Id and Plan Id which we captured in above sections.

- Save the tool.
- Repeat this step for the other Planner tools as needed.
Conversation start topic
Update the Conversation Start topic to replace the generic greeting with a message that matches this scenario. This helps guide the user and sets clear expectations from the start.

With this, the agent is fully configured with Instructions and Planner tools.
Test the Agent:
With everything configured, testing the agent is straightforward.
- Provide the Name, Age and Goal.

- The agent generates a 7-day training plan. Agent asks whether to create tasks in Planner and for a start date. Respond with Yes and choose a start date (for example, tomorrow).

- Agent adds the weekly plan to RunTrainingPlan.

- You can also ask the agent to:
- list the tasks,
- update a specific day,
- delete tasks when needed.

Hope this helps you understand the basics of using Tools and Instructions in Copilot Studio. By integrating Microsoft Planner, agents can turn generated plans into real, trackable tasks that users can actually follow.
🙂


![[Step by Step] Beginner : Create a PCF control and add it to a custom page](https://rajeevpentyala.com/wp-content/uploads/2024/12/image-49.png)
Leave a comment