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 / How to convert JSON to...
Power Automate
Suggested Answer

How to convert JSON to a table in power automate

(0) ShareShare
ReportReport
Posted on by 563
I need to convert my JSON array into a table in Power Automate. May i know how to achieve this. 
 
Below is my JSON array.
 
 
I receive below table in my email which contains JSON data like {"AISRefNo:"}. I want to exclude that. Only need AIS number AIS1447. May i know how to achieve that?
 
 
I have the same question (0)
  • chiaraalina Profile Picture
    1,699 Super User 2026 Season 1 on at
    Hi
     
    That means your AISRefno field currently contains an object/stringified JSON, not the plain value.
     
    Try one of these depending on your structure:
     
     
    items('Apply_to_each_3')?['AISRefNo']
     
    or
     
     
    items('Apply_to_each_3')?['AISRefno']?['AISRefNo']
     
    Let me know if it worked!
  • Suggested answer
    11manish Profile Picture
    463 on at
    To convert a JSON array into a table in Microsoft Power Automate, the easiest way is to use the built-in Create HTML table action.
     
    Simple Solution (Recommended)
     
    Step 1: Ensure your JSON format
    Example input:
     
    [
      { "AISRefNo": "AIS2736", "Count": 3 },
      { "AISRefNo": "AIS0146", "Count": 2 }
    ]

    Step 2: Use Create HTML Table
    Add action:
    • Create HTML table
    • From → your JSON array (e.g., outputs('FinalArray'))
    • Columns → Choose Custom
    Map fields:
    Column    Value
    AISRefNo    item()?['AISRefNo']
    Count         item()?['Count']
     
    Step 3: Use the table
    Now you can:
    • Send in Email (Outlook action)
    • Save to SharePoint
    • Convert to PDF
     
    Thanks
    Manish
     
     
  • Suggested answer
    Haque Profile Picture
    894 on at
    Hi @Iantaylor2050,
     
    I am thinking you are experiencing this in the email body? Right? If this is the case, can you please stop the HTML styling for a while to check? 
     
     
    Normally, once youre "Apply to each" action is completed, the Compose action with "FinalResult"
     
     
    should prouduce this result: Which is a json array object.
    [
      {
        "RBLRefNo": "RBL2600",
        "Frequency": 6
      },
      {
        "RBLRefNo": "RBL2113",
        "Frequency": 1
      },
      {
        "RBLRefNo": "RBL1473",
        "Frequency": 2
      },
      {
        "RBLRefNo": "RBL2144",
        "Frequency": 1
      }
    ]
    NOTE: Please consider AISRefNo = RBLRefNo and Count = Frequency for your case.
    When you use Create HTML table action on FinalResult (from compose action), the below table will be produced:
     
    If all failse, use expression with Compose: Make sure you’re outputting a string, not an object.
     

    Inside the "Apply to each"  loop, build each row, use a Compose action to build TableRows with an expression like:

    concat('<tr><td>', items('Apply_to_each')?['AISRefNo'], '</td><td>', string(items('Apply_to_each')?['Count']), '</td></tr>')
    
    This creates one HTML row per item.
     
    Please note taht, you need to initialize an array varible like FinalResult at the start of your flow (at least before Apply to each loop). Let's say array variable name is TableRows, Type Array and value [].
     
    After the loop, to collect a table, use the following expression in a Compose:
    concat('<table border="1"><tr><th>AISRefNo</th><th>Count</th></tr>', join(variables('TableRows'), ''), '</table>')
    This should produce a complete html table and you can use it in the email.
     
     
     
     

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
Haque Profile Picture

Haque 333

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 202 Most Valuable Professional

Last 30 days Overall leaderboard