cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Getting Planner Checklists in flow

Hey guys I have been just made aware that I need to be able to get the Checklists that come when another user creates a new Planner Task. 

I have a flow that sends an email that gets printed but when my team put the phone number and pickup time in the checklist area there is no way to get this information in the email.

When I use Get Details all that is shown is the Title and Description. 


Any help would be very appreciated 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Getting Planner Checklists in flow

Hi @Fusion ,

 

I have made a test and I found that checklist could not be returned using a dynamic content directly.

 

There is similar request on Flow Ideas Forum, please feel free vote the idea at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/Planner-get-more-details-from-a-task-in-planner-e-g-C...

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Getting Planner Checklists in flow

Hi @Fusion ,

 

I have made a test and I found that checklist could not be returned using a dynamic content directly.

 

There is similar request on Flow Ideas Forum, please feel free vote the idea at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/Planner-get-more-details-from-a-task-in-planner-e-g-C...

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

Highlighted
Regular Visitor

Re: Getting Planner Checklists in flow

I struggeled with a similar task for a few days, but in the end i managed to extract all the information from the tasks and the checklist items with the help of this weird trick 😉: http://johnliu.net/blog/2017/11/foreach-property-in-microsoftflow-json-with-xpath-microblog

 

The process does need a few steps but in the end it isn't too comlicated.

You start by getting the task details and parsing the result in JSON:

Capture.JPG

Parse JSON: (Get all the data from the taskdetails, way more than the dynamic content offers)

Content: body('Get_task_details')?['body']

(You can generate the schema from a sample task body or just use mine: https://pastebin.com/Y0ddkS9w)

 

Parse JSON checklist: (Seperate the checklist JSON from the task data for easyer handling)

Content: body('Parse_JSON')?['checklist']

(Schema can also be created from a sample checklist item, or use this: https://pastebin.com/4eNTtJ67)

 

The problem isthat the checklist items are not actually called "checklistItem" in the raw JSON but are individually named with their id. This is why we need to do the trick from the post mentioned above, where we turn the JSON into XML, get the checklist item id's from the XML, and then parse the JSON again with the id.

Capture2.JPG

Compose JSON checklist root element: (Add a root Element, necessary for proper XML)

Inputs: {"root": body(Parse_JSON_checklist'')}

 

Compose JSON as XML nodeset:

Inputs: xpath(xml(outputs('Compose_JSON_checklist_root_element')), '/root/*')

 

Select array of checklist item ids from xml

From: outputs('Compose_JSON_as_XML_nodeset')

Map: xpath(item(), 'name(/*)')

 

Now we have an iterable array of the checklist item id's (or something resembling them) with wich we can proceed to parse the JSON data of each checklist item.

Capture3.JPG

Apply to each checklist item:

Output('Select_array_of_checklist_item_ids_from_xml')

 

Compose checklist item id: (the id's com back a bit scrambled, this can be fixed with an easy string operation)

Input: substring(replace(items('Apply_to_each_checklist_item'), '_'''), 4, 5)

 

Parse JSON checklist item: (Finally! This operation gives us all the data of the current checklist item)

Content: body('Parse_JSON_Checklist')?[outputs('Compose_checklist_item_id')])

(I guess the schema shuld be clear by now, but just in case 😉: https://pastebin.com/C6C19VYw)

 

The "Parse JSON checklist item" now gives you everything you need as dynamic content.

Hope this helps 😊

Highlighted
New Member

Re: Getting Planner Checklists in flow

This is really helpful but your final schame url is no longr valid - https://pastebin.com/C6C19VYw

any chance you still have this available?

Thanks.

Highlighted
New Member

Re: Getting Planner Checklists in flow

Never mind - worked it out myself.

Really excellent solution. I wouldn't have been able to achieve this without your post so thanks!

{
    "type""object",
    "properties": {
        "@@odata.type": {
            "type""string"
         },
        "isChecked": {
                "type""boolean"
        },
        "title": {
                "type""string"
        }
    }
}
    

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,102)