cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gentsuki
New Member

'Extract archive to folder' failed - BadRequest - Status Code 400

Running out of ideas how to fix a pretty simple flow for extracting ZIP file in OneDrive for Business folder.

 

Tried various changes like different triggers, and overwrite off/on still exactly the same outcome.

 

UPDATE: I found that when copying ZIP file from FTP to OneDrive For Business, MS Flow changes the file slightly, which then breaks ZIP structure and doesn't allow extraction after this. 

 

Any recommendations, on how to copy ZIP files from FTP without affecting their structure?

 

 

Please help!

 image

15 REPLIES 15
v-yamao-msft
Community Support
Community Support

Hi @gentsuki,

 

Could you share more details on your flow? How is it created?

What’s the detailed error message?

I have made the following test to copy ZIP file from SharePoint library to OneDrive for Business, then Extract archive to folder.

It is configured likes below. Please check it for a reference and try again on your side.

1.PNG2.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

hi @v-yamao-msft 

I have a similar flow extracting a folder stored in the SharePoint library.

Strange thing is that it was working before but it's not working anymore...

Annotation 2019-10-16 142041.pngAnnotation 2019-10-16 140854.png

JenVitug
Kudo Commander
Kudo Commander

@v-yamao-msft  , please help me, i have the same error for below flow , error occurs in Extract folder STEP 😞

FLOW Unable to extract zip file to SP folder.JPG

 

Error message :   

Unable to extract contents of file '/Geo IT PH Documents/Message Report.zip'.
clientRequestId: fba1f522-f37a-41b9-a4cc-e1be66c20abf
serviceRequestId: d04a6d9f-e085-b000-12ef-23893697c3a9;d04a6d9f-d089-b000-12ef-258390175731;d04a6d9f-c08b-b000-12ef-2b440c2b19fc

 

 

I have tried the same flow for a zip file that contains an excel file (xlsm)  and it did not encounter error.

 

The Zip file that i get this error  is one that contains a  CSV file in it .  Could it be that CSV files that are ZIPPED cannot be extracted ?

 

 

Spinner
Advocate II
Advocate II

@gentsuki- similar problem here, though in my case I'm uploading to a SharePoint library. Sometimes the unzipping works, but often it fails. However, pressing "Resubmit" on the flow in Power Automate often works without any problem.

 

I saw a similar problem here: https://powerusers.microsoft.com/t5/Connecting-To-Data/Sharepoint-Extract-Folder-gives-400-BadReques...

In that problem, the zip file contained a CSV file, like @JenVitug reported. Did your zip file also contain something similar? Mine doesn't contain a CSV file, but does contain XML.

marioS
Frequent Visitor

I have the exact similar issue right now. My zip file contains CSV and XML 😉 did not really find a solution after few hours... any idea is warmly welcomed...

marioS_0-1628078653778.png

 

@JenVitug and @Spinner kindly ask you to share your solution if you could make it work ...

 

Spinner
Advocate II
Advocate II

@marioS  It's not a solution, but a couple of days ago I introduced a 5-minute Delay action directly after the trigger. Since then all the runs have gone through successfully (so far).

marioS
Frequent Visitor

@Spinner i will at least give it a try… will let you know if it worked… 

El_Diego76
New Member

Did it work or did you find another solution?

marioS
Frequent Visitor

@El_Diego76 unfortunately it did not work with the delay. Still getting the same error... Other solutions are still appreciated

27Merlins
New Member

I am having this same issue, and I have also not been able to find a solution. Does anyone have any update on this?

Vladdsm
New Member

one possible idea is to try to re-create the same flow from the beginning. I would assume that those art problems happen when microsoft would create new [versions] actions and silently stop supporting the old ones

27Merlins
New Member

I have managed to narrow down the issue, but I have not found a full solution to my overall issue.
My automation was designed to take file attachments from emails (in this case a .zip file) and then extract it to a specified folder.

I decided to test the 'Extract archive to folder' step separately using a simple "test.zip" file that I had placed in the source folder and it worked as expected. I then noticed (which I wish I had checked earlier), that the copy of the .zip file which was being created by the flow (from the email attachment) was becoming corrupt for some reason.

When I attempt to open it manually, I am getting the following error;

 

"Windows cannot open the folder.  The Compressed (zipped) Folder 'C:\xxx xxxx xxx\xxxxx\xxxx\xxxx\test.zip' is invalid."

 

A similar issue identified by the following, but it did not end up getting a resolution.

 

Solved: Cannot Write Zip File to Local Drive from E-Mail A... - Power Platform Community (microsoft....

 

 

 

 

 

 

@27Merlins, I had a similar problem and tried to follow the steps from another post, just replacing One drive actions with Sharepoint actions and for me it worked.


https://powerusers.microsoft.com/t5/Building-Flows/Microsoft-Flow-Extract-zipped-email-attachment-on...

Trys
New Member

I am also having the same problem with .csv files.

xMetAK
Regular Visitor

Same problem:
receiving .zip from mail
Creating in one drive 
Extracting in one drive (error)

The file is ok, one drive can open the zip. But extract action fails.

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (3,533)