cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Community Support
Community Support

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

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.

Exporting the project worked!

 

Thanks

Matt

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (6,183)