Actions13
Overview
This node integrates with the Polar.sh API to manage products, including updating product details. Specifically, the Product - Update operation allows users to modify existing product information such as the product's name, description, and whether it is a recurring subscription.
Typical use cases include:
- Updating product metadata after changes in pricing or features.
- Changing product descriptions to reflect new marketing content.
- Switching a product between one-time purchase and subscription models.
For example, an e-commerce platform could use this node to update a product’s description and mark it as a subscription-based product when launching a new recurring service.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product to update. |
| Update Fields | Collection of fields to update on the product: |
| - Name: The new name of the product. | |
| - Description: A detailed description of the product. | |
| - Is Recurring: Boolean flag indicating if the product is a subscription (true/false). |
Output
The node outputs JSON data representing the updated product object returned by the Polar.sh API. This includes all product attributes after the update, such as the updated name, description, recurring status, and any other product details managed by the API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating requests to the Polar.sh API.
- The node uses the Polar.sh base URL, which switches between sandbox and production environments based on the configured environment credential.
- No additional external dependencies are required beyond the Polar.sh API access.
Troubleshooting
Common Issues:
- Invalid or missing Product ID will cause the API request to fail.
- Providing invalid field values (e.g., incorrect data types) in the update fields may result in errors.
- Network or authentication issues can prevent successful API calls.
Error Messages:
- Errors from the Polar.sh API typically include a message and optional description. For example, "Product not found" indicates an invalid Product ID.
- Authentication errors suggest checking the API key credential configuration.
Resolution Tips:
- Verify that the Product ID exists and is correctly entered.
- Ensure all update fields conform to expected types and constraints.
- Confirm API credentials and environment settings are correct.
- Use the node’s "Continue On Fail" option to handle errors gracefully during batch operations.
Links and References
- Polar.sh API Documentation (for detailed API endpoints and payload structures)
- n8n Documentation on Creating Custom Nodes