If you’re new to agent flows, this post will help you get started. I’ll share more about agent flows in upcoming posts.
Creating a Topic
Table of Contents
When we add a Topic to our agent in Copilot Studio, we get a blank Trigger and Message step. Then all we need to do is adding our agent flow that we will develop shortly. You can do this by selecting Add a tool and then New Agent flow.

This will now add an action step to our topic.

To do agent flow
I’m going to use Microsoft To Do as a base for my example Agent flow.
My agent flow will have the following steps. The first and last step will both be added when you create your agent flow to your topic.
Then in between those initially created steps we add a List to-do’s by folder. Then a Compose step which takes the title , due date and status of the To Do Tasks. Remember you don’t need to add the For each step. The for each will be added as soon as you add Title to the Compose action.

For the Compose 1 action I’m adding the following expression
outputs('Compose_1')
The above will give us an array of lines with task details.
To return data from your agent flow to your agent, can be done in a similar way as we are used to with cloud flows.

Attaching existing agent flows to your agent
There are two ways to connect you Agent Flow to your Copilot Agent. We already looked at adding a new agent using the Add Agent flow, however if you have an existing flow you might want to use the existing flows as shown below. This immediately shows the issue that the default names of the Agent flows is Untitled. When you create an Agent flow make sure that you give your flows a name.

You can name the flows by clicking on the name of the Agent flow.

Take the output from an agent flow
Now that we have an agent flow generating our output, we can update our Agent’s Topic to display the data.

Testing your Agent flow
We can now test our Agent flow by for example typing Show all my tasks in Todo.

This will now give us the expected result. How about if we only want to display the incomplete tasks? We can simply adjust our ask to Show all incomplete tasks. This will now filter the data for us without us having to adjust the agent flow.

Discover more from SharePains
Subscribe to get the latest posts sent to your email.