cancel
Showing results for 
Search instead for 
Did you mean: 

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

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?

Meet Our Blog Authors
  • Experienced Consultant with a demonstrated history of working in the information technology and services industry. Skilled in Office 365, Azure, SharePoint Online, PowerShell, Nintex, K2, SharePoint Designer workflow automation, PowerApps, Microsoft Flow, PowerShell, Active Directory, Operating Systems, Networking, and JavaScript. Strong consulting professional with a Bachelor of Engineering (B.E.) focused in Information Technology from Mumbai University.
  • Encodian Owner / Founder - Ex Microsoft Consulting Services - Architect / Developer - 20 years in SharePoint - PowerPlatform Fan
  • Cambridge UK Power Platform User Group Leader, Technical evangelist and speaker. Always says yes to coffee! #LetsGetCoffee
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor
  • I am building business processes and applications that are easy for users' to stick to, so they can follow and understand them. In overall I transform processes to be more reliable and effortless. I am a proud co-organizer of SharePoint Saturday Warsaw and active community member, blogger and international speaker.