We receive more support calls than we’d like where the following error is generated running a Flow instance: InvalidTemplate. Unable to process template language expressions in action
An example complete error is detailed below:
InvalidTemplate. Unable to process template language expressions in action 'ACTION NAME' inputs at line '1' and column '2722': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['CONNECTION NAME']['connectionId']' cannot be evaluated because property 'CONNECTION NAME' doesn't exist, available properties are 'OTHER CONNECTION NAMES'. Please see https://aka.ms/logicexpressions for usage details.'.
A further example:
This error is not caused by an issue with the action or the configuration of the action… in short your Flow is corrupt.
Fortunately fixing the issue can be quite simple and you may wish to initially try the following steps:
- Close your browser session, re-open the Flow in a new session and re-run the Flow.
- Remove the offending action and connection, re-add your action and repeat step #1
However, this quickest resolution we have found is to export and then re-import your flow as a brand new Flow, deleting the existing Flow once complete.
If you’re unsure how to export / import Flows please refer to the following guidance on Microsoft’s website: https://flow.microsoft.com/en-us/blog/import-export-bap-packages/
We hope this helps solve your issue 🙂