web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Append an array from P...
Power Automate
Answered

Append an array from PowerApps to a SharePoint Library column

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 
Good day!
 
I have a array of names from powerapps that I would like to append into my SharePoint library column (person or group)
 
 
As of now I cannot append it since I'm getting an error on the REST.
 
flowws.PNG
@RezaDorrani @yashag2255 Any help would be greatly appreciated, Thank you!
Categories:
  • RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    In Flow, loop through the array of email id's and use resolve person action to ensure it is valid user and in the loop set an array variable with SharePoint expanded user field dynamic content obtained from resolve person

    Capture.PNG

     

     

    Then use add or update item action set the value for multi person field as the array

    Capture1.PNG

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    1. You cannot directly send an array from PowerApps to flow. It accepts only a string type input and you will have to probably create a collection out of that array and pass it to flow using the JSON function. You can refer to this blog here for using the JSON function: https://www.appliedis.com/newly-released-json-function-for-powerapps/

     

    2. Any particular reason why you are using the REST API and not the direct actions? Note that perspn type columns in SP can be filled using thr email address of the user and so you can pass an array of object with the below schema: 

    [
    {
    "Claims" : "user1@yourdomain.com"
    },
    {
    "Claims" : "user2@yourdomain.com"
    }
    ]

    Basically, get the JSON format string from PowerApps, use the parse JSON action to get the data and populate the array and pass it to the multi select person column. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Reza,

     

    thanks for the reply,

     

    Sorry for the incomplete information on my initial post, I think I've already done the steps you've provided, although I can be mistaken.

     

    file2.PNGfile3.PNG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Anonymous 

     

    Were you able to take a look at my suggestion? You can initialize a variable out of the apply to each loop as an array variable and use the append to array variable inside the loop and use:

    {

    "Claims" : "select the id from the selctor here or the current item if it is array of user ids"

    }

     

    and you can pass this array directly. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    Hi @Anonymous 

     

    When appending to array variable

     

    use sharepoint expanded user field as dynamic content as shown in image below

    Capture.PNG

     

     

    Also, no need to use the rest api for sharepoint

    just use add item action and set the value of the multi person field to

     

    Capture1.PNG

     

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @yashag2255 Hi Yashag,

     

    Good day!I tried what you did, but what happened was two files has been created with each having their own person name.

     

    file4.PNGfile5.PNG

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi Reza,
    I almost made it without using REST as you've suggested.

     

    But there is a BadGateway error. 😞
    file6.PNGfile7.PNG

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hey @Anonymous 

     

    You don't have to use the Resolve person action in the suggestion that I have provided. Just use that array with claims as the key and email as the value. In the create item action, for the collaborator claims, ar the extreme right you can see that icon right, click it and it will allow you to select the entire array over there. Put the array with the appended values here. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

     

    Hi @Anonymous ,

     

    The problem you encountered when you first started using the Rest API was because the type value you configured in the Body was incorrect, so this problem occurred.

    Please could refer to the links below to solve your problem.

    a-type-named-sp-data-listitem-could-not-be-resolved-by-the-model-when-a-model-is-available-each-type-name-must-resolve-to-a-valid-type-error-in-sharepoint-2013/

     

    http://sharepointdeveloperblog.blogspot.com/2016/08/a-type-named-spdata-could-not-be.html

     

    Best Regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard