cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jdaniels
Frequent Visitor

Create ServiceNow Incident from New Planner Task - Assigned To Display Name

Hello,

 

I am trying to create a flow where a new servicenow incident is created when a new Planner task is created. I have successfully created it, with the exception of the assigned to value. I've tried the variable, getting info from user profile, and have been generally frustrated at getting this working. This is the error:

 

The execution of template action 'Apply_to_each_4' failed: the result of the evaluation of 'foreach' expression '@{triggerOutputs()?['body/_assignments']}@{items('Apply_to_each')?['value']}' is of type 'String'. The result must be a valid array.

 

This is how my flow is constructed:

flow1.png

Now in the create service now incident:

flow2.png

 

Any ideas?

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @jdaniels

 

Thank you for posting.

 

According to your description, seems you would like to create item in sharepoint once new task created. But stuck on get displayname parameter. If any misunderstanding, please kindly let me know.

 

Actually, there are several loops unnecessary existing in your flow. Here is my solution for your scenario, if we have multiple assignees in new task, their displayname will be added within one field.

 

SPO list:

v-duann-msft_0-1618552121982.png

 

Flow overview:

v-duann-msft_1-1618552121990.png

 

 

Once tested, I’m able to get new item in sharepoint:

v-duann-msft_2-1618552121992.png

I tested two tasks which assigned to one person and two people. Then I got below results.

v-duann-msft_4-1618552208782.png

 

If the solution is not quite suitable for your scenario, please share me your detailed configuration and requirement.

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

2 REPLIES 2
v-duann-msft
Community Support
Community Support

Hi @jdaniels

 

Thank you for posting.

 

According to your description, seems you would like to create item in sharepoint once new task created. But stuck on get displayname parameter. If any misunderstanding, please kindly let me know.

 

Actually, there are several loops unnecessary existing in your flow. Here is my solution for your scenario, if we have multiple assignees in new task, their displayname will be added within one field.

 

SPO list:

v-duann-msft_0-1618552121982.png

 

Flow overview:

v-duann-msft_1-1618552121990.png

 

 

Once tested, I’m able to get new item in sharepoint:

v-duann-msft_2-1618552121992.png

I tested two tasks which assigned to one person and two people. Then I got below results.

v-duann-msft_4-1618552208782.png

 

If the solution is not quite suitable for your scenario, please share me your detailed configuration and requirement.

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

Thank you so much! That did the trick.

Helpful resources

Announcements
MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (68,947)