cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kale99
Regular Visitor

Array is being recognized as an object

Good Day, 

I am trying to create an build an array to perform a dynamic create email record in ms dynamics connector using flows. 

The aim is to basically send an email to all staff members within a specific team/Organisational unit dynamically. 

 

after some research, i came upon a way to get it done by creating the json array and append the records to it using this array structure : 

 

{
"participationtypemask": 1,
"partyid@odata.bind": "systemusers(@{items('Apply_to_each_4')?['systemuserid']})"
}

 

where 1 means From and 2 is the To address. 

 

when i try to set the array using this exact line im getting the error -

 

BadRequest. The variable 'Email Recipient' of type 'Array' cannot be initialized or updated with value of type 'Object'. The variable 'Email Recipient' only supports values of types 'Array'.

 

this is a new error aswell ass this worked up to a few months ago. 

 

Can anyone assist me in figuring out a way to either fix the error or accomplish my aim in an easier manner ? 

 

PS. the reason im using the dataverse create record to send emails is so that i can track it properly in MS dynamics email tracking 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @kale99 :

This is an object

 

{
"participationtypemask": 1,
"partyid@odata.bind": "systemusers(@{items('Apply_to_each_4')?['systemuserid']})"
}

 

And this is a array

 

[
{
"participationtypemask": 1,
"partyid@odata.bind": "systemusers(@{items('Apply_to_each_4')?['systemuserid']})"
}
]

I think these links will help you a lot:

JSON Object 

JSON Array 

 

 

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @kale99 :

This is an object

 

{
"participationtypemask": 1,
"partyid@odata.bind": "systemusers(@{items('Apply_to_each_4')?['systemuserid']})"
}

 

And this is a array

 

[
{
"participationtypemask": 1,
"partyid@odata.bind": "systemusers(@{items('Apply_to_each_4')?['systemuserid']})"
}
]

I think these links will help you a lot:

JSON Object 

JSON Array 

 

 

Best Regards,

Bof

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,512)