cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

Template "Send an Email when a new file is added to OneDrive for Business" fails

When using the  "Send an Email when a new file is added to OneDrive for Business" template, the following error message is generated and the Flow fails on the Send Email action:

 

Unable to process template language expressions in action 'Send_email' inputs at line '1' and column '2595': 'The template language expression 'triggerOutputs()['headers']['x-ms-file-name']' cannot be evaluated because property 'x-ms-file-name' doesn't exist, available properties are 'Pragma, Retry-After, x-ms-request-id, Timing-Allow-Origin, x-ms-apihub-cached-response, Access-Control-Allow-Origin, Access-Control-Expose-Headers, Cache-Control, Date, Location, X-AspNet-Version, X-Powered-By, Content-Length, Content-Type, Expires'. Please see https://aka.ms/logicexpressions for usage details.'.

 

The error is generated when the root or a folder is selected.

I also tested the Flow by uploading a document and creating a new document in OneDrive for Business - the Flow errored out in both cases.

 

I replicated this issue a number of times.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
1 REPLY 1
Community Support Team
Community Support Team

Re: Template "Send an Email when a new file is added to OneDrive for Business" fails

Hi @ScottShearer,

 

Thanks for feedback.

 

I am afraid that there should be some updates on the template.

 

The error message says that property ‘x-ms-file-name’, I am afraid that this property has been replaced by Display name.

 

So I made some changes on the template, change x-ms-file-name to Display name, x-ms-file-path to Path. When I add a file to the folder, flow would be triggered and the email can be sent out successfully.

 

Please check the following screenshots:

1.PNG

2.PNG

 

 

Best regards,

Mabel Mao

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

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 (6,340)