cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted

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
Highlighted
Responsive Resident
Responsive Resident

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

Highlighted

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)
Highlighted

Did you consider doing it this way? 

approvals.PNG

Highlighted

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.  

Highlighted

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?

Highlighted

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.
Highlighted

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

Highlighted

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

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (12,124)