I wrote a flow to automatically take attachemnts from certain e-mails and save them to a folder in a Sharepoint document library. Every week it's supposed to upload the same 5 files. It's working fine, problem is Sharepoint is overwriting the existing files instead of just adding the new ones. I assume this is happening because the files have the same name every week. Unfortunately, I don't have a way to change that.
Any suggestions on how I can keep this flow running, but have Sharepoint add the new files alongside the existing documents rather than replacing them?
Please share your flow. As I want to overwrite the existing file each time as it has the same name.
Hi Team,
Kindly help me in understanding the procedure to make the same named file get replaced in the SharepPoint folder without cross verification.
Regards,
Thamizh S
Hi Scott,
Based on your suggestion, I referred below articles for the requirement(Flow should be like --> if email received with specific "Subject" and has attachment that should be save to SPO lib and definitely it should not replace existing file if any.)
While researching, I tried to follow several blogs but was stuck in filtering as per subject and in condition to check if file exists as demonstrated in this article:- https://powerusers.microsoft.com/t5/Building-Flows/Is-there-an-Exists-for-single-item-from-a-list-access/td-p/89440
Also I am would like to concat the attachment name with current date if the file already exists in SPO Library as suggested below https://techcommunity.microsoft.com/t5/PowerApps-Flow/Concat-quot-Todays-Date-quot-for-File-Name-Save-Attachment-Help/td-p/140425
If possible, can you please help me with steps with clear screenshots of the flow I am looking for so I can try to replicate. I am messing up in either of the steps while implementing.
Here is a suggestion:
Scott
Hi Scott,
I am using Save my email attachments to a SharePoint document library and under this i have used filter email condition. In this flow, the file gets overwritten if it has same name though I understand there are version created which is helpful. Is there anyway where we can check if the attachment has the same as available in the SharePoint Library and we can change it to current on the go?
Also, are there any rules where I can create exactly above replica in Exchange Online instead of using Flow?
Any suggestions are helpful. Please loop in exchange or SPO community if required.
Thanks @ScottShearer, your first suggestion worked! Appending the date to the end added the date/time to the file extension, however appending it to the beginning did exactly what we needed. I may still try your versioning solution as well to keep the directory as clean as possible.
Here are two suggestions:
1) Simply append the current date to the file name when creating/saving the file to SharePoint
2) Turn on versioning in the document library (it is enabled by default). I believe that you'll find that when a new file is added that has the same name as an existing file:
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional