Many vendors distribute their product feeds as compressed ZIP archives. Rather than adding a manual download-and-extract step to your workflow, the Automation Engine can download, extract, and process ZIP files automatically. The extract configuration handles everything from simple single-file ZIPs to password-protected archives containing dozens of files.
How Extraction Works
The extract object is a top-level configuration (sibling to connection and file_configs, not inside a file_config). It tells the engine to:
- Download the compressed file from the remote server.
- Extract the specified file(s) from the archive.
- Pass the extracted files to file_configs for normal processing.
The extracted file names must match the name or regex in your file_configs entries in order to be processed.
Configuration Options
"extract": {
"name": "daily_feed.zip",
"files_to_extract": ["products.csv", "inventory.csv"],
"password": "{{zip_password}}"
}
| Key | Description |
|---|---|
| name | Name of the compressed file to download. Required if regex is not used. |
| regex | Regular expression to match the compressed file name. Must include delimiters (e.g., /daily_feed_\d+\.zip/). Use instead of name when the filename varies. |
| files_to_extract | Array of exact filenames to extract from the archive. Required if regex_extract is not used. |
| regex_extract | Regular expression to match filenames inside the archive. Must include delimiters. Use instead of files_to_extract when inner filenames vary. |
| password | Password for protected ZIP files. We strongly recommend using an encrypted parameter reference (e.g., {{zip_password}}) rather than a plain text password. |
Example 1: Single File from a ZIP
The simplest case -- a vendor sends one CSV inside a ZIP file:
{
"name": "Vendor Daily Import",
"vendor": "WPS",
"active": true,
"schedule": "0 5 * * *",
"type": "products",
"action": "import",
"connection": {
"type": "ftp",
"address": "ftp.wps.com",
"username": "{{ftp_user}}",
"password": "{{ftp_pass}}",
"path": "/exports/"
},
"extract": {
"name": "WPS_Daily_Inventory.zip",
"files_to_extract": ["WPS_Daily_Inventory.txt"]
},
"file_configs": [
{
"name": "WPS_Daily_Inventory.txt",
"update": "edit",
"delimiter": "\t",
"field_map": {
"guid": "PartNumber",
"stock": "QtyAvail",
"price": "DealerCost"
}
}
]
}
Notice that the name in file_configs matches the filename listed in files_to_extract. This is how the engine knows which configuration to apply to each extracted file.
Example 2: Multiple Files with Regex
When the ZIP contains multiple files with variable names, use regex to match them:
"extract": {
"name": "Turn14InventoryETA.zip",
"regex_extract": "/Turn14InventoryETA(.*)\\.csv/"
},
"file_configs": [
{
"regex": "/Turn14InventoryETA(.*)\\.csv/",
"update": "edit",
"field_map": {
"guid": "ProductId",
"stock": "QuantityOnHand"
}
}
]
The regex_extract pattern matches all CSV files inside the ZIP that start with "Turn14InventoryETA". Each matched file is processed through the same file_configs entry (which also uses a matching regex).
Example 3: Password-Protected ZIP
For password-protected archives, add the password field. Use an encrypted parameter to keep the password secure:
"extract": {
"name": "confidential_pricing.zip",
"files_to_extract": ["dealer_pricing.csv"],
"password": "{{zip_password}}"
},
"parameters": [
{
"name": "zip_password",
"value": "s3cretP@ss",
"encrypted": true,
"hidden_from_user": true
}
]
Combining Regex for Both Archive and Contents
When both the ZIP filename and the files inside it vary (common with date-stamped archives), use regex at both levels:
"extract": {
"regex": "/inventory_\\d{8}\\.zip/",
"regex_extract": "/.*\\.csv/"
},
"file_configs": [
{
"regex": "/.*\\.csv/",
"update": "edit",
"field_map": {
"guid": "SKU",
"stock": "Available"
}
}
]
This matches any ZIP file named like inventory_20260330.zip, extracts all CSV files inside it, and processes them all with the same field mapping.
Limiting Extracted Files
If a ZIP contains many files but you only want to process a few, you can combine regex_extract in the extract config with specific name entries in file_configs:
"extract": {
"name": "full_catalog.zip",
"regex_extract": "/.+/"
},
"file_configs": [
{
"name": "products.csv",
"create": "start",
"update": "edit",
"field_map": { "guid": "SKU", "title": "Name", "price": "Price" }
},
{
"name": "inventory.csv",
"update": "edit",
"field_map": { "guid": "SKU", "stock": "Qty" }
}
]
Even though regex_extract extracts all files, only products.csv and inventory.csv will be processed because those are the only filenames that match file_configs entries. Other extracted files are ignored.
Compressing Export Files
While extract handles decompressing ZIP files on import, you can also compress export files. Set "compress": true inside a file_configs entry to ZIP the exported file before delivering it to the remote server:
"file_configs": [
{
"name": "products-export-{{DATE}}.csv",
"compress": true,
"field_map": {
"guid": "guid",
"title": "title",
"price": "price"
}
}
]
The file will be delivered as products-export-2026-03-30.csv.zip. This works with all connector types except Email, which handles compression internally.