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 / Help fixing a schedule...
Power Automate
Suggested Answer

Help fixing a scheduled flow that is sending too many emails

(0) ShareShare
ReportReport
Posted on by 415
Hello,
 
I have a SharePoint List to track Special Events for a Police Department. The request is to send an email at midnight on the day of the special event to the assigned detail supervisor(s). I created a flow that works if there's only one event that day. When there are 2 events scheduled, 2 emails are sent to all assigned detail supervisors; likewise, if there are 3 events, 3 emails are sent to all assigned detail supervisors. I just need one email to be sent to each supervisor. Here's my flow below.
 
 
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    13,021 Super User 2025 Season 2 on at
    This post is a good one to show you what you need to do: How to create HTML table for Get Items in Power Automate? | Pankaj Surti's Blog. You're basically going to generate an HTML table of all of the events for that day and send it to everyone in the body of the e-mail with just one message.
     
    I would also encourage you to use a filter query in the get items action rather than getting all of the items in the list and then filtering it afterward. The reason is that by default, the get items action only gets 100 items. You can learn about using a filter query at In-depth analysis into 'Get items' and 'Get files' SharePoint actions for flows in Power Automate | Microsoft Learn.
  • trishmalloy Profile Picture
    415 on at
    Hello David_MA,
     
    That's not what my user is looking for. If there are 3 events on June 11, for example:
     
    Event 1 has two Assigned Detail Supervisors = 2 separate emails would be sent, one to each assigned detail supervisor.
    Event 2 has one Assigned Detail Supervisor = 1 email would be sent to the assigned detail supervisor.
    Event 3 has three Assigned Detail Supervisors, 3 separate emails would be sent, one to each of the 3 assigned detail supervisors.
     
    Are you able to advise on this scenario?
  • Suggested answer
    David_MA Profile Picture
    13,021 Super User 2025 Season 2 on at
    I think what you are saying is that three e-mails should go out, one for each event, instead of multiple e-mails for the same event when multiple supervisors have been assigned. If so, do the following:
     
    1. Initialize an array variable and set the default value to [] (this is very important) named Contacts.
    2. Add an Apply to each action to the flow, and point it to the field in your SharePoint list that stores the e-mail addresses.
      1. You want the field that DOES NOT have email after the field name.
    3. In the Apply to each action, add an Append to array variable action.
      1. Choose the Contacts variable
      2. And populate it with the field that HAS email after the field name.
    4. In your e-mail action, use a join() expression to join the values in the variable with a semicolon (;) — join(variables('Contacts'), ';') 
    Of course, you can name the variable anything you want.

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

#2
developerAJ Profile Picture

developerAJ 174

#3
Tomac Profile Picture

Tomac 168 Moderator

Last 30 days Overall leaderboard