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 / Renaming Excel file wh...
Power Automate
Unanswered

Renaming Excel file when Saved in Sharepoint from Outlook

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

 

I tried the "Save my email attachments to a SharePoint document library" flow and it's running flawlessly. However, the Outlook attachment should overwrite the old file everytime it's received.

 

What is happening is the following:

-Original attachment name is abc-yyyy-mm-dd.xlsx, when it runs with the default flow I'm able to open it with Excel Online.

-Used flow to change the attachment name in the "Name" field to abc.xlsx, but Excel Online won't open this file.

 

What can I do to correct this situation?

 

Thanks!

-R

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

    Hi rogerabm,

     

    It should be default for SharePoint library that when a file is created in the library, if it has the same name with the old file, the old file would be overwritten, if not, a new file would be created.

     

    About what is happening on your side, I start the flow from the template, it works fine, I can check the Excel file with Excel Online.


    Then I change the file name field to “import.xlsx”, run the flow with the same file as an attachment, the flow runs succeed, I can still check the Excel file with Excel Online.

    3.PNG

     

    Please try again with it on your side. If you are still having the issue, please feel free share a screenshot for the flow.

     

    Best regards,
    Mabel Mao

  • rogerabm Profile Picture
    2 on at

    Hi Mabel, 

     

    With this flow I'm able to open the attachment in Excel Online

     

     

    But with this one it doesn't.

     

    After further testing I also noticed it doesn't open on excel offline either and the file created is just a couple of kb's.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi @rogerabm,

     

    I tried both of your approaches and it worked for me. The first screenshot below shows the Flow creating the file in the SharePoint library with the attachment's name and the second shows a custom file name I used.

    EmailAttachment-1.JPGEmailAttachment-2.JPG

  • Snoop62 Profile Picture
    8 on at

    HI @faustocapellanj 

     

    Maybe you can help me

     

    I have tried a lot to change the name of the email attachments it also works with different ways but all the time when I go to the file on SharePoint I get a mistake that the file can not be opened.

     

     

  • Snoop62 Profile Picture
    8 on at

    what i forgot to promise is that the new file name comes from the email body.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi @Snoop62

    Are you trying to create a file using the email body as the file content? 

     

  • Community Power Platform Member Profile Picture
    on at

    Hi 
    I am facing similar issue. My flow runs successfully and creates file with "custom_name.xlsx" but when i go to SharePoint and try opening the file. it says "Couldn't open the workbook" neither with excel online nor on desktop. Could you assist with this please. Your help would be much appreciated.

     

    Thanks !

    powerbee

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