Actions2
Overview
This node allows users to download financial reports from the Apple App Store Connect API. It supports downloading two types of reports: a general Financial Report and a more detailed Financial Detail Report. The node can either download the raw report file or download and parse it into structured JSON data for easier consumption in workflows.
Common scenarios include:
- Automating the retrieval of monthly financial data for app sales, subscriptions, and other revenue streams.
- Integrating Apple financial data into internal dashboards or accounting systems.
- Parsing detailed transaction-level data for deeper analysis of sales by country, currency, and quantity.
For example, a user could configure this node to download the financial report for vendor number "123456" for March 2024 across all regions ("ZZ"), then automatically parse and store the aggregated sales data in a database.
Properties
Name | Meaning |
---|---|
Report Type | Select between "Financial Report" (summary) or "Financial Detail Report" (transaction level) |
Vendor Number | The unique identifier for the vendor (your Apple developer/vendor number) |
Report Date (YYYY-MM) | The year and month of the report to download, formatted as "YYYY-MM" |
Region Code | The region code for the report; use "ZZ" or "Z1" to select all regions |
Options | Additional options: - Put Result in Field: Specify the output field name for the report |
Output
The node outputs an array of items, each corresponding to one input item processed.
If the operation is Download:
- Outputs binary data containing the raw TSV report file.
- The binary data is stored under the field name
report
(or custom name if specified).
If the operation were "Download & Parse" (not requested here but present in code):
- Outputs JSON with parsed report data.
- For the Financial Detail Report, three JSON fields are created:
<result_field>_meta
: Metadata key-value pairs from the report header.<result_field>_detailed
: Array of detailed transaction objects.<result_field>_aggregated
: Array of aggregated summary objects.
- For the Financial Report, two JSON fields:
<result_field>_detailed
: Array of detailed summary objects.<result_field>_aggregated
: Array of aggregated summary objects.
In this case, since only the Download operation is requested, the output will contain the raw report file as binary data.
Dependencies
- Requires an API authentication token credential for Apple App Store Connect API.
- Uses the Apple App Store Connect Finance Reports API endpoint.
- Requires network access to
https://api.appstoreconnect.apple.com
. - Uses JWT generation for authentication with ES256 algorithm.
- Uses Axios for HTTP requests.
- Uses Node.js built-in modules for URL handling and gzip decompression.
Troubleshooting
- API Authentication Errors: If the API key or credentials are invalid or expired, the node will throw an error when requesting the report. Ensure the API key credential is correctly configured with valid private key, issuer ID, and key ID.
- Invalid Parameters: Providing an incorrect vendor number, report date format, or region code may result in no data or API errors. Verify these inputs carefully.
- Network Issues: Connectivity problems to Apple's API endpoint will cause request failures.
- Report Not Available: If the requested report date or type does not exist yet, the API may return an error or empty response.
- Binary Data Handling: When using the Download operation, ensure downstream nodes can handle binary data properly.