Sharing files with others and sending them to other applications can be an important part of your business. To optimize these processes and save storage space, it's good practice to compress files. Instead of sending 10 separate files, sending 1 compiled file is faster and reduces filesize.

After reading this article you will know:

  • How to zip files with the zip event
  • How to unzip files with the zip event

Zip event

A zipped file is a compressed version of a file. Only File properties and Multi file properties can be zipped. You can pick the Zip event when building your action. This will allow you to zip and unzip files in your application.

Zipping files

You can zip files from (multi)file properties. The created zip will be available in the action as variable and can be saved later using a create or update event. You'll have to select the operation to zip, select the (multi)file property in which the files are which you want to zip. Then set As to be the name of the zip variable which you can later use in the action.

  1. Create an action event by clicking on the plus icon in the action.
  2. A form opens. The Kind should be set to Zip.
  3. Choose which operation you want to use, in our case this will be Zip.
  4. An object that contains a (Multi) File property should be selected, this can be done by clicking on the Click to set button. By clicking on this button the Variables browser will pop up. In this browser you can choose the object which contains the File(s) you want to have zipped.
  5. Choose the (Multi) File property from the previously chosen object, if there is only one (Multi) File property within the object it will automatically be selected.
  6. Set a name for the variable in which the zipped file is made available for the rest of the action. Note that this is not how the zipped file will be saved in your database.
  7. When you're done with setting up the Zip event you can click on the Save button to save it.

The zipped file will be made available through a variable, you'll still need to use it at least one other event to process it. For example, assign it to a file property, or include it in an email!

Unzipping files

You can unzip a file from a file property to a (multi)file property. You'll have to set the operation to Unzip. Select where the files will be stored to (object and file property), and where the zipped file can be found. If you unzip multiple files into a single file property only the last file in the zip will be saved.

  1. Create an action event by clicking on the plus icon in the action.
  2. A form opens. The Kind should be set to Zip.
  3. Choose which operation you want to use, in our case this will be Unzip.
  4. An object that contains a File property should be selected, this can be done by clicking on the Click to set button. By clicking on this button the Variables browser will pop up, in this browser you can choose the object which contains the file you want to have unzipped.
  5. Choose the (Multi) File property in which you want to save your unzipped files.
  6. Select the File property that contains the zipped files, this can be done by clicking on the Click to set button. By clicking on this button the Variables browser will pop up, in this browser you can choose the object which contains the file(s) you want to have unzipped.
  7. When you're done with setting up the Zip event you can click on the Save button to save it.

Did this answer your question?