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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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 Microsoft 365

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.

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.

46 thoughts on “Export Planner to Excel using Power Automate

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


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

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

    1. 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. It is stuck in an infinite loop. When I have the spreadsheet open, it keeps on listing the same tasks over and over.

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

  6. I got this to work but its pulling the Bucket ID rather than the name. I looked through all of the options and don’t see anyway to pull the name from the list. Can you think of a way to do this? There are over 100 plans its pulling. Thanks

    1. Hi Dave,

      It is possible to get the bucket name using the List bucket action. This will probably slow down the flow a bit as it will require another Apply to each

      List buckets action

  7. First, thank you! I have gotten this flow working and it works well. Second, is it possible to get the bucket name rather than the bucket ID? I am pulling over 100 planner hubs so getting the bucket is pretty important and I can’t figure out how to accomplish that. I also don’t see a download link in the article. Thanks again!!

    1. Hi Heather,

      It is possible to get the bucket name using the List bucket action. This will probably slow down the flow a bit as it will require another Apply to each

      list buckets

  8. This may be a silly comment but what do I do with the downloaded solution? Can I import it with PowerAutomate?

  9. Hello Pieter, did I miss something or both Tasks and Buckets are linked to Group and Plan ID? When I try to pull both Bucket Name and task title I get duplicated lines in my Excel Table. Is there a way to pull “merge” both into one array that contain each task once and the associated Bucket name.
    That would be ideal, other than that, this post really saved me some times!

    1. Hi Alexandre,

      I don’t think that the bucket really adds much as each task seems to also have the details of the bucket that it is part of anyway. I guess if you wanted to check in a flow or app which buckets exist in a team them that might be a use.

      1. Agreed, I’m only missing the “Bucket Name” or a way to represent a list of task by Bucket…Seems to be a challenge to export in excel.

      2. You can run a list buckets action to collect the bucket details. Then use a filter array action to get the single record that you want. Once you have a single record get the name of the bucket as a single text and use this in a select action to merge the tasks and the bucket name.

        Now you have your array with all the details needed to export to Excel.

  10. I am having trouble determining where to place the “List Buckets” command in my Power Automate. It is asking for Group ID and Plan Id, however, I have a lot of different Groups IDs and Plan Ids I am trying to pull from.

  11. Hello,
    First of all, thanks for your code!
    However, I am having the same problem as Dave and Heather, I get in the “Buckets” column only IDs except that I would like the names of the buckets.
    I saw that you gave a solution but I can’t get it to work … can you give me the code to make the buckets names appear directly using “List Buckets” please?

    1. Hi Simon,

      You can plaxce a list buckets just before the list tasks as shown below:

      List Buckets

      Then wherever you need the bucket name simply get it from the dynamic content of that list bucket action.

  12. Thank you for your response!

    But, I still have a problem…

    What I want is to get an excel file in which each task is associated with its bucket.

    However, I get an excel spreadsheet in which each task is associated with all the compartments of the planner.

    If you don’t mind, can you help me with this problem or send me a link with your correct code in my case


    1. Hi Simon,

      If it is slightly more complicated than expected then it would probably need a bit of additional work. I will try to have a look at it when I have some time available.

      1. OK…

        Can you send me your email address, so I can send you the pictures of my results…

        Thank’s a lot for your time


  13. Hi Pieter,

    It is probably not possible but can power automate use the “Export plan to excel” options in planner and then save the output in a specific folder and do this for a specific list of planners which is either hardcode in the flow or driven by a export setting file (excel, csv, etc.)?

    Thanks for a great post.


  14. Hi Pieter, can you please post a photo of the flow as a whole? I can’t tell if the every ‘apply to each’ is nested or not thank you!

  15. Hi Pieter,

    Is there a way for me to get 1 task per line and have the assignees in the same line, instead of getting the same tasks multiple times because each assignee of the tasks is added as a new line in the excel table?

  16. Pieter- was trying to upload the .zip file you linked to – have got this message several times. Any ideas?

    You’ll need to resolve these conflicts before importing the package

    Resource: Export Plans
    Import setup: Create as new


    Flow save failed with code ‘DynamicOperationRequestClientFailure’ and message ‘The dynamic operation request to API ‘excelonlinebusiness’ operation ‘GetTable’ failed with status code ‘NotFound’. This may indicate invalid input parameters. Error response: { “status”: 404, “message”: “Item not found\r\nclientRequestId: 0fcdd1e2-37a6-4da5-9456-6f90987345c8\r\nserviceRequestId: 179676dc-ec6f-47db-80e2-08fdcf99aff4”, “error”: { “message”: “Item not found” }, “source”: “excelonline-eus2.azconn-eus2.p.azurewebsites.net” }’.

  17. Hi Pieter, firstly thank you for this, very helpful. I am struggling to get the due date in a better format, I have visited your link to the page that discusses formatting dates, but I am still struggling.

    How do I get the Due Date to format using the formatDateTime?

    This is what I have now –> “item/Due Date”: “@items(‘Apply_to_each_2’)?[‘dueDateTime’]”,

    This is what I added as an expression –> @formatDateTime(items(‘Apply_to_each_2’)?[‘dueDateTime’], ‘dd-MM-yyyy’)

    But I keep getting an error saying that the expression is invalid. What would be a valid expression?


    1. Hi Gary, Is the due date field always set? When it is empty I would expect that the formatDateTime function would fail. you could include an if around that function that checks if you have a due date or not.

  18. Thanks Pieter. If I have “item/Due Date”: “@items(‘Apply_to_each_2’)?[‘dueDateTime’]” then I get results for Due Date – this is an example 2020-12-25T10:00:00Z18-12-2020

    As you can see the format is not pretty, I just want day, month and year. So I tried to use formatDateTime to reformat the date. When I try to use @formatDateTime(items(‘Apply_to_each_2’)?[‘dueDateTime’], ‘dd-MM-yyyy’) — I get a invalid expression

    1. Hi Gary,

      This worked for me:

      Datetime formatted example

      This is the full expression:

      In your expression do you see that @ sign in your expression editor. In which case that will be the problem. Otherwise check those single quotes as they don’t match, but that might just be a website formatting issue.

  19. Hi Pieter, and thanks a lot for the guidance so far!

    Could you be so kind as to explain briefly what made the flow run in a loop?

    (I’ve tried importing your flow from downloads – but it won’t import)

  20. Hi Pieter, is it possible to elaborate on this? What do you mean with “content of the csv generated by the flow”?


    1. Rather thna creating an excel file you could generate a CSV file instead. It means that you could generate the csv content and create a file with that content. That option however is not used in the post as I used the xlsx format.

Leave a Reply

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

%d bloggers like this: