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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / SharePoint - When a fi...
Power Automate
Answered

SharePoint - When a file is created append duplicate file names

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there a way to use the SharePoint ‘when a file is created’ trigger to append duplicate file names?

 

I have a SharePoint document library where I save a mix of Word documents and emails. I save emails to the library via drag/drop from Outlook. I need versioning enabled on the library.  

 

If am email with the same subject already exists in the library (eg an email thread), SharePoint will create a new version of the email rather than save it as a separate item. I need versioning for Word, Excel etc but not email (at least not in this library). If I want emails as separate items, I need to manually rename the emails before dragging them to SharPoint.

 

I’ve seen people create flows to append a time stamp and/or a rand function to file names to give a unique name, thereby allowing them to save as separate items. I’d like to do something similar, but limit it to .msg or .eml files. Essentially, when an email is dropped into the library, check if the file name already exists - if so append a time stamp to the email and save as a separate item.

 

Is this possible with the ‘When a file is created’ trigger?

Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,145 on at

    @Anonymous 

     

    When a file is created trigger - triggers only when the item has already been created

     

    For your use case you would need to create a seperate repository to drop emails, which can then be renamed (timestamped) and dropped in the base library

     

    You could also setup a shared mailbox where files could be sent to and then write a Flow to move them to the base libary 

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RezaDorrani 

     

    Thank you for clarifying this so quickly!

     

    I think an option to trigger a Flow when an email is dragged to an Outlook subfolder would be extremely useful. I know it’s possible to do this via mailbox rules, but the admin overhead is often prohibitive. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard