Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Can't get Union expression to consolidate duplicate email addresses to send a single email to employee with multiple records in sharepoint list

Hi everyone,


I am having a lot of trouble setting up a flow to send a single email where there are multiple items in a sharepoint list with the same email address.  Basic premise of the flow is to send an email to employees who haven't applied a total of 100% of their time to a given project for a given month.  Below is an example of the data in a sharepoint list:



Ideally I want the flow to send a single email to 'Bob' for the month of July 19 even though he has a total of 3 items in the list.


I have tried to apply the same flow as the solution given here: 


But when I set up my flow the same way, I would still get 3 emails for bob instead of 1.  It appears the the union function does not appear to work for me.


Flow looks like this:




Union expression defined as: 

union(variables('Email Address'),variables('Email Address'))
Any help would be greatly appreciated.




Dual Super User II
Dual Super User II

Hi @Kruchiver 


I would suggest a different approach here for the flow you are trying to build: 

1. Manual trigger

2. Intialize an array variable

3. Get items from the sharepoint list and in this get items action, add a filter query to get items that match the 100% time criteria. 

4. Apply to each loop on the items from the above action

5. Condition --> left box, select the array variable - operator: select 'does not contain' -- right box, select the email address column

6. Complete the loop

7. Apply to each on the array variable,

8. Get items from sharepoint and now use the filter query to filter the email column and point to current item, add another query to match the 100% time criteria. 

9. Add a send email action and use the current item as email address and add all relative information (maybe as an html table)


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!

Thanks for providing a response.  However, I can't quite follow.  Would it be possible for you provide screenshots of your proposed solution?



Helpful resources

Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (47,119)