cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous

 

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 @Anonymous

 

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

Anonymous
Not applicable

Thank you so much! That did the trick.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,670)