hello
i use this flow " Save Office 365 email attachments to OneDrive for Business" to automatically download the attachments of incoming emails, but the files I download have the same name. i have saved four but have not kept saving the others
wait for answer
thanks for advance
Add seconds creates a date value, which you can't use as a filename. I was suggesting something more like this. Which will append a unique number based on today's date to the end of the filename .
concat(outputs('Get_file_metadata')?['body/NameNoExt'],formatDateTime(utcNow(),'yyyymmdd'),'.doc')
hello sir,
try putting this expression of adding seconds in the part of creating file but it doesn't work, as it should be?
thanks for advance!!
In the action where you create the file in OneDrive make sure that the filename field has a unique file name instead of just re-using the same file name. One way to do that would be to strip off the extension and then concatenate text to the end based on the date and time. Make sure you also replace the file extension after adding the extra text.
hello Pstork1
How do I make the file save a different name and prevent the file from being replaced?
thanks for advance
If you save files with the same name overtop each other then yes, they will overwrite the existing file. The same thing happens if you just upload the file to OneDrive. You can't save more than one file using the same name. Its just not possible in OneDrive. You need to add something to the filename when you create the file in the Flow to differentiate it from the one that is already there.
Hello Community
I'm running the same issue as above as I've been having some issues with one of my flows trying to save email attachments (in my case are excel files) that are named the same way.
See below the names of the files I'm currently having issues with:
CBK_ADHOC_RESUBMISSION_STATUS_RPT_GR.CSV
CBK_ADHOC_RESUBMISSION_STATUS_RPT_PF.CSV
So for instance, let's say today I received some emails with their attachments (excel files under those names) they will be saved in the folder I created in One Drive, but if I received tomorrow or another day some attachments with the same name, they will replace the ones that are in the folder, which is not the case because each excel file contains different information. My desire to fix this issue is to save all the attachments (excel files under the same name but different information)in the same One Drive folder no matter they share the same name.
Hope you can help me ASAP.
Thanks
I looked at the template. The files should retain whatever name they had as attachments. Are you saying all downloaded files have the same name? or that the names are the same as the name of the attachment? If its the later that's the way its designed to work. Can you provide more detail on exactly what your problem is?
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2