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 / Grouping list items in...
Power Automate
Unanswered

Grouping list items into an html table under certain criteria and send email

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello community!

 

My team has a share point list with the following columns:

Batch IDItem nameProviderCost
AB01Apple 1A50
AB01Apple 2A90
AB01Apple 3B10
AB03Apple 4A95
AB04Apple 5A78

 

I want to create a workflow when items under the same batch ID are created on the list, an email can be sent to each provider. In the email, I want to create an html table listing all the item name and cost under that provider. 

Email for Provider A - AB01

Item nameCost
Apple 150
Apple 290

 

Email for Provider A - AB03

Item nameCost
Apple 495

 

Email for Provider A - AB02

Item nameCost
Apple 578

 

Email for Provider B - AB01

Item nameCost
Apple 310

 

I am stuck in the step of grouping items under the same batch ID in one html table and one email. 

Could anyone help me out?

 

 

 

Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    You can use filter arrays for this. 

     

    Initialize an array variable to store all the distinct values for the column to group on. Then use an apply to each loop to iterate over each of the item in this array and add a filter array action to get only the rows that have the value in the current item for that column. You can then use the create HTML table action to create the html table. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS! 

  • AnastasiyaBurak Profile Picture
    2 on at

    I am struggling with the same currently. Can you please let me know if the advise above has helped?

     

    I am very confused by Initialize variables

     

    Thank you

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 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard