web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can you help me create...
Power Automate
Suggested Answer

Can you help me create the layout for this flow? I am sending multiple emails

(0) ShareShare
ReportReport
Posted on by 4
I have a SP List with the following columns
Project ID (text) / Project Owner (Person)  /  Quality Person (Person) /   Status 1 Planned (Date) /  Status 1 Completed (Date) / Status 2 Planned (Date) Status 2 Completed (Date)
 
I want a flow to send ONE email with multiple lines for the following scenarios:
 
1. IF Status 1 Planned is past due AND status 1 complete is empty, send ONE summary email to the Project Owner email
2. IF Status 2 Planned is past due AND status 2 complete is empty, send ONE summary email to the Project Owner email
 
I have the following flow (only created for Status 1) - but if there are 3 Project IDs, it is sending 3 emails
 
My flow is 
Recurrence
Get Items from SP - Filter query Status 1 Completed eq null  and Status 1 Planned lt '@{utcNow('yyyy-MM-dd')}' 
Intialize Variable (Var 1)
Condition (with a for each) where  Status 1 Completed eq null  and Status 1 Planned UTCNow () > If Yes, Initialize Variable (Var2) / If No BLANK
Compose - Initialize Variable
Condition Initialize Variable is not equal to - this cell is blank
If yes - apply to each send email V2
If no blank
 
Thanks!
Categories:
  • Suggested answer
    Mark Nanneman Profile Picture
    993 Moderator on at
    If you have a send email action inside of a for each loop that's iterating through each item, it's going to send an email for each one.

    The way I've created scheduled reports to run in cases like this to pull a filtered list of items that need to go into the report.  Add a condition to terminate or skip the email if there's no items returned from the query.  Map desired data point values from the items to human readable headers using a "Select" action.  Use a "Create HTML Table" action to convert the Select mapping to an HTML table, and finally drop the HTML table into an email.


    So for you, if the idea is to send one email with two lists you could do it like this:

    1. Create a Get Items list for your first condition past due items--write a good filter to only pull those items that qualify.
    2. Create a Select operation that takes the value array from this action and maps your desired data points to display in the email. (for example:

    {
    "Project Name": @{name_field_reference},
    "Status 1 Planned": @{status_1_planned_date} 
    }
    3.  Add a Create HTML action and input the Select Action output to it.  This will create an HTML table that's viewable on a website or an email.
    4. Create another Get Items list for your second condition past due items--write a good filter to only pull those items that qualify.
    5. Create another Select operation just like the first one except pull in the other date field(s)
    6. Create another "Create HTML" action to conver this Select mapping to another HTML table.

    7.  Add your Send Email action.  Write out a body template, you can add headers for each html section.  Then toggle to html view and drop in the dynamic outputs of each of your HTML action outputs in the appropriate spot.
    Something like:


    Now whenever your flow runs it'll just send out one email.  You can finess it to include links to each item in the tables, and also to not send an email if there are no overdue projects found, etc.

    If this helped you, please click "Does this answer your question" and give it a like to help others in the community (+ close the ticket)!

    Power Platform Developer | LinkedIn: Mark Nanneman | Blog: Power Stuff  | YouTube: Mark's Power Stuff  | 

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard