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":
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!
Awesome! Works perfectly, thanks so much!
WarrenBelz
146,522
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,890
Most Valuable Professional