Actions14
Overview
This node integrates with the Tiny ERP system to manage product data, specifically allowing you to update a product variation. It is useful in scenarios where you need to programmatically modify details of a specific variation of a product, such as updating its price, stock quantity, SKU, or GTIN. For example, if your inventory or pricing changes frequently, this node can automate those updates directly in Tiny ERP without manual entry.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product to which the variation belongs. |
| Variation ID | The unique identifier of the product variation that you want to update. |
| Variation Data | A collection of fields to update on the variation: |
| - GTIN: Global Trade Item Number for the variation. | |
| - Initial Stock: The starting stock quantity for the variation. | |
| - Price: The selling price of the variation (supports two decimal places). | |
| - Promotional Price: Discounted price for promotions (supports two decimal places). | |
| - SKU: Stock Keeping Unit identifier for the variation. |
Output
The output JSON object confirms the success of the update operation and echoes back the identifiers involved:
{
"success": true,
"productId": <number>,
"variationId": <number>
}
success: Boolean indicating whether the update was successful.productId: The ID of the product whose variation was updated.variationId: The ID of the updated variation.
No binary data is produced by this operation.
Dependencies
- Requires an API authentication credential configured in n8n to connect securely to the Tiny ERP API.
- Relies on the external Tiny ERP REST API endpoints for products and variations.
- The node uses HTTP methods PUT to update variation data at the endpoint
/produtos/{productId}/variacoes/{variationId}.
Troubleshooting
Common Issues:
- Invalid or missing Product ID or Variation ID will cause the API request to fail.
- Providing invalid field values (e.g., negative prices or stock) may result in errors from the API.
- Network connectivity issues or incorrect API credentials will prevent successful communication.
Error Messages:
"The operation \"updateVariation\" is not supported!"— This indicates the operation parameter is incorrect or unsupported; ensure you select "Update Variation"."The resource \"product\" is not supported!"— Indicates the resource parameter is incorrect; it must be set to "Product".- API errors returned from Tiny ERP will be passed through; check the error message for details like invalid IDs or permission issues.
Resolution Tips:
- Verify that the Product ID and Variation ID exist in Tiny ERP before attempting an update.
- Double-check the API credentials and network access.
- Validate input data types and required fields before execution.
Links and References
- Tiny ERP API Documentation (Note: link is illustrative; please refer to actual Tiny ERP API docs)
- n8n Documentation on Creating Custom Nodes
- General REST API usage best practices