Skip to main content

Notifications

Create Planner Tasks from New SharePoint List Item

Introduction

A request came through for a team to have tasks created in Planner based on a new entry in a SharePoint list. The list has the following inputs, Title for the name of the new project, Client for the plan that the bucket and tasks would be added to and finally the Due date for the project. The list also had a few calculated date columns for the different stages for the project, for example the Spec should be available 2 weeks before the due date etc.

 

I created a list and plans to match the list of clients, each client has their own plan.

flowplanner01.png

 

Creating the Flow

The flow is going to trigger from a new item on the Projects list, so I create a blank flow and add the SharePoint trigger When an Item is created.flowplanner02.png

 

The next part I need is to create a bucket in the plan that matches the client. So I add the Planner action of Create a Bucket. It requires two pieces of information. The Name is the Title of the list item so that can be selected but the Plan Id gives me a drop down. It doesn't say Plan Name so it probably wants an ID rather than just "Sally Enterprises".

flowplanner03.png

To work out what it wants, I select a plan from the drop down, then save and run the flow by adding a new item to the list. I then check the run details. In the flow run we can see that the Plan Id is a long string. So we need a method to find that Plan Id given the name of the plan.flowplanner04.png

 

Getting the Plan Id

Looking at the actions available we can get the list of plans and then filter the returned values to match the Client selected. So I removed the Create a bucket action and added List my plans action and then a Filter array action.flowplanner05.png

I then tested the flow again. The run details show the details of the selected plan which includes the Title and Plan Id.flowplanner06.png

Creating the Bucket and Tasks

So now we have the Plan Id we can create the bucket. I add the Create Bucket action again and the name is the Title of the created item. To add the found Plan Id I need to select Enter custom value and then from Dynamic Content panel and select Id from the Filter Array action

As soon as I add the Id from the Filter Array action it automatically wraps a Apply to Each around the Create Bucket action. Although we hope the Filter array action only returns one row, it could return multiple rows so the Apply to Each is the only way to handle the returned rows, even though its probably only a list of one item.

flowplanner07.png

We can now add the tasks. The Plan id is the same as the Create a bucket action and the Bucket Id comes from the Create a bucket action. The due date of any of the tasks are going to come from the original list item created. You might need to click See More to show all the possible columns.flowplanner08.png

Add each task required to finish off the flow.

Conclusion

For teams that actively use Planner this is a great flow to help create tasks that are the same on every project. With more logic it obviously could be more complex. The main learning point being how to get the Plan Id from the name of the Plan.

 

Currently there is no action to create a plan so we can't create a missing plan

Comments

*This post is locked for comments

  • eliotcole Profile Picture eliotcole 4,196
    Posted at
    Create Planner Tasks from New SharePoint List Item

    This is no longer valid, because they have removed the 'List my plans' action, and they have not provided any way to access the planner API actions via the existing connectors and / or their equivalent HTTP actions.

  • Create Planner Tasks from New SharePoint List Item

    Hi, 

     

    and if we want to use an existent Bucket?

    For example, in my list I have "To do" in a Cell for one or more tasks.

    Flow not permite use cel name equals Bucket name, only BucketID.

    How I do it?