> Markdown versions of all pages of this connector library are available by appending `.md` to the page URL. For the full index of connectors, see [llms.txt](https://connectors.appmixer.com/llms.txt).

# appmixer.utils.converters.Archive

- Component: `appmixer.utils.converters.Archive`
- Kind: Action
- Version: 1.0.0
- Visibility: Public
- Connector: [appmixer.utils.converters 2.0.1](https://connectors.appmixer.com/connector/appmixer.utils.converters/2.0.1.md)
- Component page: <https://connectors.appmixer.com/connector/appmixer.utils.converters/2.0.1/component/appmixer.utils.converters.Archive>

Create a ZIP or TAR archive from a set of files.

## Input ports

### Port `in`

| Field | Type | Description |
| --- | --- | --- |
| Output Format (`outputFormat`) | select | Select the desired output file format. |
| File Name (`fileName`) | text | Provide a name of the resulting archive file including extension. |
| Archive File ID (`archiveFileID`) | filepicker | Leave blank if you want to create a new archive file. Otherwise, select an existing file in which case, 'Files' will be appended to the existing archive. Note that the existing file must be of the same type as the 'Output Format'. |
| Files (`files`) | expression | Add files to archive. |

## Output ports

### Port `out`

| Field | Type | Description |
| --- | --- | --- |
| File ID (`fileId`) | string | - |
| File Name (`fileName`) | string | - |

## Full metadata (component.json)

```json
{
  "name": "appmixer.utils.converters.Archive",
  "author": "Harsha Surisetty <harsha@client.io>",
  "description": "Create a ZIP or TAR archive from a set of files.",
  "icon": "(data URI omitted)",
  "inPorts": [
    {
      "name": "in",
      "schema": {
        "properties": {
          "outputFormat": {
            "type": "string"
          },
          "fileName": {
            "type": "string"
          },
          "files": {
            "type": "object"
          },
          "archiveFileID": {
            "type": "string"
          }
        },
        "required": [
          "outputFormat",
          "fileName"
        ]
      },
      "inspector": {
        "inputs": {
          "outputFormat": {
            "type": "select",
            "label": "Output Format",
            "tooltip": "Select the desired output file format.",
            "index": 1,
            "defaultValue": "zip",
            "options": [
              {
                "label": "ZIP",
                "value": "zip"
              },
              {
                "label": "TAR",
                "value": "tar"
              }
            ]
          },
          "fileName": {
            "type": "text",
            "label": "File Name",
            "index": 2,
            "tooltip": "Provide a name of the resulting archive file including extension."
          },
          "archiveFileID": {
            "type": "filepicker",
            "label": "Archive File ID",
            "index": 3,
            "tooltip": "Leave blank if you want to create a new archive file. Otherwise, select an existing file in which case, 'Files' will be appended to the existing archive. Note that the existing file must be of the same type as the 'Output Format'."
          },
          "files": {
            "type": "expression",
            "label": "Files",
            "levels": [
              "AND"
            ],
            "index": 4,
            "tooltip": "Add files to archive.",
            "fields": {
              "fileId": {
                "type": "filepicker",
                "label": "File ID",
                "tooltip": "File ID",
                "index": 1
              }
            }
          }
        }
      }
    }
  ],
  "outPorts": [
    {
      "name": "out",
      "options": [
        {
          "label": "File ID",
          "value": "fileId",
          "schema": {
            "type": "string",
            "example": "a1686006-35c8-4ffc-b23e-d687858cd418"
          }
        },
        {
          "label": "File Name",
          "value": "fileName",
          "schema": {
            "type": "string",
            "example": "documents.zip"
          }
        }
      ]
    }
  ]
}
```
