@beltar/n8n-nodes-extract-archive
v1.0.1
Published
n8n node to extract ZIP and RAR archive files. Supports binary data or file path input.
Downloads
131
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)
FROM n8nio/n8n:latest
USER root
# For ZIP support
RUN apk add --no-cache unzip
# For RAR support (option 1: p7zip)
RUN apk add --no-cache p7zip
# For RAR support (option 2: unrar from EDM115)
RUN apk add --no-cache curl jq libstdc++ libgcc && \
curl -LsSf https://api.github.com/repos/EDM115/unrar-alpine/releases/latest \
| jq -r '.assets[] | select(.name == "unrar") | .id' \
| xargs -I {} curl -LsSf https://api.github.com/repos/EDM115/unrar-alpine/releases/assets/{} \
| jq -r '.browser_download_url' \
| xargs -I {} curl -Lsf {} -o /tmp/unrar && \
install -v -m755 /tmp/unrar /usr/local/bin && \
rm /tmp/unrar
USER nodeComplete Docker example with this node
FROM n8nio/n8n:latest
USER root
RUN apk add --no-cache unzip p7zip poppler-utils
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-extract-archive @beltar/n8n-nodes-pdf-to-image
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.
