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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / RE: Import excel to Sh...
Power Automate
Answered

RE: Import excel to SharePoint list - create item - Issue with Mutiple Email id's while uploading excel into sharepoint list

(0) ShareShare
ReportReport
Posted on by 66

Hi folks,

 

I have an issue in my flow where certain fields have people pickers. It throws an error as highlighted below:

status": 400 messages: The specified user could not be found

My flow works fine for one email id when mentioned in excel. But the above issue occurs when I give more than one mail id in the same excel cell. sample example with 2 mail IDs:

 

Team LeadManager Name
abc.cd@domain.com; EFC.cd@domain comabc.cd@domain.com; EFC.cd@domain com

 

Kindly help out.

Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    You can set multiple people for the Person field using an array variable. The array variable will have the following format:

    2021-10-03_19-17-44.jpg

    In the following example I updated the Team Lead field which is of type "Person or Group":

    2021-10-03_19-51-54.jpg

     

    When you hover the mouse over a name, the person's contact card is displayed.

     

    Here is a demo flow that should help with your issue. I start with a list of email addresses, then I split the email string at the semi-colon character ';' to get each email address. I will later append each email address to the varTeamLead variable:

    2021-10-03_19-16-53.jpg

    Here is the main body of the flow. Before adding a person to the Person field, I check if that person exists in AAD:

    2021-10-03_20-17-55.jpg

    Here is a close-up of the flow:

    2021-10-03_20-41-41.jpg

    We check if that person exists in AAD and only then update the varTeamLead array:

    2021-10-03_20-43-19.jpg

    Close-up of the append to array variable action:

    2021-10-03_20-24-17.jpg

    {
    "Claims": "i:0#.f|membership|email-address"
    }

    Next, create the SharePoint item record and populate the Team Lead field by switching to "input entire array" mode as shown below, then select the varTeamLead variable as the input:

    2021-10-03_19-27-03.jpg

    This is the content of the varTeamLead variable:

    2021-10-03_20-48-39.jpg

     

    Hope this helps.

    Let me know how you get on.


    Ellis

     

    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • KeerthiRaj96 Profile Picture
    66 on at

    Hi @ekarim2020 ,

     

    Thanks for your response. I tried out the same steps as you mentioned and getting the below error while saving the flow:

     

    KeerthiRaj96_0-1633591956416.png

    Please clarify whether the above method will work for excel upload into SharePoint list (since your example shows for SharePoint list form).

     

    Current flow steps which I have created for your reference: 

     

    KeerthiRaj96_1-1633592257194.png

     

    In Compose action-> inputs-> I have mentioned the excel team reporting senior team lead name instead of Email id's (as per your example)

     

    KeerthiRaj96_2-1633592376291.png

     

     

    KeerthiRaj96_8-1633592595352.png

     

    Team Lead column:

     

    KeerthiRaj96_6-1633592498275.png

     

    kindly help out to resolve it!

     

  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    Here is the structure of the working demo flow I created. I have labelled the content and expressions. You should be able to zoom-in an see the details. I'm storing and reading the email addresses from a compose action. I am also checking to see of the user exists in Azure AD before appending them to the array variable:

    2021-10-07_08-59-47.jpg

     

    ekarim2020_1-1633595661046.png

     

    ekarim2020_0-1633595603723.png

     

    I'll change the flow later to use an Excel as it's data source. In your case you want to read one Excel row at a time, process that row row (i.e Create Item), then continue on to the next row in an Apply to Each loop.

    Hope this helps.

    Ellis

  • KeerthiRaj96 Profile Picture
    66 on at

    Hi @ekarim2020,

     

     From your flow, I can able to get the expressions, contents but I need to do this with an excel file upload SharePoint.  I replicated the same flow only by replacing the email ids with the excel column name.

     

    My excel file will look like this for your reference:

     

    KeerthiRaj96_1-1633598178496.png

     

    It will be helpful if you could show the flow to use an excel file as a data source and upload the details of respective columns it into the Sharepoint list.

  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    Let's start with the following Excel table:

    ekarim2020_1-1633635508602.png

    which we'll use to create items in the following SharePoint list:

    ekarim2020_3-1633635860238.png

    Team Lead and Manager names are Person fields that allow multiple people to be selected.

    This is the entire demo flow which I'll expand in more detail below:

    ekarim2020_0-1633632096070.png

    (1) Start by reading the Excel rows in the table:

    ekarim2020_4-1633636115274.png

    (2) Apply to Each loop:

    ekarim2020_5-1633636251084.png

    (3) Next we add a Select action, the data source is the Team Lead email addresses - which we split. And for each email address we construct the Claims property:

    2021-10-07_21-19-50.jpg

    You should be able directly copy-and-paste the code below into the Map field:

     

    split(items('Apply_to_each')?['Team Lead'],';')
    
    i:0#.f|membership|@{item()}

     

    (4) Next we add a Select action, the data source is the Manger email addresses - which we split. And for each email address we construct the Claims property:

    2021-10-07_21-21-34.jpg

    You should be able directly copy-and-paste the code below into the Map field:

     

    split(items('Apply_to_each')?['Manager Name'],';')
    
    i:0#.f|membership|@{item()}

     

    2021-10-07_21-29-00.gif

    (5) Finally we create the SharePoint item, specifying the Team Lead and Manager claims:

    2021-10-07_20-58-27.jpg

     

    2021-10-07_21-10-25.gif


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • KeerthiRaj96 Profile Picture
    66 on at

    Hi @ekarim2020 ,

     

     I have implemented the same steps as you have shown for excel upload to SharePoint list by copy pasting the expression only replaced column names. 

     

    Once the flow triggered, I ended up getting below error:

     

    KeerthiRaj96_0-1633786184912.png

     

    Flow Image1:

     

    KeerthiRaj96_1-1633786230329.png

    Flow  Image 2 (set operation expression highlighted in notes):

     

    KeerthiRaj96_4-1633786662607.png

     

     

    I have checked my excel files as well , where it is set to text datatype for those columns S,T (reporting manager, Market Head) which i am referring in the set operation logic:

     

    KeerthiRaj96_3-1633786408591.png

    Kindly help me out to resolve this error. (As mentioned in private chat i have shared the expanded image for reference)

  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at
     

    The error is likely to be caused by the Excel column name which contains an invalid or non-standard character which is causing the flow to error:

    2021-10-09_15-00-08.jpg

    Try using a simpler column name in Excel containing text only, such as "Senior Team Manager", then update the flow.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

  • KeerthiRaj96 Profile Picture
    66 on at

    HI @ekarim2020 ,

     

    Thank you so much for your patience 😊 and sharing the detailed explanation. The flow worked well without any errors. You saved my deadline!

     

    One last query - Kindly suggest some ideas to create same item only one time (to avoid duplication), since whenever run the flow with same details it runs many times .

     

    Thanks for your support in advance!

  • Verified answer
    Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at

    You will need to use a unique identifier for each row data, such as a RowId as we see in the example below:

    2021-10-09_17-49-40.jpg

    The SharePoint List will also store the RowID. If the RowID already exists in the SharePoint list - we don't want to create a new record, we want to update it (or do nothing):

    2021-10-09_17-14-25.jpg

    Here a rough high-level example of such a flow:

    2021-10-09_17-40-59.jpg

    ekarim2020_0-1633798630428.png

     

    2021-10-09_18-00-00.jpg

    2021-10-09_17-57-54a.jpg

    2021-10-09_18-02-46.jpg

    Ellis

  • KeerthiRaj96 Profile Picture
    66 on at

    Hi @ekarim2020 ,

     

    This worked perfectly. Thank you so much 😊 for your patience and support once again!.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard