Open Navigation

Zip Helper

A collection of helpers to zip and unzip files
On This Page

Overview

The zip connector allows you to zip up files as well as unzipping a .zip file.

Example 1: Unzipping a .zip folder

To unzip a .zip folder, the first thing that needs to be done is getting the helper itself. Simply search 'zip' in the search bar or find it under the helper section in the connector listings.

search-zip

Once found, add it to the workflow and select the operation unzip. As can be seen in the image, it requires a URL. This URL refers to the location of the zip file.

unzipped-empty

In the case of this example, a .zip file has been downloaded using the Google Drive connector. Using the connector snake and JSONPaths, the URL of the .zip file can be extracted from the download result of the Google Drive Download file operation.

snake-dragger

select_url

The URL is now populated with the URL of the downloaded file.

unzip-url

We can now run the operation. As can be seen in the image below, the operation has been successful. It has outputted two file objects, both of them representing .png files which were originally zipped up in the folder downloaded from Google Drive.

successful-unzip

Example 2: Zipping up files

To zip up files into a folder, the first thing that needs to be done is getting the helper itself. Simply search 'zip' in the search bar or find it under the helper section in the connector listings.

search-zip

Once found, add it to the workflow and select the operation zip. As can be seen, the zip operation takes an array of file objects. Each file element requires a file and a path to store that file in the new zip.

docs use zip

In this example, the files that will be zipped up are those that have been unzipped in the previous example. To achieve this, JSONPaths will be used to populate the array of files.

snake-dragger

Here, we can see that the second file to be zipped will be placed into a folder within the zip folder called sub_directory.

docs second file to zip

Once we have selected the files to zip, we can then run the operation.

![](/docs-final-looking .png)

As can be seen below, the operation ran successfully and has output a file object. This contains a URL to the .zip file.

docs successful zip

If this was to be downloaded, and unzipped then it would look like the following.

docs zip file here

Was this article helpful?
Yes
No
On This Page