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

Saving email attachments with same name to SharePoint

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:

CMFlow.png

 

Robert (theBeagle)
rMVP (3 time Office Servers & Services MVP, 2014-2016)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Saving email attachments with same name to SharePoint

Hi @thebeagle,

 

I just tested with the same flow as yours and got exactly the same result. Then I tried to add ".xlsx" after the subjuct like this:

Capture.PNG

 

After this, the file would show correctly in SharePoint library.

 

Capture.PNG

 

If you make sure that all your attachments are .JPEG format than you just need to add it after the subject. If not, then I'm afraid that this could not be achieved so far. You need to use the "Name(attachment name)" dynamic content instead.

 

Regards,

Mona

Community Support Team _ Mona Li
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
Highlighted
Community Support
Community Support

Re: Saving email attachments with same name to SharePoint

Hi @thebeagle,

 

I just tested with the same flow as yours and got exactly the same result. Then I tried to add ".xlsx" after the subjuct like this:

Capture.PNG

 

After this, the file would show correctly in SharePoint library.

 

Capture.PNG

 

If you make sure that all your attachments are .JPEG format than you just need to add it after the subject. If not, then I'm afraid that this could not be achieved so far. You need to use the "Name(attachment name)" dynamic content instead.

 

Regards,

Mona

Community Support Team _ Mona Li
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

thebeagle
New Member

Re: Saving email attachments with same name to SharePoint

Hi, Mona:

 

Thanks!  I was thinking abiout trying something similar.  I'll give it a try and see how it goes.  Many thanks for your response!

Robert (theBeagle)
rMVP (3 time Office Servers & Services MVP, 2014-2016)
thebeagle
New Member

Re: Saving email attachments with same name to SharePoint

As a followup I have implemented this "fix" and can confirm that it works.  I have blogged about the scenario here if anyone cares to check it out:  https://beagledom.ca/2017/08/06/a-tale-of-two-workflows-part-2/

Robert (theBeagle)
rMVP (3 time Office Servers & Services MVP, 2014-2016)

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,703)