
Announcements
Hi community,
I've been some days looking for a solution in the forum, but I cannot find a working one, sorry in advance.
I'm creating a flow that gets data from an API with an http request. The JSON output contains several transactions. I want to load all transactions into an excel file, but all I tried is always mentioning that the output is an object, and I need an array to insert in Excel. I tried to Parse the JSON, initiate a variable plus other solutions but nothing works.
My JSON looks like:
{
"object": "list",
"count": 2,
"data": [
{
"id": "123",
"amount": 6480,
"currency": "eur"
},
{
"id": "456",
"amount": 7820,
"currency": "eur"
}
]
}
The main goal would be to insert both transactions in an excel table like:
| Id | Amount | Currency |
| 123 | 6480 | eur |
| 456 | 7820 | eur |
Hi community,
After all I found my own answer 🙂
I wanted to share it here in case someone has the same doubt.
Step 1. Create "Compose" action, using as Inputs body('HTTP')?['data']
Step 2. Create "Apply to each" action, using previous outputs as the "Select an output from previous steps".
Step 3. Create "Add a row into a table" inside the "Apply to each" container.
Thanks and regards