How to create a checklist in a Planner task with Power Automate
Posted On March 17, 2021
“I’m using Power Automate to automate creation of Planner tasks, can I create also a checklist inside the task?”
Adding a checklist to a task is a basic functionality for any planning application, and it’s the same with Planner. If you use Power Automate to automatically create a task in Planner, you should be able to create a checklist too.
The action you’ll need is ‘Update task details’ (the action you use to update the task description). Among the other available fields is ‘Checklist’ where you can add the… checklist. You can define either fixed checklist items for all task, or you can ‘input entire array’ to add 0-n checklist items.
If your checklist is always the same, it might be sufficient to create it directly in the action. Just fill out the required fields: Checklist Id (any number, but it must be unique), Checklist Title (name of the item), and if the Checklist item is checked when created.
The example below will create 2 checklist items in a task: ‘Checklist item 1’ and ‘Checklist item 2’.
Dynamic checklist (0 – n items) from a ‘template’
If your checklist is dynamic, e.g. you store the checklist in an Excel file or in a SharePoint list, you must build an array. Switching to ‘input entire array’ will allow you to add that array of checklist items to the task. If the array is empty, it won’t add any checklist item; if it’s not empty, it’ll add all the items. The format for each checklist item should be as below.
Notes: <checklist item ID> can be any number, but it must be unique for each checklist item. <checklist item title> is the checklist item name. The ‘”isChecked”: false’ tells Planner to keep the checklist item unchecked.
Knowing the format, you can follow similar procedure as when adding attachments to an email or an approval task. List the rows in an Excel file or get items from a SharePoint list, and create a checklist item for each of the rows/items.
Initialize array variable
The first step in all situations is to initialize an array variable for the array of checklist items. Then it depends on where you store the checklist. Let’s take 2 examples, a table in an Excel file or a SharePoint list.
a) Checklist in an Excel file
If your checklist items are stored in a table in an Excel file, ‘List rows present in a table’ and append them to an array. The Excel table should contain the name of the checklist items and an ID. Use them in the ‘Append to array variable’ action to build the correct checklist array.
b) Checklist in a SharePoint list
If your checklist items are stored in a SharePoint list, use the ‘Get items’ action to get them. It’s enough to have just 1 column in the SharePoint list as you can use the SharePoint item ID for the ID. After you get the items, the process is the same: ‘Append to array variable’ in the correct format.
Update the checklist
Once you have the checklist in the array variable (after the ‘Apply to each’), you can use it to update the Planner task ‘Checklist’ field.
The full flows
Below are screenshots of the two flows described in the previous chapters. The flows will create a Planner task and add a checklist located in a SharePoint list or in an Excel file.
From the two solutions above, fixed and dynamic, I’d always use the dynamic checklist, mainly in combination with a SharePoint list. It has two benefits over the fixed checklist. Firstly, everyone (with access) can manage the checklist and you don’t need to touch the flow with every change. And secondly, you can have multiple checklists.
This post describes just a simple solution where all tasks have the same checklist. But if you add another column to Excel / SharePoint, you could lookup checklists for specific tasks. It might be also a nice addition when you import task from Excel to Planner.