Skip to main content

Extract Zip Files

Controlled node

Overview

The Extract Zip Files node extracts the contents of a ZIP archive from your project library, automatically creating a folder structure and importing all supported files back into the library.

When executed, the node:

  1. Creates a new subdirectory named after the ZIP file (minus the .zip extension) in the same location as the source file
  2. Extracts all contents while preserving the internal folder structure of the archive
  3. Filters out macOS system files (such as __MACOSX/ metadata and ._ files)
  4. Imports only supported file types into the library
  5. Returns a list of successfully imported files with their metadata

Supported File Types

The node will only extract and import files with the following extensions:

ExtensionType
pdfPDF Documents
docxWord Documents
txtText Files
csvCSV Tables
pngPNG Images
jpeg/jpgJPEG Images
gifGIF Images
webpWebP Images

Files with unsupported extensions or macOS system metadata files will be skipped during extraction.

Nested Directories

If the ZIP file contains nested folders, the node will automatically recreate this directory structure inside the extraction folder.

Inputs

InputTypeDescriptionDefault
RunEventTriggers the extraction process.-
FileFileSourceThe ZIP file to extract from the library. Only accepts files with application/zip MIME type.-
Prevent SearchBooleanIf true, extracted files will not be indexed for search. Set to false if you want the contents searchable in the library.true

Outputs

OutputTypeDescription
DoneEventFires when the extraction process completes, regardless of how many files were successfully imported.
OutputDataAn array of objects representing the successfully imported files. Each object contains name, mimeType, and id fields. If an error occurs, returns an object with an error property.

Runtime Behavior and Defaults

  • Controlled Node: This node requires an event trigger (the Run input) to execute. It will not run automatically when the workflow starts.
  • Directory Creation: The node always creates a new folder named after the ZIP file (e.g., archive.zip becomes a folder named archive). This folder is created in the same directory as the source ZIP file.
  • Search Indexing: By default, extracted files are excluded from the library search index (preventSearch: true). Change this to false if you need to search within the extracted contents.
  • Error Handling: If the input file is not a valid ZIP, or if the file/project cannot be found, the node will return an error object in the Output data rather than throwing a workflow error.
  • Partial Extraction: If some files in the ZIP are unsupported or fail to upload, the node will continue processing other entries and return only the successfully imported files in the output array.

Example Usage

Scenario: You have a ZIP file containing multiple PDF documents and images that you want to extract into your library for further processing.

  1. Add an Extract Zip Files node to your workflow.
  2. Connect a File Source node (or any node outputting a library file reference) to the File input.
  3. Trigger the Run event (e.g., from a Start node or a button event).
  4. The node will create a new folder and populate it with the extracted contents.
  5. Connect the Output to a For Each node to process each extracted file individually, or connect to Read PDF/Read Image nodes to immediately parse the contents.
// Example Output data structure:
[
{
"name": "document1.pdf",
"mimeType": "application/pdf",
"id": "doc_12345"
},
{
"name": "image1.png",
"mimeType": "image/png",
"id": "doc_12346"
}
]