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

Invalid template for Mail

Hi

 

I have created a flow with the purpose of approving a document to be released (sharepoint doc).

 

The high level flow detail is:

  • Trigger: SP for a selected file
  • gets all details of user, file properties etc.
  • Starts approval
  • Condition (if Yes)
    • Send email saying its been approved
    • SP update document metadata to reflect approval
  • Condition (if No)
    • Send email saying denyed

The issue is with the mail component, error is:

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

 

See image of failure below. All help is greatly appreciated!

 

Flow error messageFlow error message

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Invalid template for Mail

Hi @Matt1991 ,

 

Please try to export this Flow as a .zip file and re-import it as a new Flow.

After configuring the relevant connection, test it again.

Please take a try again and feel free let me know if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Invalid template for Mail

Hi @Matt1991 ,

 

Please try to export this Flow as a .zip file and re-import it as a new Flow.

After configuring the relevant connection, test it again.

Please take a try again and feel free let me know if issue still exist.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Power Automate
Power Automate

Re: Invalid template for Mail

Are you testing this with a previous run - after adding a new action?

 

I recommend testing with "I will trigger it myself" option - if you have added a new connector/action combo to the flow.

 

Previous runs don't have access to new actions that are added in the flow and hence won't be able to successfully execute.

Highlighted
Frequent Visitor

Re: Invalid template for Mail

Exporting the project worked!

 

Thanks

Matt

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (7,651)