02-20-2022 06:45 AM - last edited 02-21-2022 10:44 AM
Unlike the out of the box ability to export planner to excel, Power Automate does not support this natively. Whilst there is an action to list tasks, some of the data is referenced by GUIDs/IDs or category names, for example assigned to users, bucket ids or labels. I have built an efficient flow that will hopefully allow you to export your planner tasks for a specific plan to a new Excel File, containing a table, ready for you to use elsewhere. This is a proof of concept and so I highly recommend that you test. If there are features that you feel are missing or other fields that you would like included, please drop me a message.
The flow is compact and looks likes follows:
There are 4 key areas to the solution:
1. initial explanation, listing tasks buckets and plan details (for label categories)
2. retrieving all users by ID that have been assigned a task and returning their display name
3. for each task, creating an object of key/values and outputting an array
4. a basic method for creating an Excel File with Table containing the data from the Array
Stage 2:
I ultimately compile an array of distinct UserIds so that I can look them up and create an object of Userid/DisplayName Key/Values.
Output:
This enables all project users to be selected by ID and is a far more efficient way of using get user profile, as we don't need to do this for all tasks where multiple users may be assigned.
Stage 3:
There are 4 scopes to get the more tricky data, but here I gather individual arrays of:
1. assignedTo Display Names
2. CheckList Items
3. Categories/Labels (by bespoke name, colour or fallback category number)
4. CheckList Totals / Count
The output is an object for each item:
Stage 4:
Is a very easy method to create a new excel file, table and populate the rows using an apply to each. You can use Excel Scripts or Graph API to populate a file if you so wish, I have examples of the former on my YouTube.
Please note that if you want to bulk import tasks to planner, I have a video and downloadable flow via my YouTube here https://youtu.be/n3foHWH1XpU. Feel free to check out my YouTube for other ideas and concepts too and don't forget to like and subscribe.
Sample Task JSON can be seen below:
Id imagine we could use a condition if a file is present then "update or insert new row" would occur. Something along that line.
@JozefF As far as I know, no, you cannot export the comments as this is Flow does not have a way to do this. I hope I can be proven wrong at some point soon to allow these as that'd be handy. Checklists you can, it is actually somewhere in this process that Damo created.
Have you found a way to add the categories "Priority" and "Late" to the importer?
Hi,
I updated the scope applied categories as above, however I'm now getting the below error message. Is there a workaround for this? It would be massively help if I could get this flow to work!
Thanks a million
Louis
Hi, where can I download the steps. Or do I have to create each one, one at a time in PowerAutomate?
Hi Damien,
I'm receiving the error message above. The error is only occurring with some of the tasks and from having a look at them I think it is because they are not assigned to a bucket. I'm still fairly new to expressions - what can I amend the expression to for the BucketName in ComposeTaskObject to handle unassigned tasks?
Hello,
I'm new to Power Automate, I was looking for exactly that in being able to extract the Planner to Excel, add it to Sharepoint to later use it in Power BI.
I tried to use this solution by creating (copying and pasting) a new scheduled flow from the cloud, but when modifying it, I got an error in "Filter array Remove Empty Results", because it indicates that the formula "@not(equals(item(), )) " it's wrong. Would you help me ? because I want the extraction to occur every X hour.