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

Meet Our Blog Authors
  • Working daily with Microsoft Cloud to deliver the needs of my company, my customers and various Microsoft communities and forums. | Office 365 | Flow | PowerShell | PowerApps | SharePoint |
  • Co-founder of https://plumsail.com, Office 365 and SharePoint expert. Passionate about design and development of easy to use, convenient and flexible products.
  • Microsoft Business Apps MVP. Owner of ThriveFast, an Office 365 consulting company.
  • 7x Microsoft Business Solutions MVP (CRM)
  • I'm keen in MS technologies, SharePoint, Office 365 and development for them
  • Daniel is a Business Productivity Consultant & Microsoft Business Solutions MVP who is very enthusiastic about all things Office 365, Microsoft Flow, PowerApps, Azure & SharePoint (Online). Since the preview, Daniel has been working with Microsoft Flow and later on with Microsoft PowerApps. That led to him being awarded an MVP Award for Business Solutions. He loves to blog, present and evangelize about improving productivity in the modern workspace with these amazing tools!
  • Michelle is an Office 365 solution architect in Twin Cities, MN. She has been delivering business collaboration solutions for years with her focus on SharePoint and Office 365. Michelle is a recent board member of the Minnesota Office 365 User Group and has been a member of the SharePoint community since 2009. She is a frequent speaker at MNSPUG and SharePoint Saturday and co-chaired the Legal SharePoint User Group for 4 years. Her most frequent projects have involved rolling out a large deployment of Office 365, SharePoint Online intranet, build of a "CHAMPS" Office 365 user adoption program and most recently, SharePoint On-Premise to Online Migration. Michelle is very excited about cloud technology as it is shifting her IT Pro focus to collaboration strategy and technical adoption.
  • I'm a Microsoft Office Servers and Services MVP with a special interest in SharePoint, Office 365, Microsoft Flow, Microsoft Teams and PowerApps. I work at Triad Group Plc ( https://triad.co.uk)
  • Passionate #Programmer #SharePoint #SPFx #Office365 #MSFlow | C-sharpCorner MVP | SharePoint StackOverflow, Github, PnP contributor