cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ml2323
New Member

Dynamic Content Issue

Hello,

I have created a flow that automatically sends and email with an attachment when I upload a file to a one drive folder. 

The flow works flawlessly but I want to clean up the Email Subject. Currently it uses the file name as the subject but this includes the file extension. (Example: W100012OC_Travel_Request.pdf). I have another flow that I use that I was able to use the dynamic content that is Name without file extension. When I created this new flow it is not showing me the Name without file extension in my dynamic content choices. I think this is due to the (properties only) portion. Is there a way to incorporate them both to be able to attach the file to the email and use the file name with out the extension as the email subject? 

 

Example flow that has dynamic content I am looking for:

ml2323_2-1647538177556.png

 

 

My new flow that is not showing name without extension:

ml2323_1-1647537984398.png

 

Any ideas or suggestions would be appreciated! 

2 ACCEPTED SOLUTIONS

Accepted Solutions

I receive the following error now when using this method. 

 

ml2323_0-1647557739224.png

 

View solution in original post

What are you putting in for the file id into the get file metadata action? 

 

In the error, it looks like the file name is being used instead of the file id. 

View solution in original post

5 REPLIES 5
mattias1172
Responsive Resident
Responsive Resident

I don't use OneDrive (we use SharePoint mainly) but this appears to be a limitation of the "When a file is created action". The top action that has that dynamic content is actually a different action "When a file is created (properties only)". 

 

You can get around this by passing in the file id from the "when a file is created" into a "Get file metadata". This action has the dynamic content you are looking for:

 

mattias1172_0-1647541807343.png

 

Edit

The above workaround presuming you specifically need the "When a file is created" action. Otherwise, change it to the "when a file is created (properties only)" like your first screenshot. 

I receive the following error now when using this method. 

 

ml2323_0-1647557739224.png

 

What are you putting in for the file id into the get file metadata action? 

 

In the error, it looks like the file name is being used instead of the file id. 

KvB1
Solution Sage
Solution Sage

You can just tinker a bit and create an expression

 

Something like:

KvB1_1-1647609857692.png

will return

KvB1_0-1647609840050.png

 

Changed it to File Identifier and it worked! Thanks for all your help!!

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!

Top Solution Authors
Users online (1,474)