cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Michal
Level: Powered On

processing many attachments in the same time cause overwrites of files in SharePoint Online

Hi,

We use a flow based on "When a new email arrives in a shared mailbox (Preview)" and saving the attachment file with the time stamp merged in the file name in the SharePoint Online. Pretty standard and common solution.

However, we run out into issues when the flow processes several emails at the same time and some of them contains an attachment with the same name. 

To check it out I sent out 100 emails with the same attachment to the shared mailbox and let the flow to process them. In the result, I found between 63-71 unique files (run the test several times). It did not help to add milliseconds to the time stamp format at the file name. All the time milliseconds are equal to zero so it is worthless. 

One of the solutions would be to use the MessageID in the file name but then the file cannot be downloaded and saved on premise and processed further because the total amount of characters (with the folder path) is more than 260. 

 

I was trying to turn off the option "Split On" but then I am not able to create a flow which handles with each attachment of each email. I haven't found any example of this kind of flow which deal with attachments when this option is turned off. 

 

Is there any possibility to delay the process of saving the file or is there any random function which could generate some random number sequence which could be unique and I could use it compiling the name of the file?

 

Any ideas or help highly appreciated. 

1 ACCEPTED SOLUTION

Accepted Solutions
Michal
Level: Powered On

Re: processing many attachments in the same time cause overwrites of files in SharePoint Online

I found a solution for the issue described here. 

There is a rand(x,y) function available in the flow, 

The solution is: combine the attachment name with timestamp and rand (100,999) function which works OK

View solution in original post

1 REPLY 1
Michal
Level: Powered On

Re: processing many attachments in the same time cause overwrites of files in SharePoint Online

I found a solution for the issue described here. 

There is a rand(x,y) function available in the flow, 

The solution is: combine the attachment name with timestamp and rand (100,999) function which works OK

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 341 members 6,467 guests
Please welcome our newest community members: