cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper IV
Helper IV

Saving Person column to SharePoint from PowerApps using Power Automate

I have a scenario where I need to use the HTTP to Sharepoint action in Power Automate to save my data from Power Apps.

The power automate flow seems to create a new item in the SharePoint for all columns except a Person column which I continue to get an error.

 

I'm passing the data from Power Apps using the following code:

 

 

Set(varPerson, 
 {
 Claims:"i:0#.f|membership|" & Lower(myemail@abc.com),
 DisplayName:Office365Users.UserProfileV2(myemail@abc.com).displayName,
 Email:myemail@abc.com,
 Picture:"",
 Department:"",
 JobTitle:""
 });

'API-POST'.Run(
 "Comments",
 "POST",
 0,
 JSON(
 {
   Audience:"External",
   Comment:"Testing",
  Item:"Comment",
  Person:varPerson             
 }))

 

 

When I run the Power Automate, this is the error I'm getting:

Spoiler
{"odata.error":{"code":"-1, Microsoft.SharePoint.Client.InvalidClientQueryException","message":{"lang":"en-US","value":"A 'PrimitiveValue' node with non-null value was found when trying to read the value of a navigation property; however, a 'StartArray' node, a 'StartObject' node, or a 'PrimitiveValue' node with null value was expected."}}}


As you can see on the screenshot below, I'm sending the body from Power Apps to Power Automate through JSON.

 

Screenshot 2021-01-24 075121.png

 

Can anyone tell me how to send the person array correctly? I feel like I'm missing something. 

Thanks ahead

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @lui,

 

There is no need to use Send HTTP request to SharePoint to append value into person field.

If the field is multiple person, after getting value from the PowerApps and parse JSON it to get the Emails, then structure the array as below:

[
{
 "Claims": "EmailA@domain.com"
},
{
 "Claims": "EmailB@domain.com"
}
]

Screenshot 2021-01-25 141204.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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

1 REPLY 1
Community Support
Community Support

Hi @lui,

 

There is no need to use Send HTTP request to SharePoint to append value into person field.

If the field is multiple person, after getting value from the PowerApps and parse JSON it to get the Emails, then structure the array as below:

[
{
 "Claims": "EmailA@domain.com"
},
{
 "Claims": "EmailB@domain.com"
}
]

Screenshot 2021-01-25 141204.jpg

 

Best Regards,
Community Support Team _ Lin Tu
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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

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!

Users online (30,343)