I have been going slowly mad trying to figure out how to save an attachment to SharePoint from Outlook BUT change the attachment name in the process. I have a Flow in place that saves the attachment into the correct SharePoint library; however as I use the SUBJECT line from the email as the NAME for the attachment and Attachement Content as the file, I end up with the file in Sharepoint but without a true content type attached to it. This means that online preview and viewing is not availabe for the saved file.
In this particular case, each email will have one attachment, a JPEG. I'd like to figure out how to get the file into SharePoint as a JPEG but have the actual file name (part before the .jpeg if you will) changed to match the email subject line. So, if the email subject is CM100 and the jpeg attached the email is something like 2017_000456890.jpeg, I'd like the file in Sharepoint to actually be CM100.jpeg and this is also the default Name in SharePoint.
I have tried inserting conditions and have even attempted to use Compose (along these lines) but just don;t know enough about WDL to figure it out. Any ideas would be greatly appreciated!
This is the Flow as it stands:
