Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

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

(2) ShareShare
ReportReport
Posted on by 6
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!
 
  • Vejai SH Profile Picture
    119 on at
    Create a flow that gets all the items, create an HTML table and then sends an email
     
    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
  • PM-13052142-0 Profile Picture
    6 on at
    Create a flow that gets all the items, create an HTML table and then sends an email
     
    I don´t quite understand the purpose of initializing the array values. 
  • Verified answer
    Vejai SH Profile Picture
    119 on at
    Create a flow that gets all the items, create an HTML table and then sends an email
     
    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
  • Verified answer
    ANB Profile Picture
    7,123 Super User 2025 Season 1 on at
    Create a flow that gets all the items, create an HTML table and then sends an email
    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

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

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >