I’m trying to decompress a ZIP file using the Compression node on n8n cloud. The node executes successfully and receives the ZIP file (90.1 kB), but it outputs only 1 item with empty JSON instead of extracting the 3 PDF files that are inside the ZIP. The same workflow works perfectly on my local n8n instance (I used code on my local n8n host instead of this node as it was not working there as well. The code in my local n8n node was not working for web.)
No error message - the node shows “Node executed successfully” but doesn’t extract any files.
output returned by the last node
Input: 1 item with binary data
- File Name: job_resumes_zip.zip
- Mime Type: application/x-zip-compressed
- File Size: 90.1 kB
Output: 1 item with only empty JSON [{}] Expected: 3 items, each containing an extracted PDF file in binary format
Database : Cloud managed
n8n EXECUTIONS_PROCESS : Cloud default
The ZIP file contains 3 PDF files (resumes)
Additional info:
The code I used which worked on local but not on web before turning to the compression node:
import zipfile
import io
import base64
//Get the binary data from n8n
zip_data = items[0][‘binary’][‘data’][‘data’]
//Decode base64 string to bytes
zip_bytes = base64.b64decode(zip_data)
//Extract files from zip
extracted_files =
with zipfile.ZipFile(io.BytesIO(zip_bytes)) as zip_ref:
for file_name in zip_ref.namelist():
if not file_name.endswith(‘/’): # Skip directories
file_content = zip_ref.read(file_name)
// Create clean field name (replace special chars)
clean_name = file_name.replace('/', '_').replace(' ', '_')
extracted_files.append({
'json': {
'filename': file_name,
'clean_filename': clean_name
},
'binary': {
'data': { # Always use 'data' as the field name
'data': base64.b64encode(file_content).decode('utf-8'),
'mimeType': 'application/pdf',
'fileName': file_name
}
}
})
return extracted_files



