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.
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'])
Best regards,
Sylvia
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
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:
2. Result of receiving two cc emails:
In SharePoint list, CC is the person column which allows multiply collections:
After the flow triggered, a new item was created in SP list with two cc emails uploaded:
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
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
[ { "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 🙂
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2