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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How To Create Dynamic ...
Power Automate
Unanswered

How To Create Dynamic HTML Table from JSON Array Variable Values

(0) ShareShare
ReportReport
Posted on by 15

 

I already have a step in Power Automate which creates a filtered list of JSON values, which will be the unique reports that have been requested for review for this automation. I'm then taking that JSON and setting an array variable ("Non-EmptyReports") with that finalized array, and here's what the raw output of the variable looks like.

{
   "name":"Non-EmptyReports",
   "value":[
      {
         "PBIReport1":"https://app.powerbi.com/groups/group1/reports/report1/ReportSectionf1?experience=power-bi",
         "PBIReport2":"https://app.powerbi.com/groups/group1/reports/report2/ReportSectionf1?experience=power-bi"
      }
   ]
}

I would like to dynamically create a HTML table that can be inserted into a MS Teams Chat and Outlook email with these values. There could be anywhere from 1 - 20 values in this array, so I cannot define a table with a set number of rows within it. I would like to build the table like this based on the JSON from above:

Any help/advice would be greatly appreciated!​

Categories:
I have the same question (0)
  • Cgangweg01 Profile Picture
    825 Super User 2026 Season 1 on at
    Hello swolfe2,
     
    I'm not certain this is the solution you are after, but I did something similar with the output of a filtered array.
     
    Input to the Create HTML table action
     
    Create HTML table action
    Format the HTML table with some styling
     
    Send the formatted table in an email
     
     
  • swolfe2 Profile Picture
    15 on at
    Hey Cgangweg01,
     
    Hmmm, I'm not able to get that solution to work on my end. I think part of it could be related to the JSON array that I have:
    {
       "name":"Non-EmptyReports",
       "value":[
          {
             "PBIReport1":"https://app.powerbi.com/groups/group1/reports/report1/ReportSectionf1?experience=power-bi",
             "PBIReport2":"https://app.powerbi.com/groups/group1/reports/report2/ReportSectionf1?experience=power-bi"
          }
       ]
    }
    
     
     
    I think to get your solution to work, I would need to load each row of this JSON into separate values like:
    {
       "body": [
             {"PBIReportURL":"https://app.powerbi.com/groups/group1/reports/report1/ReportSectionf1?experience=power-bi"},
             {"PBIReportURL":"https://app.powerbi.com/groups/group1/reports/report2/ReportSectionf1?experience=power-bi"}
       ]
    }
    Is there a way to do this without looping through the output?
  • David_MA Profile Picture
    13,465 Super User 2026 Season 1 on at
    Cgangweg01 I noticed in your post that the styling you are using for the CSS of your table includes using nth-child in tables tr td th. Does that actually work for you? I didn't think it was supported by Outlook.
  • Cgangweg01 Profile Picture
    825 Super User 2026 Season 1 on at
    Hi -
     
    I really don't know much about the CSS and if it is applying everything it includes. I copied from someone else's solution from a blog post somewhere.
    But it worked, the table is rendered with formatting just as I need with header and one or more rows.
     
    Perhaps a Parse JSON, Compose and Select actions are needed for the other part of your solution.

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!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 224 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 185 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 94 Super User 2026 Season 1

Last 30 days Overall leaderboard