Document to Zip Node
Combines one or more documents into a single ZIP archive, allowing downstream steps to treat them as a single file.
How It Works
Input Resolution: Uses $input (previous node output) and $secret (vault secrets).
Request / Processing:
Resolves each documentId in the documents list.
Fetches binary content from the declared source (conversation or storage).
Streams files into an in-memory ZIP buffer (or temp file if size > 50 MB).
Uploads the resulting archive to the selected outputStorage target.
Emits the new zipDocumentId.
Execution Model: Hybrid – small bundles run Blocking; large bundles automatically switch to Async. (No threshold control in config).
Response Handling:
Success: Returns metadata for the new ZIP.
Failure: Emits statusCode >= 400 with a reason field describing the first failing document; partial bundles are discarded.
Configuration Schema
Field
Type
Required
Description
documents
array<object>
✅
List of input docs. Each item: { documentId, source, storageId? }
outputStorage
'conversation' | 'storage'
✅
Where to save the ZIP.
storagePath
string
Cond.
Required only when outputStorage='storage'.
zipFileName
string
Optional
Custom filename; defaults to bundle-<timestamp>.zip.
Output Schema
Field
Type
Always
Description
zipDocumentId
string
✅
Identifier of the generated ZIP.
storageType
string
✅
"conversation" or "storage".
storagePath
string
No
Present when storageType='storage'.
mimeType
string
✅
Always "application/zip".
statusCode
number
✅
HTTP-like status code (200 for Blocking, 400/500 for error).
Error Handling
Error
StatusCode
Notes
Missing document
404
reason indicates first missing ID.
Source unavailable
503
Storage service offline or time-out.
Bundle too large
413
Max combined size exceeded (hard cap).
Invalid configuration
400
Schema validation failed.
Internal processing error
500
Unexpected exception while zipping.
Single-Node Test API
For testing a node in isolation (e.g., via the UI "Test" button or a dedicated API), the following endpoint is used:
Path: /skill-runtime/workflows/nodes/DocumentToZip/execute
Method: POST
Purpose: Execute one node in isolation.
Request Body :
{
"nodeType": "DOCUMENT_TO_ZIP",
"config": { /* refer to configuration schema */ },
"input": { /* becomes $input */ }
}
Security Notes
$secret may be used if external storage adapters require API keys; secrets are never logged.
Binary streams are processed in temp storage that is wiped on completion.
Only the resulting zipDocumentId is surfaced to downstream nodes; raw file paths are never exposed.

Last updated