cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
the_lost_panda
Regular Visitor

Get all IDs from SharePoint and their respective comments, with name as a table header

I have a flow that is semi-working, however not finished as I'm completely stuck on this problem.

the_lost_panda_0-1621454483096.png

This flow selects all the data from a SharePoint list(id, name, comment). And then sends the email to me, in the following form.

 

 

 

[{"id":1.0,"Name":"test2","Comment":"test_comment"},
{"id":1.0,"Name":"test2","Comment":null},
{"id":2.0,"Name":"Alberto","Comment":null},
{"id":3.0,"Name":"john doe","Comment":null}]

 

 

 

 

Preferred Outcome:

----------------------

Ideally, I want to send an email where it is grouped by user ID and the Name as a table header, along with the all of that user's comments. Something like:

Nametest2

Alberto

john doe

Comment

some_comment

 

null

nullnull

 

I have been pondering for a couple of hours, but nothing yet has been fruitful. Any help, is more than appreciated.

 

Stay safe,

the_lost_panda

1 REPLY 1
PrasadAthalye
Super User
Super User

You can use Create HTML table to convert output to HTML and then use in the email.

 

PrasadAthalye_0-1621511519256.png

 

For Grouping, follow below steps...

 

  1. Run a loop and gather all Unique records in a array variable. In your case it seems ID is the column.
  2. Then Run a loop on that array. Inside this loop use select to filter output of GetItems by ID column from array.
  3. Use Convert to HTML on select output and use that within email.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (3,780)