cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

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
Highlighted
Advocate II
Advocate II

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
Highlighted
Advocate II
Advocate II

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
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (10,281)