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 / Can't get Union expres...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by

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:

image.png

 

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: https://powerusers.microsoft.com/t5/Building-Flows/flow-to-send-single-email-for-set-of-records-in-Sharepoint-list/td-p/176057 

 

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:

image.png

image.png

 

Union expression defined as: 

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

 

Thanks

 

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    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!

  • Community Power Platform Member Profile Picture
    on at

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

     

    Thanks

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 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard