Actions13
Overview
This node integrates with the Polar.sh API to manage products within an e-commerce or subscription platform. Specifically, the Product - Get operation retrieves detailed information about a single product by its unique identifier.
Typical use cases include:
- Fetching product details to display or process in workflows.
- Synchronizing product data between Polar.sh and other systems.
- Using product metadata or pricing information for further automation steps.
For example, you might use this node to get a product's name, description, prices, and metadata before creating a checkout session or updating inventory records.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product to retrieve. This is required and must be provided as a string. |
Output
The node outputs a JSON object representing the full product data returned by the Polar.sh API. This includes fields such as:
id: The product's unique identifier.name: The product's name.description: A textual description of the product.prices: An array of price objects, each containing details like amount, currency, type (e.g., fixed or custom), and recurring interval if applicable.metadata: Custom key-value pairs associated with the product.- Other product-specific attributes as defined by the Polar.sh API.
If multiple products were returned (not applicable here since this is a single get operation), the output would be an array of such objects. No binary data is output by this node.
Dependencies
- Requires an API key credential for authenticating requests to the Polar.sh API.
- The base URL for API requests depends on the environment setting in credentials: either the sandbox or production endpoint.
- Uses internal helper functions to make HTTP requests to the Polar.sh REST API.
Troubleshooting
Common issues:
- Providing an invalid or non-existent Product ID will likely result in an error from the API indicating the product was not found.
- Missing or incorrect API credentials will cause authentication failures.
- Network connectivity problems can prevent successful API calls.
Error messages:
- Errors thrown by the node include the message from the Polar.sh API response.
- If the node is set to continue on fail, errors are returned in the output JSON under an
errorfield with additional details if available.
Resolutions:
- Verify that the Product ID is correct and exists in your Polar.sh account.
- Ensure the API key credential is properly configured and has necessary permissions.
- Check network access and proxy settings if applicable.
Links and References
- Polar.sh API Documentation (for detailed API endpoints and data structures)
- n8n documentation on creating custom nodes