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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Template Validation Fa...
Power Automate
Unanswered

Template Validation Failed: WorkFlow Help

(0) ShareShare
ReportReport
Posted on by
Hi All,
 
Full disclosure, a colleague created this workflow some years ago and left, so I dont understand the full inner workings of the flow.
 
We have a Power Automate flow for creating new user's, where it pulls data in from completing a Microsoft Form and sends it as an email to our service desk, after receiving approval from a line manager.
 
The flow is based on site, so 'If user is member of site A, follow this sub flow with site A approvers' and 'If user is not a member of Site A, are they a member of site B' - and this continues for 5 or 6 different sites.
 
One of the sites has been closed and unfortunately wasn't the last one in the chain, so on removing it, it will remove one I need to keep, so I need to manually recreate the sub flow for the site I need to keep (I hope that makes sense). I've done this but I get the following error when trying to save the change:
 
The template validation failed: 'The inputs of template action 'Send_an_email_(V2)_9' at line '1 and column '51833' is invalid. Action 'Apply_to_each_7' must be a parent 'foreach' scope of action 'Send_an_email_(V2)_9' to be referenced by 'repeatItems' or 'items' functions.'.
 
On taking a look at similar posts, it seems the issue relates to the ID and where this points to. The 'Responses field' highlighted below is where I think the issue is:
 
 
When adding the 'Dynamic content' for Responses, I assumed it was the option that just states 'Responses - All of the responses' but this is what is erroring. I found that if I chose one the other options, it shortens the field to just 'Responses' so I dont know which one is being used. I've tried to check this option for other sites higher up in the flow but none of them give away any information:
 
Happy to share anything else needed to understand this further but any help would be greatly appreciated! I'm currently not able to save my changes so I can revert back to how it was at the start. Just trying to work out if I'm looking in the right place for the isse and if so how I can work out which option I need. If anyone is able to explain what this field is actually doing, that may also help.
 
Many thanks,
 
Adam
 
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    Template Validation Failed: WorkFlow Help
    Please go to a failed run of the flow and take a screen shot of the failed action where the error is occurring. It will be noted with a red exclamation point. Then also include a screen shot of how the action that is failing has been configured.
     
    The error says the action named Send_an_email_(V2)_9 is not connected to an apply to each action named Apply_to_each_7, which is true based on your screen shot. It is connected to Apply_to_each_9 instead. Once you provide the additional information, it will be clearer as to the actual problem.
  • Suggested answer
    RedPower Profile Picture
    2 on at
    Template Validation Failed: WorkFlow Help
    Hi There,
     
    Thank you for your suggestion. I didn't know whether I could run this test, as the error is preventing me from saving the flow, after making the changes to test this. On having another look, I noticed I could copy part of the flow to my clipboard, so I did this, removed the part not needed and was able to paste the existing part back into the flow, without needing to recreate anything.
     
    I think this workaround has done the job, just needed to know another way of achieving the desired outcome.
     
    Thank you for coming back to me on this!
     
    Regards,
     
    Adam

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 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard