cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thebeagle
Level: Powered On

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 Team
Community Support Team

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 Team
Community Support Team

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
Level: Powered On

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
Level: Powered On

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
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 (5,535)