“Is there a way in Power Automate to split emails from a multiple people picker field to have a single email per user for all of the items in which they are included as an owner?”
Following a question from the original article to Send one email per user with multiple SharePoint items, what if the column is not a single people picker? What if the column allows selection of multiple users? If you have more than 1 user assigned per item? You probably still want to send only one email per user, even if they share the item with others.
Get user emails from the items
Once you switch the people picker column to multiple selection, its structure will change. It won’t be an object with the user anymore, now it’ll be an array of objects (=users). And as such you can’t get the email addresses as easily using the ‘Select’ action. You’ll have to use a less efficient way with double loops.
But first, initialise a new array variable, e.g. var_emailsArray. In that variable you’ll store each email separately. Once you initialise the variable, add ‘Apply to each’ to loop through all the items provided by the ‘Get items’. In that loop add another ‘Apply to each’ to loop through users in the people picker field. And in that loop place the ‘Append to array variable’ to store their email address.

Note: my column is called ‘SendTo’, your column will have most probably a different name.
At the end of the loop you’ll have a variable that’ll contain all the email addresses as separate items. Process it with the union(…) expression to keep only the unique values = unique emails.
union(variables('var_emailsArray'),variables('var_emailsArray'))

Filter the items for each user
The other difference from the original flow is in the ‘Filter array’ action. As already said, the people picker column in each item will contain an array of users. Therefore, you can’t simply filter by the user email. You must check the whole array of objects if one of them contains the email address. The easiest way is to convert the array into a string with the string(…) expression, which will allow you to use the ‘contains’ operator.
string(item()?['SendTo'])

From that point on you can continue with the original flow – build an HTML table and send the email.
Full flow diagram
I noticed the screenshot is missing a trigger, but it’s a ‘Recurrence’ trigger as in all reminder flows.

Summary
Once you switch from the single user to multiple people picker in SharePoint items, the Power Automate flows get more complicated. You don’t have a single object where you can easily access the email, you’ll get an array. And since it’s an array, you’ll have to loop through all the items, and for each item loop through the users. Once you’ve got them in a variable it’s easy to remove duplicates and filter the items with the little string(…) workaround.
great.. Thanks you for sharing this post.
I have a question though. In my SharePoint list, instead of a people or group field, i had to create a single line to text field that holds multiple email addresses with “;” delimiter as the values are coming from a different list via a lookup. What’s the best way to incorporate that in this flow. Essentially, i need to split the emails in that text field and then use those emails to send a list of items based on filter criteria. Thanks in advance for you help.
Hello Raj,, ‘;’). Loop through the result of the split(…), append all the values in the array variable, and from then on continue as in the flow.
if you already have the email addresses, you can split them using the split(…) expression: split(
In my scenario I have 7 branch office. and i want to automate Clearance request system. as well as i have 6 approves like( Line Manager,store,IT,Facility,Finance and HR).
when Item is created in share point the flow must send approval request based on requester Location means that if the requester Location is From “X” location all approvers who are in “X” Location should get the requester approval. if the requester Location is From “Y” location all approvers who are in “Y” Location should get the requester approval. How can I do this in Power Authomate?
Hello Berihun,
you just need a list with approvers, and every time you need an approver take him from the list based on the parameters, these articles should help:
https://tomriha.com/lookup-to-sharepoint-list-with-approvers-in-power-automate/
https://tomriha.com/how-to-combine-multiple-filters-in-get-items-filter-query-power-automate/
Hi, I get the following error: Flow save failed with code ‘InvalidTemplate’ and message ‘The template validation failed: ‘The inputs of template action ‘Filter_array’ at line ‘1 and column ‘2813’ is invalid. Action ‘Apply_to_each_2’ must be a parent ‘foreach’ scope of action ‘Filter_array’ to be referenced by ‘repeatItems’ or ‘items’ functions.’.’. Can you please help
Hello Newbie,
the error message tells you that the ‘Filter array’ action must be inside ‘Apply to each 2’, otherwise it can’t reference the dynamic content you use in the ‘Filter array’.
Hi Tom, I get this error now
The ‘inputs.parameters’ of workflow operation ‘Send_an_email_(V2)’ of type ‘OpenApiConnection’ is not valid. Error details: Input parameter ’emailMessage/To’ is required to be of type ‘String/email’. The source type/format ‘Array’ of the value ‘[“houahega@hoauehga.com”]’ is not convertible to type/format ‘String/email’.
Hello New,
this error is telling you that you can’t use an array – defined by the [ and ] as an email recipient, you must extract the value from the array. The flow is using ‘Apply to each’ to process all the arrays, you’re probably not using the currently processed item from the loop as the recipient but the whole array.
When we trying to do bulk update the appending array is not feasible as its appending all the Users from PeopleColumn and sending an email . Example: Each Item has 2 approvers. When doing bulk update like closing tickets, all the approvers are appended to array and in every email all the approvers are added in CC.
Can you have the steps to avoid that.
Hello Boobesh,
I’m sorry but I don’t understand what you’re trying to achieve. This blog post is about sending emails to users, it’s not about updating users.
If you have some array that contains more users then it should then you probably don’t empty it (set value to ‘null’ expression) at the beginning of each loop.
Hey Tom,
Would it be possible to use this approach with a few changes to identify if the email one of the Users within the field (column) is equal to the email of the Last Modified By? If so, do you think I could ask you for some direction on how to proceed?
(Also, I accidentally posted this same question in one of your other articles. Sorry. I meant to ask this question here.)
Thanks in advance.
Hello Alberto, contains . Maybe you’ll have to convert the field value to string(…) for the comparison to work.) contains
if your goal is just to check if a multiple people picker field contains the Modified By user then I’d use just a ‘Condition’: if
string(