Actions14
Overview
This node interacts with the Tiny ERP system to manage product data, specifically focusing on creating a new variation for an existing product. It allows users to add detailed variations such as SKU, GTIN, pricing, promotional pricing, and initial stock quantity to a product already registered in Tiny ERP.
Typical use cases include:
- Adding new product variations (e.g., different sizes or colors) to an existing product catalog.
- Managing inventory by setting initial stock levels for each variation.
- Setting specific pricing and promotional pricing for individual variations.
For example, a retailer could use this node to add a new size variant of a shirt product, specifying its SKU, barcode (GTIN), price, promotional price, and initial stock count.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product to which the variation will be added. |
| Variation Data | A collection of fields describing the variation: |
| - GTIN | The Global Trade Item Number (barcode) for the variation. |
| - Initial Stock | The starting stock quantity for this variation. |
| - Price | The selling price of the variation. |
| - Promotional Price | A discounted or promotional price for the variation. |
| - SKU | The Stock Keeping Unit identifier for the variation. |
Output
The output is a JSON object representing the newly created product variation as returned by the Tiny ERP API. This typically includes details such as the variation's ID, SKU, GTIN, prices, stock information, and any other metadata provided by the API.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": 12345,
"sku": "VAR-SKU-001",
"gtin": "0123456789012",
"precos": {
"preco": 19.99,
"precoPromocional": 17.99
},
"estoque": {
"inicial": 100
}
}
Dependencies
- Requires an active connection to the Tiny ERP API.
- Requires an API authentication credential configured in n8n (an OAuth2 or API key credential).
- The node uses internal helper functions to make HTTP requests to the Tiny ERP endpoints.
Troubleshooting
Common issues:
- Invalid or missing Product ID: Ensure the product exists in Tiny ERP before creating a variation.
- Authentication errors: Verify that the API credentials are correctly set up and have sufficient permissions.
- Validation errors from the API: Check that required fields like SKU or GTIN are correctly formatted and unique.
Error messages:
"The operation "createVariation" is not supported!"— This indicates a misconfiguration; ensure the operation is correctly selected.- API response errors usually include descriptive messages; review these to correct input data.
To handle errors gracefully, enable the "Continue On Fail" option in the node settings to process subsequent items even if one fails.
Links and References
- Tiny ERP API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes
- General info on Product Variations