Trying to save a flow I have spent 10 hours working on, and this is the error code I keep getting? I really need to save my work unless I will lose it all! The flow checker tells me there are no errors, however this is the code I get when I attempt to save my work!
Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The inputs of template action 'Condition_1' at line '1 and column '5839' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Condition_1' to be referenced by 'repeatItems' or 'items' functions.'.'.
Here is a SS of condition 1 in my flow:
Thank you in advance!
I meant to say that just reselect the columns from dynamic content window in condition action for middle & right branch. When you reselect the columns those will be from the output of "Apply to each 1" & "Apply to each 2" action. This way references of original "Apply to each" output have been removed from both branches.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Does this mean I need to remove all copy and pasted conditions and do them again manually? What do you mean by
"modify the condition actions for middle & right side branch to include output property from respective "Apply to each" action"
Sorry I am brand new to Automate but thank you so much for helping!
Hi @S4MWEL
It looks like you had copied left branch & pasted it to create middle & right side branch. Post copying the name of the action "Apply to each" has been changed for middle & right branches (Apply to each 1 & Apply to each 2). You need to modify condition actions for middle & right side branch to include output property from respective "Apply to each" action as those are still referring original 'Apply to each' action.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492