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 / How to group multiple ...
Power Automate
Suggested Answer

How to group multiple entries for a user into a single reminder email

(1) ShareShare
ReportReport
Posted on by 2
I have a SharePoint List that contains the dates of all our certificate/license renewals, all of which have a renewal date and an owner. I'm trying to build a flow that will check this list every day, find any renewal dates within the next 60 days and send a reminder email to the owner. I've build a Apply To Each loop that can do that, but the issue is it send multiple emails to the same person, as they are the owner of multiple certificates or licenses.
 
What I would like to do is build something that identifies all of the certificate or license renewals for that owner, group them together into an email and send it through as one email. The only way I can think to do it is to build a separate path in the flow for each Owner, and perform a check for them individually, but there are over 20 owners so it could take a while and I'm not sure it's the most efficient process.
 
Is there a different way to check the list, find all of the relevant certificate/license renewals and group them by the owner?
Categories:
I have the same question (0)
  • AnitaE61 Profile Picture
    10 on at
    Hi SteveD-NSSI
     
    The way I achieve this in my flows is as follows:
     
    I have a table saved to Sharepoint which has hundreds of rows and several email addresses,  I group those email addresses and send them as rows in a table to the owners via email 
     
     
    The Select - FD Email step points to the owners email from the source data
     
    The Compose - Group Emails action is a union function which points back to the Select - FD Email action
     
    union(body('Select_-_FD_Email'),body('Select_-_FD_Email'))
     
    I then create an Apply to Each action which points back to the Compose - Group Emails action
     
    The Filter Array action is as follows
     
     
    Hope this helps
  • AnitaE61 Profile Picture
    10 on at
    Hi SteveD-NSSI
     
    The way I achieve this in my flows is as follows:
     
    I have a table saved to Sharepoint which has hundreds of rows and several email addresses,  I group those email addresses and send them as rows in a table to the owners via email 
     
     
    The Select - FD Email step points to the owners email from the source data
     
    The Compose - Group Emails action is a union function which points back to the Select - FD Email action
     
    union(body('Select_-_FD_Email'),body('Select_-_FD_Email'))
     
    I then create an Apply to Each action which points back to the Compose - Group Emails action
     
    The Filter Array action is as follows
     
     
    Hope this helps
  • AnitaE61 Profile Picture
    10 on at
    Hi SteveD-NSSI
     
    The way I achieve this in my flows is as follows:
     
    I have a table saved to Sharepoint which has hundreds of rows and several email addresses,  I group those email addresses and send them as rows in a table to the owners via email 
     
     

    The Select - FD Email step points to the owners email from the source data
     
    The Compose - Group Emails action is a union function which points back to the Select - FD Email action
     
    union(body('Select_-_FD_Email'),body('Select_-_FD_Email'))
     
    I then create an Apply to Each action which points back to the Compose - Group Emails action
     
    The Filter Array action is as follows
     

     
    Hope this helps
  • Suggested answer
    tmcguire47 Profile Picture
    on at
    Hi -- i think you will want to double-dip into the sharepoint list...
    First, pull the sharepoint list to get the list of renewals within the next 60 days...you could grab just the email addresses into an array...and then filter the array to remove duplicates.  You can use union() to remove duplicates...in powerautomate, union combines arrays and removes duplicates, so if you combine an array with itself, the output is an array of unique values.
     
    So, to do all that, you can use the Sharepoint "Get Items" with the filter on the renewal date...that gets you the items.
    Then, add a Data Operation -> Select
    and in the Select, just map the email address.
    Next, add a Data Operation -> Compose
    and, assuming your Select is named "Select" this should give you unique email addresses: union(body('Select'),body('Select'))
     
    Now, you can use an Apply to Each loop and put everything you had previously in your original Flow inside it, with the addition of including the email address as part of the filter when you select the Sharepoint items.
     
    Next, you can move your email action out of the original Apply to Each, and kindof out one level and in the place of the original step that sent emails, if you append the info you want to a variable, then each pass that used to result in an email being sent will now add content to your variable...
    Then, in your step to compose an email, grab the combined content of the variable.
     
    The result should be:
    1. get the list of unique email addresses where the owner has one or more expiring items
    2. use that in the filter to get the list of expiring items for each owner
    3. combine the expiring items into a list/text/variable
    4. compose 1 email per owner, and include the combined info in that one email.

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

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard