A week ago one of our Flows started failing for no apparent reason. The flow is pretty basic:
it is triggered from a PowerApps followed by an approval action that leads to updating the related item in Sharepoint and sending two emails. The last action which is an action that sends an email using Office365 Outlook Send an email action started erroring a week ago.
The interesting part is that the first email is sent succesfully whilst only the second one fails with the following error:
InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_to_accounts' inputs at line '1' and column '2575': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_office365_1']['connectionId']' cannot be evaluated because property 'shared_office365_1' doesn't exist, available properties are 'shared_approvals, shared_office365, shared_sharepointonline'. Please see https://aka.ms/logicexpressions for usage details.'. The only difference between the two email actions are couple of properties that are included in the second one, but not the first.
What I've tried so far to fix the issue but without any luck (still get the same error):
Deleting and re-adding the erroring outlook action.
Removing all references to any properties, so trying sending a basic email without dynamic content.
Changing the To address.
Would anyone have any suggestions of what could be causing such error? I've seen couple of similar threads in the community, but not one that is related to the Outlook send an email action. Thanks.