I have a flow that is triggered by the creation of a file in One Drive for Business. The flow itself functions as expected, but the majority of the time when I upload a file to One Drive, the Flow runs two times. The flow is reading a file, inserting data to a database, running a stored procedure, and then sending an email. Running more than once is problematic as a result.
Narrowed this down to the Excel Get Rows step. If I use the File Identifer as the file name instead of selecting a specific file, it is causing a second flow to be spawned. Perhaps getting the file causes a temporary file to be created and it thus triggers the flow again?
I have found multiple references that say to use the file identifer so that you don't have to worry about what the file is called. Seems like this is a bug.
Any thoughts on how to overcome this?
Also determined that if I abandon the "created file" trigger and go with an update and hard code the file name for get rows that this ALSO fires the flow a second time. Only when I trigger based on file create and hard code the file name to be used in get rows does it properly run just one flow.
I ended up doing a work around here where I added a step to copy the created file to a consistently named file. I then reference that consistently named file in the get rows file reference. It then runs only one time. So, I got my flow to work, but this is still a bug in my mind.
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
15 | |
10 | |
3 | |
3 | |
3 |