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

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

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

10 REPLIES 10
Kaja
Frequent Visitor

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.

dimi
Impactful Individual
Impactful Individual

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!

Kaja
Frequent Visitor

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.

 

 

Anonymous
Not applicable

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

ikari007
New Member

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.

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.

Anonymous
Not applicable

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. 

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.'."

JColvin
Advocate I
Advocate I

DEAR MICROSOFT

 

This issue has been around since I started using Flow about 3+ years ago. Connection issues are too frequent, and there is no clear guidance on how to remediate these issues. PLEASE DO SOMETHING.

buensucesoconde
New Member

I had a similar issue using email and condition.

 

I generated the error while doing copy and paste dynamic content between conditions (true and false), so, I manually configured each email tool and the problem was solved.

 

buensucesoconde_0-1654118072969.png

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,798)