The template validation failed: 'The action(s) 'xxx' referenced by 'inputs' in action 'xxx' are not defined in the template.'.

{tocify} $title={Table of Contents}


Currently working on a Logic App to accept AS2 message, decode it and do further processing and if any error encountered then notify the stakeholders by sending an email.

And for that I used email action and tried to pass on the error message as a body to the email, but I was not allowed to save the logic app for following reason

Action not defined in template


The template validation failed: 'The action(s) 'Decode AS2 message' referenced by 'inputs' in action 'Failure_Alert' are not defined in the template.'.

Why it happened

I am using following expression to set the body of alert email which will execute only if Decode AS2 message action fails

actions('Decode AS2 message').outputs.body.errormessage

It looks absolutely fine on designer but still wasn't able to save and the reason is how Logic App renders in background i.e. at code level. Upon switching to code view found that Decode AS2 message gets converted to Decode_AS2_ message

What to do

I just did the way logic app needs to provide the action name in the expression as below and all worked fine.


If you have questions or suggestions, feel free to do in comments section below !!!

Do share if you find this helpful .......
                          Knowledge Sharing is Caring !!!!!!

Learn More about Logic App


If you have any suggestions or questions or want to share something then please drop a comment

  1. Excellent! Just what I needed. Thanks!

  2. Thanks bud! This has saved me at least one hour of work! Appreciated :-)

Previous Post Next Post