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 / Create a flow that get...
Power Automate
Answered

Create a flow that gets all the items, create an HTML table and then sends an email

(2) ShareShare
ReportReport
Posted on by 189
Hello everybody
 
I'm quite new at this and I'm having a lot of trouble to resolve this issue that I have. This would be the flow steps:
 
1. Manual trigger the flow
2. Get items Not OK items from the list and filter accordingly to each department
3. Create parallel branch to send emails to each department
4. Create HTML table
5. Send email
 
The main problem that I'm facing here is the "apply to each". If I keep "send email" inside the loop it will send one email per each item but if I managed to move it after the "apply to each, I get one email but all the info nested in an array and scrambled (see image below of one of the branch).
 
 
The weird thing is that I've seen videos of people creating flows like this and the don't get the apply to each automatically and it works just fine, I also tried all design and samething. Thanks, in advanced!
 
Categories:
I have the same question (0)
  • Verified answer
    ANB Profile Picture
    7,250 Super User 2026 Season 1 on at
    HI @PM-13052142-0, Use Select action as shown in by Matthew Devaney in his below blog: Please check
     
     
     
    ​​​​​

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.


    Thanks,
    ANB
  • Verified answer
    Vejai SH Profile Picture
    560 on at
     
    You can use Select to build an object from sharepoint


    and you can use Create HTML table from the object.  You can avoid loop.

     
    Alternate solution is which I prefer is
    1. Initialize a array variable which hold department name and email like
    2. Loop the array
    [
       {
           "departName": "intendencia",
           "email": "intendencia@email.com"
       },
       {
           "departName": "sistemas",
           "email": "sistemas@email.com"
       }
    ]
     
    3. Retreive the sharepoint list
    4. Use Select action to build the object
    5. Convert to HTML
    6. Send an email.
     
    Thanks, 
    Vejai SH
  • PM-13052142-0 Profile Picture
    189 on at
     
    I don´t quite understand the purpose of initializing the array values. 
  • Vejai SH Profile Picture
    560 on at
     
    From your image, you are doing the same action in both the branch. instead you can have a array to avoid multiple branch.
     
    Thanks,
    Vejai SH

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard