Hi Guys,
I have the following flow:
Which when tested returns error message: The execution of template action 'Start_approval' failed: the result of the evaluation of 'foreach' expression '@outputs('Get_approval')?['body']' is of type 'Object'. The result must be a valid array.
Get Approval is a Get Item command and returns a single list item using the ID, I am not sure how to return it as an array, or is there another method I should use?
Thanks 🙂
Hi @jinivthakkar ,
Thank you, I don't know how that for each loop got there, I maybe added it in error. I have removed the loop and it works 🙂
@JimJim do you even need a foreach loop ? foreach loops expects an array as input so the error is correct.
Try passing values instead of body if you need and I assume Get approval is get item which returns only one item if thats the case you can start approval directly after Check product criteria action.
--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.