Hi All
I am trying to create a very simple flow, that calls a foreign currency api, and adds the values into a sharepoint list. This is my first time using Power Automate.
I can get it to work, however it is inelegant, I am manually specifying each currency, I want to just be able to iterate over the api result, and it will automatically populate the currency field - ie I can add more currencies to the HTTP request and they will automatically flow into my sharepoint list.
I think I need to use a "apply to each" step, but when I try and use the "Rates" dynamics content, the flow fails with the error that "
The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each')' is of type 'Object'. The result must be a valid array.
This feels like it should be super easy but I'm missing something 😞 please help. The parse json schema is below, as is my current working Flow.
{
"type": "object",
"properties": {
"base": {
"type": "string"
},
"date": {
"type": "string"
},
"rates": {
"type": "object",
"properties": {
"EUR": {
"type": "number"
},
"USD": {
"type": "number"
}
}
},
"success": {
"type": "boolean"
},
"timestamp": {
"type": "integer"
}
}
}
