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:
My new flow that is not showing name without extension:
Any ideas or suggestions would be appreciated!
Solved! Go to Solution.
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.
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:
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.
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.
You can just tinker a bit and create an expression
Something like:
will return
Changed it to File Identifier and it worked! Thanks for all your help!!
User | Count |
---|---|
88 | |
40 | |
23 | |
20 | |
16 |
User | Count |
---|---|
130 | |
50 | |
48 | |
35 | |
26 |