AppStore Finance icon

AppStore Finance

Download Apple App Store financial reports

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 outside n8n.

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 subsequent workflow steps.

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 the report. Use "ZZ" or "Z1" to request all regions combined.
Options Additional options:
- Put Result in Field: The name of the output field where the report data will be stored (default is "report").

Output

The node outputs an array of items, each corresponding to an input item processed.

  • If the operation is Download only, the output contains a binary field with the raw TSV report file named like report_YYYY-MM.tsv.
  • If the operation is Download & Parse, the output JSON contains parsed report data under a field named by the "Put Result in Field" option (default "report"), with these possible structures depending on the report type:

For Financial Detail Report (FINANCE_DETAIL):

  • <result_field>_meta: An object containing metadata key-value pairs extracted from the report header.
  • <result_field>_detailed: An array of objects representing detailed transaction rows.
  • <result_field>_aggregated: An array of aggregated summary objects with fields like country, currency, quantity, and extended partner share.

For Financial Report (FINANCIAL):

  • <result_field>_detailed: An array of objects representing detailed report rows.
  • <result_field>_aggregated: An array of aggregated summary objects similar to above.

The parsed data is derived from tab-separated values in the downloaded report, split and mapped into JSON objects.

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 create a JWT token for API authentication.
  • Uses Node.js built-in modules for URL handling and zlib for decompressing gzip responses.

Troubleshooting

  • API Authentication Errors: If the node fails with authorization errors, verify that the provided API credentials (issuer ID, private key, key ID) are correct and have sufficient permissions.
  • Invalid Report Date or Parameters: Ensure the report date is in "YYYY-MM" format and that the vendor number and region code are valid.
  • Empty or Malformed Reports: If parsing fails or returns empty data, confirm that the requested report exists for the given parameters and that the report type matches available data.
  • Network Issues: Connectivity problems or API rate limits may cause request failures; check network access and retry policies.

Links and References

Discussion