Export Planner to Excel

Export Planner to Excel using Power Automate

Planner can be a great tool to manage your tasks, but how do you export planner to Excel files with Power Automate?

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.

Export Planner to Excel using Power Automate 1

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.

Export Planner to Excel using Power Automate 2

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.

Export Planner to Excel using Power Automate 3

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.

Export Planner to Excel using Power Automate 4

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.

Export Planner to Excel using Power Automate 5

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.

Export Planner to Excel using Power Automate 6

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.

Export Planner to Excel using Power Automate 7

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.

Export Planner to Excel using Power Automate 8

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

Export Planner to Excel using Power Automate 9

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.

10 thoughts on “Export Planner to Excel using Power Automate

  1. commented on May 7, 2020 by Mr Nigel

    Hi Pieter,

    Less than 24 hours ago I was in a meeting where the use of Planner for simple task management was rejected because you cannot export the tasks. Were you listening in, because this post solves the issue 😉

    Many thanks

    Nigel

  2. commented on May 14, 2020 by Anubhav Kumar Singh

    Have you looked at the Export to Excel option provided by Planner itself?

  3. commented on May 27, 2020 by Timothy Lombardo

    I am trying to replicate this and the flow is not terminating. Would you be able to provide a screen capture of what the final flow looks like?

    • commented on May 28, 2020 by Pieter Veenstra

      Hi Timothy,

      Do you means that your flow keeps running forever. It might be that you have a lot of plans to go through.

      One thing you could do is open the excel in Excel online while your flow is running. Do new entries appear and keep appearing?

  4. commented on May 28, 2020 by Timothy

    It is stuck in an infinite loop. When I have the spreadsheet open, it keeps on listing the same tasks over and over.

  5. commented on June 1, 2020 by Bill Hanson

    I too am suffering from the infinite loop. While the excel document is open, the tasks repeat. I’ve killed the process up to 4 minutes run time with the same outcome.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: