Effortlessly Zip Multiple Files with n8n
detail.loadingPreview
Streamline your file organization by automatically zipping multiple files into a single archive. This n8n workflow empowers you to consolidate diverse file types like images, PDFs, and spreadsheets efficiently.
About This Workflow
The 'Zip Multiple Files' n8n workflow is designed to automate the process of consolidating various files into a single, organized ZIP archive. It intelligently gathers binary data from multiple input items, such as images, documents, and spreadsheets, and compresses them into a dated ZIP file. This is an ideal modular component for any workflow that requires batch file archiving, saving you manual effort and ensuring consistent file management. The workflow outputs a single ZIP file, ready for download or further processing.
Key Features
- Universal File Compression: Supports compression of diverse file types including images, PDFs, spreadsheets (xlsx, csv), and more.
- Automatic Naming: Generates unique ZIP file names with the current date and time for easy identification.
- Modular Design: Can be easily integrated as a sub-workflow, callable whenever file zipping is required.
- Binary Data Handling: Efficiently processes and manages binary file data for compression.
How To Use
- Trigger: Begin with an 'Execute Workflow Trigger' node to initiate the workflow.
- Prepare Binaries: Connect an 'Code Magic' node (or a custom code node) that iterates through your input items, collects all binary data, and assigns them to unique keys. Crucially, it needs to return a JSON object containing a comma-separated string of these binary keys (e.g.,
binary_keys: "data_0,data_1"). - Compress Files: Chain a 'Compression' node. Configure the 'operation' to 'compress'. Set the 'fileName' to a dynamic value like
=data{{$now.format('yyyy-MM-dd-tt')}}.zip. For 'binaryPropertyName', use an expression that references the keys generated in the previous step (e.g.,={{ $json.binary_keys }}). - Prepare Output: Add a 'Prepare Output' node (using the 'Set' node) to refine the output. In the assignments, set a new 'fileName' parameter to dynamically reference the generated ZIP file name from the binary data (e.g.,
={{ $binary.data.fileName.replaceAll(" ","") }}).
Apps Used
Workflow JSON
{
"id": "407cf4b2-b59c-41b1-ac4c-987162aa1b2c",
"name": "Effortlessly Zip Multiple Files with n8n",
"nodes": 29,
"category": "Operations",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: 407cf4b2-b59c...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
Universal CSV to JSON API Converter
Effortlessly transform CSV data into structured JSON with this versatile n8n workflow. Integrate it into any application as a custom API endpoint, supporting various input methods including file uploads and raw text.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
On-Demand Microsoft SQL Query Execution
This workflow allows you to manually trigger and execute any SQL query against your Microsoft SQL Server database. Perfect for ad-hoc data lookups, administrative tasks, or quick tests, giving you direct control over your database operations.