> For the complete documentation index, see [llms.txt](https://docs.appfarm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appfarm.io/library/action-nodes/create-file-archive.md).

# Create file archive

The Create File Archive action node generates a ZIP file containing files from a selection of one or more data sources.

{% hint style="info" %}
Showroom: [Create file archive example](https://showroom.appfarm.app/action-nodes/create-file-archive), with its setup in Appfarm Create ([register](https://showroom.appfarm.app/sign-up) for access).
{% endhint %}

{% hint style="info" %}
**Availability**

Create File Archive is available on all plans. How much you can use it depends on your plan; see [Subscription and billing](https://docs.appfarm.io/solution-administration/subscription-and-billing.md).
{% endhint %}

Key capabilities of Create File Archive include:

* Ability to archive files from multiple database connected data sources
* Customizable file names and folder structures within the archive
* Option to automatically download the archive or store it in a specified data source

Create File Archive is available in Apps, Services and Flows. In Services and Flows, the archive is always stored in a data source.

## Usage

* This action node is particularly useful for bundling related files together. Common applications include creating project archives, compiling product documentation packages, and any scenario where multiple files need to be distributed as a single unit.
* How many files a solution can archive each month depends on its plan; see [Subscription and billing](https://docs.appfarm.io/solution-administration/subscription-and-billing.md#features-by-tier). Increased quotas for high-volume usage can be purchased.
* Archive files stored as file objects count towards a solution’s [file storage](https://policies.appfarm.io/glossary/product-glossary#file-storage) allocation.

## Properties

| Property                         | Description                                                                                                                                                                                                                                                                               | Type                                                                           |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **Disabled**                     | When checked, the action node will not execute.                                                                                                                                                                                                                                           | Checkbox                                                                       |
| **Archive content**              | A list of file data sources to include in the archive.                                                                                                                                                                                                                                    | List of data sources                                                           |
| **File Data > Data source**      | The database-connected data source containing the files to be archived.                                                                                                                                                                                                                   | Data source selector                                                           |
| **File Data > Selection**        | Which objects in the data source to include. Shown for many-cardinality data sources. Data sources from a data connector only offer All objects and Filtered selection. Defaults to All objects.                                                                                          | Dropdown                                                                       |
| **File Data > Filter**           | The filter to apply when **Selection** is Filtered selection. If no filter is set, no objects are read.                                                                                                                                                                                   | Filter                                                                         |
| **File Data > File name**        | The name to give each file within the archive. Defaults to [Original File Name](https://docs.appfarm.io/reference/data-model/object-class-properties.md#built-in-properties-for-file-object-classes). Required when the data source is not based on a file object class.                  | Text. Can be dynamically set.                                                  |
| **File Data > File content URL** | The URL of the file content. Shown and required when the data source is not based on a file object class.                                                                                                                                                                                 | Text. Can be dynamically set.                                                  |
| **File Data > Path**             | The folder path for the file within the archive structure. For root level, leave blank.                                                                                                                                                                                                   | Text. Can be dynamically set.                                                  |
| **Output > File name**           | The name of the output ZIP file. A file extension (.zip) is not required. Defaults to *filename.zip*.                                                                                                                                                                                     | Text. Can be dynamically set.                                                  |
| **Output > File target**         | Determines whether the archive should be automatically downloaded or stored in a data source. Only shown in Apps; in Services and Flows the archive is always stored in a data source.                                                                                                    | <p>Dropdown</p><ul><li>Download</li><li>Put in Data Source (default)</li></ul> |
| **Output > Data source**         | The data source to store the archive in, if this option was selected.                                                                                                                                                                                                                     | Data source selector                                                           |
| **Output > Replace existing**    | Shown for runtime-only data sources. Removes any existing objects in the data source before the archive is added. Selected by default for single-cardinality data sources.                                                                                                                | Checkbox                                                                       |
| **Output > Set selected**        | Shown for many-cardinality data sources. Selects the created archive in the data source.                                                                                                                                                                                                  | Checkbox                                                                       |
| **Output > Name conflicts**      | What happens when two files get the same name in the same folder of the archive. `None` (default): the action fails with an error. `Rename`: `(1)` is appended to the file name until it is unique, for example `file(1).txt`. `Ignore`: the first file is kept and the rest are skipped. | <p>Dropdown</p><ul><li>None (default)</li><li>Rename</li><li>Ignore</li></ul>  |
| **Values on create**             | Set values for object class properties on the created archive object.                                                                                                                                                                                                                     | Value mapper                                                                   |

<div align="center"><figure><img src="https://29237295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MiLU-xcHu0eLZiTxcmZ%2Fuploads%2FO3gX1TbjOTmByQGzqzIy%2Fcreate_file_archive.png?alt=media&amp;token=5c6758c8-93c7-4bed-a16f-db80ce1539db" alt="Screenshot of Create File Archive action node properties in Appfarm Create" width="338"><figcaption><p><em>Create File Archive action node properties</em></p></figcaption></figure></div>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.appfarm.io/library/action-nodes/create-file-archive.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
