Actions2
Overview
This node downloads and optionally parses financial reports from the Apple App Store Connect API. It is useful for app developers, finance teams, or analysts who need to automate retrieval of sales and financial data related to their apps on the App Store.
Common scenarios include:
- Automatically fetching monthly financial reports for accounting or reconciliation.
- Parsing detailed transaction-level data for deeper analysis.
- Downloading raw report files for archival or further processing in other systems.
For example, a user can configure the node to download the "Financial Detail Report" for a specific vendor number, region, and month, then parse it into structured JSON for use in downstream workflows.
Properties
Name | Meaning |
---|---|
Report Type | The type of financial report to retrieve. Options: "Financial Report", "Financial Detail Report". |
Vendor Number | The unique identifier for the vendor (app developer) whose reports are being requested. |
Report Date (YYYY-MM) | The year and month of the report to download, formatted as "YYYY-MM". |
Region Code | The region code for which to fetch the report. Use "ZZ" or "Z1" to request all regions. |
Options | Additional options: - Put Result in Field: The name of the output field where the report data will be stored (default: "report"). |
Output
The node outputs an array of items corresponding to each input item processed. Each output item contains:
- A
json
object with parsed report data if the operation is set to parse the report. - A
binary
field containing the raw downloaded report file if the operation is set to download only.
When parsing:
For the "Financial Detail Report", the output JSON includes three fields:
<result_field>_meta
: Metadata key-value pairs extracted from the report header.<result_field>_detailed
: An array of detailed transaction records.<result_field>_aggregated
: An array of aggregated summary records.
For the "Financial Report", the output JSON includes:
<result_field>_detailed
: An array of detailed records.<result_field>_aggregated
: An array of aggregated summary records.
When downloading only, the binary data contains the raw TSV report file named like report_<YYYY-MM>.tsv
.
Dependencies
- Requires an API key credential for authenticating with the Apple App Store Connect API.
- Uses the
axios
library for HTTP requests. - Uses
jsonwebtoken
to generate a JWT token for API authentication. - Uses Node.js built-in modules for URL handling and gzip decompression.
Troubleshooting
- API Authentication Errors: If the node fails to authenticate, verify that the API key credentials (private key, issuer ID, key ID) are correctly configured and valid.
- Invalid Report Parameters: Ensure the vendor number, report date (format YYYY-MM), report type, and region code are correct and correspond to available reports.
- Network Issues: Network connectivity problems may cause request failures; check internet access and firewall settings.
- Parsing Errors: If parsing fails, the report format might have changed or the report content is unexpected. Try downloading the raw report first to inspect its structure.
- Empty or Missing Data: Confirm that the specified report exists for the given parameters and that the vendor has financial data for that period.