@beltar/n8n-nodes-extract-archive
v1.2.0
Published
n8n node to extract ZIP and RAR archive files. Supports binary data or file path input.
Downloads
492
Maintainers
Readme
n8n-nodes-extract-archive
Extract ZIP and RAR archive files in n8n.
Features
- ZIP and RAR support with auto-detection
- Binary data or file path input - use files from previous nodes or server paths
- Password-protected archives support
- File filtering - extract only specific file types
- Subdirectory handling - include or exclude nested folders
- Flexible output - single item with all files or one item per file
Requirements
This node requires extraction tools to be installed on your system.
Docker (n8n image)
The official n8n Docker image doesn't include a package manager, so we use a multi-stage build to copy the required binaries:
FROM alpine:latest AS builder
RUN apk add --no-cache \
poppler-utils \
unzip \
7zip
FROM n8nio/n8n:latest
USER root
# Copy binaries from builder
COPY --from=builder /usr/bin/pdftoppm /usr/bin/
COPY --from=builder /usr/bin/pdfinfo /usr/bin/
COPY --from=builder /usr/bin/unzip /usr/bin/
COPY --from=builder /usr/bin/7z /usr/bin/
COPY --from=builder /usr/bin/7zz /usr/bin/
# Copy required libraries for poppler
COPY --from=builder /usr/lib/libpoppler* /usr/lib/
COPY --from=builder /usr/lib/libfreetype* /usr/lib/
COPY --from=builder /usr/lib/libfontconfig* /usr/lib/
COPY --from=builder /usr/lib/libjpeg* /usr/lib/
COPY --from=builder /usr/lib/libpng16* /usr/lib/
COPY --from=builder /usr/lib/libtiff* /usr/lib/
COPY --from=builder /usr/lib/liblcms2* /usr/lib/
COPY --from=builder /usr/lib/libopenjp2* /usr/lib/
COPY --from=builder /usr/lib/libexpat* /usr/lib/
COPY --from=builder /usr/lib/libbz2* /usr/lib/
COPY --from=builder /usr/lib/libbrotli* /usr/lib/
COPY --from=builder /usr/lib/libwebp* /usr/lib/
COPY --from=builder /usr/lib/libzstd* /usr/lib/
COPY --from=builder /usr/lib/liblzma* /usr/lib/
COPY --from=builder /usr/lib/libstdc++* /usr/lib/
COPY --from=builder /usr/lib/libgcc_s* /usr/lib/
RUN mkdir -p /opt/n8n-nodes && chown node:node /opt/n8n-nodes
USER node
RUN cd /opt/n8n-nodes && \
npm init -y && \
npm install @beltar/n8n-nodes-pdf-to-image @beltar/n8n-nodes-extract-archive
ENV N8N_CUSTOM_EXTENSIONS=/opt/n8n-nodes/node_modulesDebian/Ubuntu
sudo apt-get install unzip unrarAlpine Linux
apk add unzip p7zipmacOS
brew install unzip unrarInstallation
In n8n
- Go to Settings → Community Nodes
- Enter
@beltar/n8n-nodes-extract-archive - Click Install
- Restart n8n
Manual installation
cd ~/.n8n
npm install @beltar/n8n-nodes-extract-archiveUsage
- Add the Extract Archive node to your workflow
- Connect a node that provides an archive file (binary data or file path)
- Configure the options:
- Input Mode: Binary Data or File Path
- Input Binary Field: Name of the binary property (for binary mode)
- File Path: Path to archive on server (for file path mode)
- Archive Type: Auto-detect, ZIP, or RAR
- Password: For encrypted archives (optional)
- Output Mode: Single item with all files, or one item per file
- Output Binary Field: Name for the output binary property
- Include Subdirectories: Whether to include nested files
- File Filter: Comma-separated patterns (e.g.,
*.txt, *.pdf)
Output
Single Item Mode
Returns one item with:
json.totalFiles: Number of files extractedjson.archiveType: Type of archive (zip/rar)json.files: Array of file info objectsjson.binaryProperties: Array of binary property namesbinary.file_1,binary.file_2, etc.: The extracted files
Multiple Items Mode
Returns one item per file with:
json.index: File indexjson.totalFiles: Total number of filesjson.fileName: Name of the filejson.filePath: Relative path within archivejson.fileSize: Size in bytesjson.archiveType: Type of archivebinary.file: The extracted file
Example Workflows
Extract and process each file
[HTTP Request: Download ZIP] → [Extract Archive] → [For Each File: Process]Extract specific file types
[Read Binary File] → [Extract Archive (filter: *.pdf)] → [PDF to Image]Extract from server path
[Set file path] → [Extract Archive (file path mode)] → [Upload to S3]License
MIT
Author
Beltar
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
