Compress Files

Description

The Compress Files action compresses a number of input files into a .zip file using the Deflate algorithm.

Usage

Input

Input to the action is provided as a JSON string representing a list of files, each with Name and Content fields representing the name and content of the file in Base64. Input is provided as JSON:

[
 {
   "Name": "file1.txt",
   "Content":"base64File1Content"
 },
 {
   "Name": "file2.xml",
   "Content":"base64File2Content}"
 }
]

Limits

The following limits apply:

Examples

An example flow using a hand coded JSON file is shown below where specific files to be compressed are first retrieved from a directory and then compressed.

Compress files example 1

An example flow is shown below using a Liquid object, where a JSON parse action is looped over an SFTP directory of files, so that all files in the directory are compressed automatically.

Compress files example execute templating

Compress files example JSON parse

Compress files example compress