Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Building a Flow - Issue with "Apply To Each"

(0) ShareShare
ReportReport
Posted on by 4

I am building a flow and running into an issue with the 'apply to each' step. 

 

The below is the error message I see. 

 

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

 

Any suggestions or assistance would be very appreciated!

 

 

  • rzaneti Profile Picture
    4,096 Super User 2025 Season 1 on at
    Re: Building a Flow - Issue with "Apply To Each"

    Hi @jpierce-1234 ,

     

    You won't need the JSON expression to generate an array for the loop. Could you share an image of the raw outputs of your "Get response details" action? I don't know exactly which type of data are you trying to input in the loop, but analyzing the raw outputs will be helpful to identify any approaches to generate an array from there 🙂

     

    If you are not familiar with how to access the raw outputs, refer to this step-by-step: http://digitalmill.net/2023/06/29/how-to-access-the-raw-outputs-in-power-automate/ 

  • ChadVKealey Profile Picture
    1,393 on at
    Re: Building a Flow - Issue with "Apply To Each"

    Yeah, the problem is that you can't just use the "json" expression in there. You need a "parse json" action to form a proper array. See this playlist for details: https://www.youtube.com/playlist?list=PLMVyjgrWIGnwQowO2RsvHg0pZ8EozvAG-

  • jpierce-1234 Profile Picture
    4 on at
    Re: Building a Flow - Issue with "Apply To Each"

    Hi there, I entered json(outputs('Get_response_details')?

     

    Below is what this portion of my flow looks like. 

     

    For reference, I am trying to create a flow that will send an email once a Microsoft Form is completed, as well as include attachments that are included in the form to the same email. 

  • creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Re: Building a Flow - Issue with "Apply To Each"

    @jpierce-1234 You might find this YT Tutorial helpful while you build out your flow: How to Get a Microsoft Form RSVP Response into a SharePoint List

     

    I cover the following in this video tutorial:

    ✅ How to get a Microsoft Form Response into SharePoint

    ✅ How to get a Microsoft Form ID

    ✅ How to get a Microsoft Form response

    ✅ How to Build a Microsoft Form with Conditional Fields

    ✅ How to used Branching in Microsoft Forms

    ✅ How to format Microsoft Form multiple choice responses for a SharePoint multi-choice column

    ✅ How to parse a Microsoft Form multiple choice response as string of text

    ✅ How to convert a text response to a number

    ✅ How to use the Switch action

    ✅ How to create a custom email confirmation for a Microsoft Form submission

    ✅ How to Create a Custom View in a SharePoint list

    ✅ How to use the Compose Action

    ✅ How to write Power Automate Expressions

  • rzaneti Profile Picture
    4,096 Super User 2025 Season 1 on at
    Re: Building a Flow - Issue with "Apply To Each"

    Hi @jpierce-1234 ,

     

    It looks like you are trying to loop a value that is not an array. What exactly are you passing as input to the "Apply to each"?

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1