cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Template Validation Failed message

Hello, 

 

I'm still learning so please bear with me... I'm trying to create an approval flow where 2/3 approvals are needed in order for it to continue. I mirrored my approach to a post listed here. However, I'm receiving an error stating, "Flow save failed with code 'InvalidTemplate' and message 'The template validation failed: 'The action(s) 'Compose 2, Compose 4' referenced by 'inputs' in action 'Condition' are not defined in the template"

 

What am I missing? 

 

Flows Error.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Shane7,

 

Please take attention two points, one is the variable of action name in expression, the blank should use "_" instead of, the other is add() function only support two Parameters added, so you should add two add() function to add three number.

add(add(outputs('Compose_1'),outputs('Compose_2')),outputs('Compose_3'))

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
Responsive Resident
Responsive Resident

Can you paste the expressions you are using in 2 & 4 please?

Compose 2 = 

if(equals(body('Start_an_approval')?['response'],'Approve'),1,0)
 
Compose 4 = 
if(equals(body('Start_an_approval_4')?['response'],'Approve'),1,0)

Did you consider doing it this way? 

approvals.PNG

Correct me if I'm wrong but with that method it requires all recipients to approve no? 

 

My goal is that the flow will still work if only 2/3 members approve.  

Yep, everyone will need to respond to that one. I'll try replicate your scenario in my test environment. What is the expression you have in the condition?

Condition: 

 

add(outputs('Compose 1'),ouputs('Compose 2'),outputs('Compose 3'))
 
 
Disclaimer: After posting this I realized how disorganized my naming of the compose and approvals was so I renamed them for clarity.

Hi @Shane7,

 

Please take attention two points, one is the variable of action name in expression, the blank should use "_" instead of, the other is add() function only support two Parameters added, so you should add two add() function to add three number.

add(add(outputs('Compose_1'),outputs('Compose_2')),outputs('Compose_3'))

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Edit: I figured out what I was doing wrong, thank you everyone for your help

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (69,992)