Hello There!
Im having some issues trying to read a file which has just been created in the same flow.
The full context is: I need to fill a Sharepoint List with excel content (either attached via Form or another Sharepoint List) (if someone knows a better way plz tell me)
So far the flow is:
- A user creates an item in Sharepoint List "1" with an Excel attachment.
- A flow is triggered, downloads the attachment (and as it cant read it as-is)
- Uploads the file to OneDrive
- Open and reads that file from OneDrive
- Iterates the rows
- Each of those rows ar parsed as Json to work with the elements (hardcoded column names as those are unknown at this point)
- With the row info insert a new item in Sharepoint List "2"
Im having some trouble implementing points 6 and 7, so far this is what i got:
{
"type": "object",
"properties": {
"body": {
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"@@odata.etag": {
"type": "string"
},
"colA": {
"type": "string"
},
"colB": {
"type": "string"
},
"colC": {
"type": "string"
},
"colD": {
"type": "string"
},
"ColE": {
"type": "string"
},
"colF": {
"type": "string"
},
"colG": {
"type": "string"
},
"colH": {
"type": "string"
},
"colI": {
"type": "string"
}
},
"required": [
"@@odata.etag",
"colA",
"colB",
"colC",
"colD",
"colE",
"colF",
"colG",
"colH",
"colI"
]
}
}
}
}
}
}
Output from List rows present in a Table is sent to Parse JSON and maps it:
Example when I run it;
And next operation where I need to use the row info:
Fails with:
ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@body('Parse_JSON')?['body']?['value']' is of type 'Null'. The result must be a valid array.
Hope someone can nail down the problem.
Thanks in advance fot your time.