For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document To Zip

Bundle several documents into one archive.

Document To Zip combines one or more documents into a single ZIP archive, so downstream steps — and the people at the end of them — deal with one file instead of many.

How it works

  1. Input resolution — uses $input (the previous skill's output) and $secret (vault secrets).

  2. 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 a temp file if the bundle exceeds 50 MB.

    • Uploads the archive to the selected outputStorage target.

    • Emits a new zipDocumentId.

  3. Execution — hybrid. Small bundles run blocking; large bundles switch to async automatically. There is no threshold control in the configuration.

  4. Response:

    • Success — metadata for the new ZIP.

    • FailurestatusCode >= 400 with a reason naming the first failing document.

Document To Zip processing flow

Worked example: packaging a loan application for an underwriter

A workflow collects everything a loan application needs — the form, the credit report, income statements, ID proofs. Once the agent has extracted the key data and run its initial checks, all of it has to reach a human underwriter.

The problem. Sending a dozen separate files is cumbersome and error-prone. Underwriters want one consolidated package, not an inbox to reassemble.

The approach. Finish the workflow with a Document To Zip skill. Pass the documentId values accumulated along the way, set outputStorage to persistent storage, and give zipFileName something a person can recognize — the application reference rather than bundle-1718553600.zip.

The zipDocumentId it returns behaves like any other document, so the next step can attach it to an email or hand it to an API.

Listing the documents to bundle
Setting the output storage and archive filename

Configuration reference

Field
Type
Required
Description

documents

array<object>

Input documents. Each item: { documentId, source, storageId? }.

outputStorage

'conversation' | 'storage'

Where to save the ZIP.

storagePath

string

when outputStorage='storage'

Destination path.

zipFileName

string

Custom filename; defaults to bundle-<timestamp>.zip.

Output

Field
Type
Always
Description

zipDocumentId

string

Identifier of the generated archive.

storageType

string

conversation or storage.

storagePath

string

Present when storageType='storage'.

mimeType

string

Always application/zip.

statusCode

number

HTTP-like — 200 success, 400/500 error.

Errors

Error
Status
Notes

Missing document

404

reason names the first missing ID.

Source unavailable

503

Storage service offline or timed out.

Bundle too large

413

Maximum combined size exceeded — a hard cap.

Invalid configuration

400

Schema validation failed.

Internal processing error

500

Unexpected exception while zipping.

Testing in isolation

  • Path/skill-runtime/workflows/nodes/DocumentToZip/execute

  • MethodPOST

  • Body:


To add this skill to an agent, see Adding a Skill to the Agent.

Last updated