Overview
When configuring a courier to ingest data from a compressed archive (e.g., .zip), you may encounter a "File Not Found" error for the individual files inside the archive, even if the main archive file is correctly identified and confirmed to exist in the source directory.
This issue is common with Salesforce Marketing Cloud (SFMC) and other SFTP-based legacy couriers.
Issue Summary
The courier sensor successfully locates the parent .zip file based on the provided file pattern, but fails to "see" or extract the CSV files defined within the archive/contents block. This often happens even when the files are verified to be in the root directory of the archive.
Error Example:
The courier sensor was successful in locating the archive, but missing all internal files: ['Bounces.csv', 'Clicks.csv'...]
Root Cause: Invalid Naming Convention in Archive Contents
The Amperity courier parser for legacy archives has a specific requirement regarding quotes. While the "main" object file pattern often requires single quotes to handle date strings (e.g., '/Export/ExportEmailMetrics_'yyyy-MM-dd'.zip'), the individual filenames inside the archive must not be surrounded by single quotes.
If the internal filenames are wrapped in single quotes within the JSON configuration, the parser will fail to match them against the actual filenames inside the ZIP.
Troubleshooting Steps
Verify Archive Structure: Download the ZIP file and run
unzip -l [filename].zipto ensure the target CSVs are in the root directory and not nested within subfolders.Audit Courier JSON: Navigate to the Courier configuration and check the
archive/contentsblock.Check Workflow Logs: Use Honeycomb to inspect courier sensor spans. If
amperity.courier.sensor/missing-all-files?istruedespite the sensor finding the container, it indicates a pattern matching failure inside the archive.
Resolution
Remove the single quotes from each filename within the archive/contents section.
Incorrect Configuration:
JSON
"archive/contents": {
"'Bounces.csv'": {
"subobject/land-as": { ... }
},
"'Clicks.csv'": {
"subobject/land-as": { ... }
}
}
Correct Configuration:
JSON
"archive/contents": {
"Bounces.csv": {
"subobject/land-as": { ... }
},
"Clicks.csv": {
"subobject/land-as": { ... }
}
}
Advanced Implementation Note
If after removing quotes the files are still not visible, ensure the following keys are correctly defined within the subobject/land-as block:
file/header-rows: Usually1for standard CSVs.file/tag: A unique identifier for the internal file.file/content-type: Should betext/csv.
Feature Flag Warning: If standard naming fixes fail, there may be a specialized environment conflict. In rare cases, a feature flag for Enhanced Archive Extraction may need to be enabled by an Amperity Admin via the backend settings.