I'm trying to automate a process at the university I work at but have run into an issue. I currently have attachments going to a OneDrive folder upon being sent to a apecific email. Then, once the attatchment is in the folder, it triggers an approval that, once approved, the file will be moved to another folder. However, I need the content of the file to be updated, while having the same name, before it is moved to the next folder.
In other words, the file is added to the first folder and the approval is triggered. Then, while the flow is waiting on the file to be approved I'll change the file, combining two PDF's but keeping the same name. I will then approve the file and it is sent to the next folder with the new content.
Any attempts I've made to create this type of flow ends up moving the old file into the new folder. I figured this had somthing to do with the flow holding on to the content through the entirety of the iteration so I tried forcing the file to update with the other flow connectors but still no sucess.
I'm going to try breaking this up into multiple Flows and see if that helps at all but I'd rather keep it in one flow.
If anyone happends to have any ideas or have dealt with something like this before I'd really appreciate the assistance.
Could you please share a screenshot of your flow's configuration?
Could you please show more details about the error message?
Further, how do you change the original file on your side? Do you create a new file with same file same as original file within your OneDrive folder? Could you share more details about the following statement?
Then, while the flow is waiting on the file to be approved I'll change the file, combining two PDF's but keeping the same name.
I have made a test on my side (the Excel file is added to my first folder and the approval is triggered) and the flow works well. My flow's configuration as below:
The flow works successfully as below:
If you create a new file with same file name as original file within your OneDrive folder and then want to move it to another folder, I think it could not be achieved within your flow.
Actually, the "Move or rename a file" action use a unique file identifier (Id dynamic content) to find the original file, if you create a new file with same file name within your OneDrive folder, the unique file identifier would be changed.
So, I should have mentioned in my initial post that I've only recently started working with flows but thanks to the few programming classes I've taken in the past I can understand how they work from a logical perspective but I'm by no means an expert at it. Regardless of that, I would share one of my flows but at this point they are unorganized messes of experementation that likely shouldn't see the light of day.
So simply put, I can make and have made the flow you posted but I need an addition/tweek to that. Inbetween where the file is created and the approval is started I'm trying to figure out how to update that file with new informaton. I'm not really even sure if what I'm trying to do is possible in flow, or at least not without outright programming within the flow.