---
version: "2026.1.0"
language: "en"
---
# Compress File

The **Compress File** block generates a ZIP archive from one or more input files during the execution of a flow. This is especially useful when you need to pass multiple files to downstream blocks (for example **Send email** or **Web File Upload**) as a single attachment.

When fully expanded, the following is an example of the **Compress File** block:

**Note:** The screenshot on this page uses the **Elegance Design**, introduced in **2025.3**. If you are using an earlier version, your layout may look different.

## Quick-start

1. Drag **Compress File** onto the canvas.
2. Add one or more files in **Files** (either by using **Add File** or by connecting file outputs from earlier blocks).
3. Run the flow when it's ready and connect **Zip File** to the next block that should use the compressed file.

## Building block parameters

Parameters  
* **Block header:** Shows the current name of the **Compress File** block. You can rename it by double-clicking the header and typing a new title to keep flows readable and organized.

* **Files:** Defines the list of files that will be compressed into a single ZIP archive.
  * Click **Add File** to select one or more files.
  * Files can also be provided dynamically from other blocks via the input connector.
    All selected files are packaged together when the block executes.

* **Zip File:** Contains the resulting ZIP archive created by the block.
  * Use the output connector to pass this ZIP file directly to other blocks, such as **Send email**, **Web File Upload**, or **Save file**, as part of a larger workflow.

* **Failed:** Triggers if compression cannot be completed. Typical reasons include:
  * No input files were provided.
  * The input files exceed the 500 MB size limit.
  * An internal error occurred during compression.
    Use this connector to branch the flow for error handling, logging, or retry logic.

## Resources

|                                                **Topic**                                                |                                                  **Description**                                                  |
|---------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [Flows FAQ](https://docs.leapwork.com/faq/latest/leapwork-flow-faq/flows-faq.md)                                                 | Common questions about creating, running, and managing flows in Leapwork.                                         |
| [Flows Troubleshooting](https://docs.leapwork.com/troubleshooting/latest/leapwork-flow-troubleshooting/flows-troubleshooting.md) | Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork. |
