Quick Overview
This workflow manually requests an Amazon Selling Partner (SP-API) report, polls until it is ready, downloads the report document, optionally decompresses it if it is GZIP, and parses the TSV contents into one n8n item per row.
How it works
- Starts when you run the workflow manually.
- Uses Login with Amazon (LWA) to exchange your refresh token, client ID, and client secret for an access token.
- Calls the Amazon SP-API Reports API to create a report for the configured report type and marketplace.
- Polls the Amazon SP-API until the report processing status is DONE (or errors if it fails or times out).
- Fetches the report document metadata and downloads the report file from the provided URL.
- If the document is GZIP-compressed, decompresses the file and then parses the TSV into structured JSON items, outputting one item per row.
Setup
- Create and authorize Amazon SP-API (Login with Amazon) credentials, then fill in the refresh_token, client_id, and client_secret values in the Config step.
- Set the correct SP-API endpoint region (EU/NA/FE), report_type, and marketplace_ids values in the Config step.
- If you want to store or route results, add downstream nodes after the parsed rows output to send the items to your database, spreadsheet, or other destination.