
Announcements
I'm fairly new to Power Automate and stuck with a specific flow.
When I add a zip file to a location on SharePoint, I want to extract its contents and delete the zip file. Luckily, there is a template for this that works. Unfortunately, the content of the zip file that I receive on a daily basis has an export date in the filename.
I want to connect reports to this file with Power Query, but the file changes every day because of the date in the filename.
What I want is for Power Automate to give a custom name instead of the filename in the zip file. Then, I can connect to the same file every day.
Is that possible?
I solved it. In case someone is looking for the same fix, here is my workaround.
I created a new flow and used the template "Move files from one SharePoint folder to another".
For the "When a new file is created" action, I used the folder ID where the unpacked zip file is stored, as mentioned in my previous post.
The following action is "Create File". Here, I specify the desired location and filename with extension (for example, "name.csv").
The final action is another "Delete file". This deletes the file from the source folder from the first step, to ensure that there is only one file in this folder.
Run this script. Then edit it and insert "Delete file" between "When a file is created" and "Create file". Reason is that you have to delete the file you created with the step "create file". The action "create file" can't overwrite and generates an error. This is why you have to delete this file in order to update it with the new file.