web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Approval Flow - error ...
Power Automate
Answered

Approval Flow - error with for each "is of type 'Object'. The result must be a valid array."

(0) ShareShare
ReportReport
Posted on by 289

Hi Guys,

I have the following flow:

Screenshot 2021-05-17 112221.png

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 🙂

Categories:
I have the same question (0)
  • Verified answer
    jinivthakkar Profile Picture
    4,187 on at

    @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.

  • JimJim Profile Picture
    289 on at

    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 🙂 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard