Introduction
This blog focuses on how using Flow you can automate the process of monitoring incoming emails and create tasks in existing Plans in Planner. The Flow is smart enough to focuses on new emails only and ignore replies.
Setting the scene
In this scenario the flow is focusing on the email subject line and looking for existing plan names, for example Flow is looking for #11111 or #22222 anywhere in the subject line. Based on which plan is found a tasks is created. The task Title is uses the From variable of the incoming email and start date of the task is the same as the day the email was received. Finally, Flow It is also looking for RE: or Re: in the subject line and if it finds it then the flow automatically ends.
Plans in Planner
Currently we have two existing plans, #11111 and #22222. These are the plans Flow will be looking for.
Flow
Here is how the flow works. The PlanNameVar variable is used to capture only the '#' + 6 numerical values after it. The condition is used to see if the email subject contains RE or Re. The condition uses the Or expression which is explained in detail in this article https://docs.microsoft.com/en-us/flow/use-expressions-in-conditions#use-the-or-expression
Video
Conclusion
Currently, the Planner connection is under preview and the actions are subject to changes. In addition if you wish to store more information then you can use the SharePoint Site that is automatically created for each plan.
Hyperlinks
Using the Or Expression