Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Need Help! Error ExpressionEvaluationFailed - Microsoft Form to Word Template

Hi Im trying to create a flow that was in a post i found here:

but for some reason im getting the following error... please can you help me fix this

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.



Super User II
Super User II

Hi @Jamiecharris 


The "When a new form is submitted" triggers each time a form is filled in, so there's no array. Each answer is a new trigger, so you don't need a "for each".


The error is indicating that the "for each" needs an array, but it's not getting one.


Put everything outside the for each, and all will work.


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.




Helpful resources

MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (989)