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

Unable to process template language expressions in send an email action

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.'.
 Flow-overview.png
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.
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Frequent Visitor

Re: Unable to process template language expressions in send an email action

UPDATE.

 

After the third attempt of removing and readding the erroring action, it started working. Still have no clue why this started failing. Currently, the Flow seams to be working as previously - no changes to the action setup,  just removed and added it back again couple of times.

View solution in original post

Highlighted
New Member

Re: Unable to process template language expressions in send an email action

When this happens, save your flow and open it in an anonymous or incognito browser window. It should work, sometimes the browsers cache something that Power Automate does not like.

View solution in original post

8 REPLIES 8
Highlighted
Frequent Visitor

Re: Unable to process template language expressions in send an email action

UPDATE.

 

After the third attempt of removing and readding the erroring action, it started working. Still have no clue why this started failing. Currently, the Flow seams to be working as previously - no changes to the action setup,  just removed and added it back again couple of times.

View solution in original post

Highlighted
Impactful Individual
Impactful Individual

Re: Unable to process template language expressions in send an email action

Hi

 

Same here, for me this is happening on a SharePoint connector to create an item.

Also from a PowerApps.

 

Can you elaborate on what you mean by "After the third attempt of removing and readding the erroring action" what are you exactly talking about? What erroring ?

 

Thank you in advance!

Highlighted
Frequent Visitor

Re: Unable to process template language expressions in send an email action

Hi @dimi,

 

When I say 'erroring action' I mean the action that threw an error when the Flow ran, in my case it was a send an email action named 'Send an email to accounts'. See the screenshot attached to the original post. 

 

For me, just deleting and re-adding the action that was causing the issues helped. I did not make any changes in the action configurations, just removed and added it back again. Why this fixed the problem? - I don't know.

 

Would it help in your case? - Maybe. In your case, it might make a bit more sense. If you have made changes in the SharePoint list (e.g. added/removed/changed list columns), then the connector might brake. Thus re-adding it might help.

 

 

Highlighted
Frequent Visitor

Re: Unable to process template language expressions in send an email action

Is there any direct solution for this problem ? Most of the cases response is so complex that it does not lead to proper solution 

Highlighted
New Member

Re: Unable to process template language expressions in send an email action

When this happens, save your flow and open it in an anonymous or incognito browser window. It should work, sometimes the browsers cache something that Power Automate does not like.

Highlighted
New Member

Re: Unable to process template language expressions in send an email action

When this happens, save your flow and open it in an anonymous or incognito browser window. It should work, sometimes the browsers cache something that Power Automate does not like.

View solution in original post

Highlighted
New Member

Re: Unable to process template language expressions in send an email action

I think I found out the issue - if in your logic "From" is "True then for seom reason under 'if yes' check from email address condition is not populating from email address. You need to manually populate that. 

Highlighted
Regular Visitor

Re: Unable to process template language expressions in send an email action

ikari007 thanks this helped me in a way but doesnt fixed the problem. 

I've been struggling with this problem for 2 days. Re-added connections, exported/imported flows to powerapps. Manual test triggers from flows. I opened powerautomate in Edge instead of chrome which we use. After manually triggering the flow everything just seems fine. All the steps went well. Except when i trigger the flow from the powerapp the flow crashes. 
If its not get file content using path then smthg else. 

 

I guess the final step will be recreating the flow from scratch. This I wanted to avoid. 

 

Thanks for your advice btw. 🙂

"Unable to process template language expressions in action 'Get_file_content_using_path_-_report' inputs at line '1' and column '2286': 'The template language expression 'json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$connections']['shared_sharepointonline']['connectionId']' cannot be evaluated because property 'shared_sharepointonline' doesn't exist, available properties are 'shared_office365users, shared_sharepointonline_1, shared_approvals, shared_office365, shared_planner, shared_office365_1'. Please see https://aka.ms/logicexpressions for usage details.'."

Helpful resources

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

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Top Solution Authors
Users online (4,762)