Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Create csv table from json output

(0) ShareShare
ReportReport
Posted on by 13

Hello!

When trying to create a csv table from a json (body) output I get this error in Power Automate:

"The property 'columns' must be specified unless the 'from' property value is an array of objects."

 

The json returned looks like this:

 

// 20230228152513
// https://prod-43.westeurope.logic.azure.com/.....

{
 "statusCode": 200,
 "headers": {
 "Transfer-Encoding": "chunked",
 "Connection": "keep-alive",
 "Vary": "Origin,Access-Control-Request-Method,Access-Control-Request-Headers,Accept-Encoding,User-Agent",
 "X-Content-Type-Options": "nosniff",
 "X-XSS-Protection": "1; mode=block",
 "Pragma": "no-cache",
 "X-Frame-Options": "DENY",
 "Strict-Transport-Security": "max-age=31536000; includeSubDomains",
 "Cache-Control": "no-store, must-revalidate, no-cache, max-age=0",
 "Date": "Tue, 28 Feb 2023 14:23:56 GMT",
 "Server": "nginx",
 "Content-Type": "application/json; charset=utf-8",
 "Expires": "0",
 "Content-Length": "3492"
 },
 "body": {
 "datasource": "111-22-4a25-61",
 "columns": [
 "ID",
 "SerialNr",
 "Text"
 ],
 "metadata": [
 {
 "type": "LONG",
 "dataSourceId": "111-22-4a25-61",
 "maxLength": -1,
 "minLength": -1,
 "periodIndex": 0,
 "aggregated": false
 },
 {
 "type": "LONG",
 "dataSourceId": "111-22-4a25-61",
 "maxLength": -1,
 "minLength": -1,
 "periodIndex": 0,
 "aggregated": false
 },
 {
 "type": "STRING",
 "dataSourceId": "111-22-4a25-61",
 "maxLength": -1,
 "minLength": -1,
 "periodIndex": 0,
 "aggregated": false
 }
 ],
 "rows": [
 [
 1,
 123,
 "Text1"
 ],
 [
 2,
 456,
 "Text2"
 ],
 [
 3,
 789,
 "Text3"
 ],
 ],
 "numRows": 3,
 "numColumns": 3,
 "fromcache": false
 }
}

The information I am interested in is within the "rows" array. Also it would be fine to just have the data from the rows - without column headers - if that should make things easier!

I entered the "rows" array to the "From"-Field like this: @{body('Parse_JSON_2')?['rows']} and set the columns to "Automatic": 

chh101_0-1677679681397.png

Do I need to set the Columns to "Custom" in the "Create CSV table" step? What do I need to change for this to work?

Any help is greatly appreciated!

  • chh101 Profile Picture
    13 on at
    Re: Create csv table from json output

    Awesome! Works perfectly, thanks so much!

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: Create csv table from json output

    Hi @chh101 ,

     

    I made a sample for you.

    vxiaochenmsft_0-1677721738437.png

    vxiaochenmsft_1-1677721758343.png

     

    Best Regards,

    Wearsky

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,522 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,890 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow