Yesterday I was asked exactly this question.
First of all, you should always ask yourself, do I really need to export data or could I just use it where it already is?
The Planner Structure
The structure for tasks in Planner is quite simple.
A Team in Microsoft Teams is connected to one group. A Group has none, one or more plans. Each plan can have tasks in it.
Tasks can have a start date, a due date, a description and they can be assigned to people and there is quite a bit more, but I don’t want to go into the details of that now.
Building the Export planner to Excel flow
First things first, To Export planner to Excel, I will need to list all my teams. This will give me a list of groups that I want to look at. I’m using a manually triggers flow but you could also schedule this on a regular basis.
Using this list of teams we can now collect all the plans. Remember the teams are connected to groups. And the groups hold the plans. Using the List plans for a group action will give us a full overview of the plans within the organisation.
For the Group Id we can use the group Id supplied by the List Teams action. The will appear as dynamic content for you, so nothing complicated here.
Then for each of the plans we can collect all the tasks using the List Tasks Action. All we need to supply again is the group id and the plan Id. Both of these are readily available from the action that we added earlier on.
The Plan Id is supplied by the list plans for a group action. So far it is all quite easy to collect all the plans..
If we now added an Excel action to Add a row into a table we would probably get something like this.
That is ugly!
We want to see people’s names not ugly IDs. Also the Due date could do with cleaning up.
Using the Get user profile action we can collect the user’s details. The Get user profile action can take the user id that has been supplied by the List tasks action.
All we need to do is use the value assignments Assigned To User id property. Yes, that isn’t a very nice display name of a property.
Now we can use the display name of the user profile to update our Excel file to give us a nice and clear picture of the users that have been assigned to the task. In this post I’m not going to look at merging all these people into a single piece of text, however this is of course possible. In my case I will create multiple entries in my excel file.
In my example I’ve only used Task, Assigned To and Due Date. But you could of course use any data found in the tasks. I could imagine that start date, name of team and other fields would also be of interest.
This now results in the following listing of my data in Excel
That looks a lot better!
Now there is just one thing left to do and that is format the date nicely. For this please have a look at my post about Formatting dates in Power Automate.
In this post I didn’t consider performance. There are quite a lot of changes that I would probably make to make this work for larger organisations with many plans and many tasks. This post however will help you get started with the beginning of the export Planner to Excel.
Priority in Planner
Have you noticed that the connector doesn’t return the priority of tasks?
Are you interested in including the priority in your exports? The following user voice item is asking for this field to be added to the API of Microsoft Planner
Download the solution
In general I prefer to just post the steps rather than giving a download, but this time I will make an exception.
If you want to download the full solutions then please visit the downloads page.