cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

SharePoint - When a File is Created triggers too soon?

I have a flow that triggers when a file is created in SharePoint. I use it to assign file-level permissions to certain groups and the file's creator. Not ideal, but SharePoint can't handle item-level on its own.

 

Anyways, often when someone uploads a file, it comes back with an error saying that the file has been edited, which prevents the upload from saving correctly. I use a service account for the flow connection, so I can see that the edit is being done by the flow. I tried adding a 10 second delay to the flow before any changes, but that didn't help. It seems like the flow is running as soon as SharePoint sees a file get created, but before the file is finished saving or SharePoint is done doing its business. Ideas?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Anonymous 

 

I wrote this blog post a while ago relating to Flow trying to move documents before they had completed the upload. You could apply the same to check if the document has been fully uploaded before changing the permissions.

 

https://blog.mattweston365.com/2019/01/ensuring-your-flow-doesnt-process-until.html

 

If you have found this post useful, please give it a thumbs up. If it has answered your question, please accept it as the solution so others can benefit.

@MattWeston365

View solution in original post

2 REPLIES 2

Hi @Anonymous 

 

I wrote this blog post a while ago relating to Flow trying to move documents before they had completed the upload. You could apply the same to check if the document has been fully uploaded before changing the permissions.

 

https://blog.mattweston365.com/2019/01/ensuring-your-flow-doesnt-process-until.html

 

If you have found this post useful, please give it a thumbs up. If it has answered your question, please accept it as the solution so others can benefit.

@MattWeston365

Anonymous
Not applicable

Thanks @MattWeston365 ! That's a great solution.

 

Of course I also forgot I had two separate flows, so my "delay 10 second" works fine when I put it in both flows. Still, your solution's way more elegant. I might suggest escalating delays using a variable, so maybe 5 sec * # of times through the loop or something.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (2,113)