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

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

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 116 members 4,181 guests
Please welcome our newest community members: