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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Building a Flow - Issu...
Power Automate
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!

 

 

Categories:
I have the same question (0)
  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    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"?

  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @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

  • jpierce-1234 Profile Picture
    4 on at

    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. 

  • ChadVKealey Profile Picture
    1,393 on at

    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-

  • rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at

    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/ 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard