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

Community site session details

Session Id : +1StqvE+R4aQMToqGVV4VG
Power Automate - General Discussion
Answered

Storing multiple emails into a multiple selections column in SharePoint list.

Like (0) ShareShare
ReportReport
Posted on 9 Apr 2023 12:42:46 by 391

Hi there,

 

I have a flow where when a new email arrives, it creates an item in SharePoint list.

 

Everything works fine, but if there are more than two email addresses in the CC field, it throws the below error.

 

nicklim_3-1681043692486.png

 

nicklim_2-1681043562471.png

 

 

  • nicklim Profile Picture
    391 on 12 Apr 2023 at 02:26:51
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    @v-peijunz-msft 

     

    Thank you Sylvia! 

  • Verified answer
    v-peijunz-msft Profile Picture
    Microsoft Employee on 12 Apr 2023 at 01:39:08
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    Hi @nicklim 

     

    To pass the null value, please use the condition action:

    If the CC field is empty, then create null value in SP list CC column ;

    If not, then create item in SP list with the formulas above.

    empty(triggerOutputs()?['body/ccRecipients'])

    vpeijunzmsft_0-1681263473292.png

     

    Best regards,

    Sylvia

  • nicklim Profile Picture
    391 on 11 Apr 2023 at 22:28:28
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    @v-peijunz-msft 

     

    Hey Sylvia,

     

    Apologies, I just noticed that the flow won't work if the CC field is empty. For example, if someone sends an email without CC-ing anyone, the flow would fail where it says that the value is null.

     

    Do you know if there is a workaround to it? I am happy to create a new post if that's the right approach.

     

    Kind regards,

     

    Nick

  • Verified answer
    nicklim Profile Picture
    391 on 10 Apr 2023 at 07:27:29
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    @v-peijunz-msft 

     

    Hey Sylvia,

     

    Worked like a charm and thank you so much!

  • Verified answer
    v-peijunz-msft Profile Picture
    Microsoft Employee on 10 Apr 2023 at 03:56:25
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    Hi @nicklim 

     

    As @Nived_Nambiar mentioned, the JSON that gets created when email addresses are added to multiple Claims lines manually looks as follows:

    [
    {
    "Claims": "username@company.com"
    },
    {
    "Claims": "username2@company.com"
    }
    ]

    The workaround is to use the following formulas:

    first(split(triggerOutputs()?['body/ccRecipients'], ';'))
    first(skip(split(triggerOutputs()?['body/ccRecipients'], ';'),1))
    first(skip(split(triggerOutputs()?['body/ccRecipients'], ';'),2))

    However, you need to specify EXACTLY a set number of items to select in the SharePoint list's multiple value column.

     

    I have made a simple test for your reference.

    1. Here is the flow:

    vpeijunzmsft_0-1681098601427.png

    2. Result of receiving two cc emails:

    vpeijunzmsft_1-1681098735992.png

    In SharePoint list, CC is the person column which allows multiply collections:

    vpeijunzmsft_3-1681098937909.png

     

    After the flow triggered, a new item was created in SP list with two cc emails uploaded:

    vpeijunzmsft_2-1681098870399.png

     

    Here is the doc for your reference:

    Add multiple users to SharePoint multiple user or group column · Community (powerautomate.com)

    Hope it helps!

     

    Best regards,

    Sylvia

     

  • Nived_Nambiar Profile Picture
    17,954 Super User 2025 Season 2 on 10 Apr 2023 at 02:41:25
    Re: Storing multiple emails into a multiple selections column in SharePoint list.

    Hi   @nicklim 

    If you pass the CC dynamic content directly having two emails, it may not work, as in the field , you have to enter one item/email.

     

    If you want to pass multiple data/emails , you have to try this json array format

     


     

     

    Nived_Nambiar_1-1681094465079.png

     

     

    [
     {
     "Claims": "email1"
     },
     {
     "Claims": "email2"
     }
    ]


    In above format if i want to add two emails, i would follow the json array format like this.

     

    Hope this helps 

    Mark it as solution if it resolves your query 🙂

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete