Skip to main content

Notifications

Power Automate - Building Flows
Answered

Apply of each error The result must be a valid array.

Posted on by 10

ERROR:

The execution of template action 'Apply_to_each_photo' failed: the result of the evaluation of 'foreach' expression '@json(outputs('Get_response_details_')?['body/r9d60b0ac0ec547ba82cca2a8bd880bbd'])' is of type 'Null'. The result must be a valid array.

2024-05-13 16_30_21-Edit your flow _ Power Automate en nog 8 andere pagina's - Admin Lars - Microsof.png

 

2024-05-13 16_31_41-Edit your flow _ Power Automate en nog 8 andere pagina's - Admin Lars - Microsof.png

 

json(outputs('Get_response_details_')?['body/r9d60b0ac0ec547ba82cca2a8bd880bbd'])

 The Power Automate works fine if I add pictures in the form, if I don't add any I get this error, can you help this beginner get started?

  • LarsHouben Profile Picture
    LarsHouben 10 on at
    Re: Apply of each error The result must be a valid array.

    @ManishSolankiThanks for the solution, this works, already learned something.

  • Verified answer
    ManishSolanki Profile Picture
    ManishSolanki 14,981 on at
    Re: Apply of each error The result must be a valid array.

    Hi @LarsHouben 

     

    Pls try below expression:

    if(empty(outputs('Get_response_details_')?['body/r9d60b0ac0ec547ba82cca2a8bd880bbd']),json(string('[]')),json(outputs('Get_response_details_')?['body/r9d60b0ac0ec547ba82cca2a8bd880bbd']))

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard