Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

(0) ShareShare
ReportReport
Posted on by 12

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerOutputs()?['body/resourceData/responseId']' is of type 'Integer'. The result must be a valid array.

 

Try to complete a simple get Forms responses and send an email based on the individual responses.

  • FreddyD07 Profile Picture
    FreddyD07 12 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    Hey All - I think I got it by adding the grouping of questions twice.

    FreddyD07_0-1630436852361.png

     

  • FreddyD07 Profile Picture
    FreddyD07 12 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    @eric-cheng & @Pstork1 >> Thanks again for the help! The data is pulling in correctly now. I do have one other issue, I have a question that if answered "No" and then one or both of the follow up questions are answered "Yes" it should all be a true statements. However if the first question is answered "No" and both follow up questions are "No" I need the statements to be false (go to the no side). 

     

    Any thoughts? Here is a screen shot - 

    FreddyD07_0-1630421543648.png

     

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 64,907 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    The trigger for MS Forms doesn't include the answers to the questions.  To do that you need to use the Response ID to get the response details.  As I mentioned in my original reply that used to require the use of an apply to each loop.  It no longer does, but it does require two actions.  See the screenshot below for an example.

    image.png

  • eric-cheng Profile Picture
    eric-cheng 5,171 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    Hi @FreddyD07 ,

     

    Can you go to your trigger settings and ensure Split On is set to On.

     

    Screenshot_20210831-234852_Chrome.jpg

     

    Then delete and re-add the trigger and Get Response Details action.  Refer to the screenshot in my earlier post.  No loops required.

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

  • FreddyD07 Profile Picture
    FreddyD07 12 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    Just to add a little more information - I have a 10-ish question Form that I am trying to have PowerAutomate check against the answers (all yes or now with a few add dates in). Based on the Yes/No answers, it emails a particular group. I cannot even get it to check the list of answers that it is pulling. Thanks again for any assistance.

  • FreddyD07 Profile Picture
    FreddyD07 12 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    Here is a screenshot - 

    FreddyD07_0-1630414561168.png

     

     

    Appreciate all the responses and guidance.

  • Pstork1 Profile Picture
    Pstork1 64,907 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    You are probably looking at an old example on the Internet.  The trigger for MS Forms originally supplied the forms to the flow as a collection of recently submitted forms.  The trigger was later changed to fire for each individual form.  So you don't need a for each loop to access the Response ID for the form to get the details.  You can access that dynamic content directly.

  • Verified answer
    eric-cheng Profile Picture
    eric-cheng 5,171 on at
    Re: Simple Forms to Power Automate - Getting "Expression Evaluation Failed"

    Hi @FreddyD07 ,

     

    Can you share a screenshot of your flow?  You shouldnt need expressions to get the responses from a submitted form.

     

    Screenshot_20210831-224828_Chrome.jpg

     

    --------------------------------------------------------------------------
    If I have answered your question, please mark my post as a solution
    If you have found my response helpful, please give it a thumbs up

    Connect on LinkedIn

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics