I will start by describing my flow a bit.
In my flow I've got 2 document libraries. When a document is created in the first document library I want to copy the document to a second library and I'm doing this by using the Create file action. So my flow looks something like this:
But then I noticed in my flow history that every now and then I would get a create file going into retry mode as it was marked with the amber tick.
This was happening as users were making multiple updates to the same document very quickly after eachother. One of my flow instances would actually trigger and the second flow would go into this retry state.
So then I decided to add a 'does file exist' check. Unfortunately this action doesn't exist. But there is a great workaround available.
Before I run the create file action, In now added a get file content using path action followed by a scope that includes all the actions that I want to run after I create a new file.
To make this all work I set the scope's run after settings to
And now my check if file exist in my flow is complete.