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?