cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BaggyG
New Member

Flow to Export Plan from Planner

I am trying to export a Plan from Planner (with all the available fields) to Excel.  The output I want is exactly the same as if I was to go into the Plan and select Export to Excel.

 

I have succeeded in exporting the plan to a table in Excel, (using 'List tasks' and 'Add a row to a table') however for the most part the data that is extracted for each of the fields is ID value, not the human readable content of each field.

 

How do I create a Flow that will replicate the result of the Export function in Planner (this will be triggered on a schedule).

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @BaggyG ,

 

You can view Body of the List task action to see the Task-related properties we can get from Flow.

 

Please consider setting Add a row into a table action to set it to execute after Apply to each 2 succeeds and skips.

 

You also need to use Configure run after for this action.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-bacao-msft
Community Support
Community Support

 

Hi @BaggyG ,

 

Could you give examples of which fields have IDs instead of Names?

As far as I know, Bucket Name and AssignedTo user Name cannot be obtained in List tasks.

 

If so, you need to get these names using the following method.

  • Get BucketName:

Use List buckets to get all bucket details first, then use the Filter array to filter out buckets with the same id, and finally use an expression to get the bucket name.

  • Get AssignedTo user name:

Initialize a string variable and use the Get user profile action to get the Display Name of each user. Append the obtained name to the string variable. The string variable needs to be cleared at the end of each loop.

 

Finally, you can insert these values into the table.

Image reference:

149.PNG150.PNG151.PNG

Hope this helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Oh dear!  Thanks Barry.

 

This is far more complex than I thought it would be.  I will give it a go in the next few days and see if I can get it to work.

Cheers.

Hi Barry,

 

This didn't work as expected. 

 

Firstly, I came across an error because someone in the team has left so the lookup of the user profile failed.  In Planner (and the export to Excel) they are named "Former Member".  I'm not sure how I would get around this.

 

Secondly, the export to Excel from Planner looks like this:

Task NameBucket NameProgressPriorityAssigned ToCreated ByCreated DateStart DateDue DateLateCompleted DateCompleted ByDescriptionCompleted Checklist ItemsChecklist ItemsLabels
Feed the dogBacklogNot startedMediumBaggyGBaggyG12/02/2020 10/03/2020false  Make sure the dog doesn't starve  Pet Stuff;Work Stuff;Home Stuff

 

The export the flow gives me is:

 
 
 

Flow 1.JPG

 

 

Note that I didn't try to get all of the fields with the flow at this point (I couldn't even find where the labels were).  I also removed the TaskID field from the clips but it did get exported.

 

Here is the flow (note: I found 'value Name' as an assignment that seems to return the actual Bucket name so I used it) :

Flow 2.JPG

 

Flow 3.JPG

 

Flow 4.JPG

 

Flow 5.JPG

 

Flow 6.JPG

 

 

 

 

 

 

Hi @BaggyG ,

 

First, if you are a member who has left, you can use the following method to handle it.

Add a branch to handle this situation, and if the Get user profile action fails, then add null/Former Member in Value to the variable.

5.PNG

You need to use Configure run after, please check this blog:

https://flow.microsoft.com/en-us/blog/error-handling/

 

Second, you can look at the method I provided again. Add a row into a table action is configured in Apply to each, instead of adding Apply to each 3 separately.

 

Third, the List tasks action may not output all the same fields in the table that you exported using Export plan to excel. You need to check the Online doc to see the response of this action.

https://docs.microsoft.com/en-gb/connectors/planner/#listtasks_response_v2

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Barry,

 

Unfortunately I really need some of the data that doesn't seem to be exposed in Planner (i.e. labels).  But I'll work through this.

 

With regards to the error handling I get the following:

Flow 7.JPG

 

The error handling part of the flow is:

Flow 8.JPG

 

 

 Flow 9.JPG

 

Other than this error it seems to be working as expected.

 

 

Hi @BaggyG ,

 

You can view Body of the List task action to see the Task-related properties we can get from Flow.

 

Please consider setting Add a row into a table action to set it to execute after Apply to each 2 succeeds and skips.

 

You also need to use Configure run after for this action.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,244)