web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving email attachmen...
Power Automate
Unanswered

Saving email attachments with same name to SharePoint

(0) ShareShare
ReportReport
Posted on by 7

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

 

Categories:
I have the same question (0)
  • Verified answer
    v-monli-msft Profile Picture
    on at

    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

  • thebeagle Profile Picture
    7 on at

    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!

  • thebeagle Profile Picture
    7 on at

    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/

  • Palpeti Profile Picture
    2 on at

    Is there a way to do a combination of the original file name + current date + .xlsx?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard