cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lui
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.

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

Thanks ahead

0 REPLIES 0

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (2,083)