cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Matt1991
Level: Powered On

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!

 

issue.PNGFlow error message

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

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

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

Power Automate Staff Sunay
Power Automate Staff

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.

Matt1991
Level: Powered On

Re: Invalid template for Mail

Exporting the project worked!

 

Thanks

Matt

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,898)