cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Collector
Kudo Collector

Adding multiple assigned to planner tasks and outlook event

Hi All,

I created a flow for a contact management list where I have a yes/no follow-up flag. 

If the flag is "yes",  I create a planner task using the client name as part of the title, follow-up date as the start date and the assigned to as the assigned to.

Then I create on outlook event where I the assigned to is the required attendee.

All works great!!

 

Now for the issue 🙂

My users want to be able to add multiple assigned To's to the task/event...  I figured no problem I changed the people picker to allow multiple choices and updated my flow to add the Assined to.  FLOW added For Each loops since I allow multiple choices which I figured is needed no problem it didn't break anything (yet) 

 

The issue is that it creates one task for each user in the assigned to from the list.  I get 2 planner tasks and 2 outlook events in my calendar.

I figured I would remove the For each, create the planner task without an assigned to, then update the planner task to add the Assigned to.  I can't figure out how to get the Task ID from the create step.  The update Description action, allows me to get the ID from the create step, but not the update task action just has a drop down to existing taks, no dynamic data.  

Is there a way to get FLOW to create one task with multiple users?

 

Below is my FLOW:

The first create Item creates an entry into a follow-up list and since I dont have the Assigned To in there it does not force the for each and I get one item.  If I can get the above to work I am sure this will be the same 🙂

 

LeadDB_CreatePlanner.jpgLeadDB_CreateOutlookEvent.jpg

 

TIA,

Joe

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @jaylou,

 

Could you please share a full screenshot of your flow's configuration?

Could you please show more details about your Contact management list?

Is the Assigned to field a Person or Group type column in your SharePoint list?

Further, do you want to add multiple users to a Planner task and an Outlook event?

 

I have created a SharePoint list on my side and the data structure of it as below:15.JPG

Note: The Client Name column is a Single line of text type column, the Start Date column and the End Date column are both Date type column, The Assigned to column is a Person or Group type column with multiple selections, the Follow-up column is a Choice type column and the available values of it are Yes and No.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Nmae.
  • Add a Variables-> "Initialize variable" action, Name set to FinalAssignedTo, Type set to String and Value set to empty.
  • Add a "Apply to each" action, input parameter set to Assigned to Dynamic content of the trigger. Within "Apply to each" action, add a "Compose" action, Inputs field set to following formula:
concat(item()?['Email'],';',variables('FinalAssignedTo'))

Add a "Set variable" action, Name choose FinalAssignedTo, Value set to output of "Compose" action (Click "See more" button to see the Dynamic content). 

 

  • Under "Apply to each" action, add a Condition, left input box set to Follow-up Value dynamic content, right input box set to Yes, within middle drop down, choose is equal to.
  • Within "If/yes" branch of Condition, add a "Create event (V2)" action, specify Calendar Id, Required attendees field set to FinalAssignedTo variable.

        Add a "Create a task" action, specify Plan Id. Then add a "Apply to each 2" action, input parameter set to Assigned to Dynamic content of the trigger. Within the "Apply to each 2" action, add a "Delay" action, Count field set to 1 and Unit field set to Minute. Add a "Update a task" action, Task Id field set to Id dynamic content of the "Create a task" action, Assigned User Id field set to Assigned to Email dynamic content of the trigger.

 

 

Image reference:16.JPG

 

17.JPG

 

18.JPG

 

19.JPG

 

 

The flow works successfully as below:20.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Kudo Collector
Kudo Collector

Hi all,

I was able to get the ID from the Outlook ID, so I ran another test, where I removed the for each from the outlook task and added an update.  

The issue here is that the FLOW is sucessfull but only the second assigned to gets added to the Outlook task.

 

LeadDB_CreateOutlookEventWithUpdate.jpg

Community Support
Community Support

Hi @jaylou,

 

Could you please share a full screenshot of your flow's configuration?

Could you please show more details about your Contact management list?

Is the Assigned to field a Person or Group type column in your SharePoint list?

Further, do you want to add multiple users to a Planner task and an Outlook event?

 

I have created a SharePoint list on my side and the data structure of it as below:15.JPG

Note: The Client Name column is a Single line of text type column, the Start Date column and the End Date column are both Date type column, The Assigned to column is a Person or Group type column with multiple selections, the Follow-up column is a Choice type column and the available values of it are Yes and No.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created" trigger, specify Site Address and List Nmae.
  • Add a Variables-> "Initialize variable" action, Name set to FinalAssignedTo, Type set to String and Value set to empty.
  • Add a "Apply to each" action, input parameter set to Assigned to Dynamic content of the trigger. Within "Apply to each" action, add a "Compose" action, Inputs field set to following formula:
concat(item()?['Email'],';',variables('FinalAssignedTo'))

Add a "Set variable" action, Name choose FinalAssignedTo, Value set to output of "Compose" action (Click "See more" button to see the Dynamic content). 

 

  • Under "Apply to each" action, add a Condition, left input box set to Follow-up Value dynamic content, right input box set to Yes, within middle drop down, choose is equal to.
  • Within "If/yes" branch of Condition, add a "Create event (V2)" action, specify Calendar Id, Required attendees field set to FinalAssignedTo variable.

        Add a "Create a task" action, specify Plan Id. Then add a "Apply to each 2" action, input parameter set to Assigned to Dynamic content of the trigger. Within the "Apply to each 2" action, add a "Delay" action, Count field set to 1 and Unit field set to Minute. Add a "Update a task" action, Task Id field set to Id dynamic content of the "Create a task" action, Assigned User Id field set to Assigned to Email dynamic content of the trigger.

 

 

Image reference:16.JPG

 

17.JPG

 

18.JPG

 

19.JPG

 

 

The flow works successfully as below:20.JPG

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris,

Thanks again 🙂

 

The screen shot in my first request was the entire FLOW minus the When an Item is created or updated, and I load a followup list for notes:

LeadDB_CreateItem.jpgLeadDB_WhenItemCreated.jpg

 

 

My Contact list is set the same as yours below, with the exception of names 🙂  My 2 date columns are date and time

Yes I want to add ALL assigned to's to both Outlook and planner.

 

I will let you know when I am complete with changing my FLOW with the variable.  

 

Thanks,

Joe

 

Thanks again Kris!!!

 

You are truely a FLOW expert 🙂

 

Joe

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,980)