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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Create csv table from ...
Power Automate
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!

Categories:
I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @chh101 ,

     

    I made a sample for you.

    vxiaochenmsft_0-1677721738437.png

    vxiaochenmsft_1-1677721758343.png

     

    Best Regards,

    Wearsky

  • chh101 Profile Picture
    13 on at

    Awesome! Works perfectly, thanks so much!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard