Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP API to manage product stock and variations. Specifically, for the Product Stock resource and the Create Variation operation, it allows users to create a new variation of an existing product by specifying details such as SKU, GTIN, pricing, promotional pricing, and initial stock quantity.
Typical use cases include:
- Adding new variations (e.g., different sizes or colors) to an existing product in your inventory system.
- Managing detailed product catalogs where each variation has distinct pricing or stock levels.
- Automating product variation creation workflows within larger automation pipelines.
For example, you might use this node to add a "Red, Large" variation to a T-shirt product, setting its unique SKU, price, and initial stock count.
Properties
| Name | Meaning |
|---|---|
| Product ID | The numeric ID of the product to which the variation will be added. |
| Variation Data | A collection of fields describing the variation: - SKU: Variation SKU string. - GTIN: Variation GTIN barcode. - Price: Numeric price of the variation. - Promotional Price: Numeric promotional price. - Initial Stock: Initial stock quantity for the variation. |
Note: The provided input properties JSON only includes productId explicitly, but the node also expects variationData when creating a variation, containing the above fields.
Output
The node outputs the response from the Tiny ERP API after creating the variation. The output JSON typically contains the newly created variation's details, including identifiers and any other data returned by the API.
The output structure is:
{
"json": {
// API response object representing the created variation
},
"pairedItem": {
"item": <index_of_input_item>
}
}
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to the Tiny ERP API.
- Requires an OAuth2 API credential configured in n8n for authentication.
- The node uses the internal helper function to make HTTP requests to the Tiny ERP endpoints.
Troubleshooting
Error: "The operation 'createVariation' is not supported!"
This error indicates that the operation parameter was not set correctly or the resource-operation combination is invalid. Ensure the resource is set to "Product Stock" or "Product" and the operation to "Create Variation".API Authentication Errors
If the node fails due to authentication issues, verify that the OAuth2 credentials are correctly configured and have valid access tokens.Missing Required Fields
TheproductIdand at least some fields invariationData(like SKU or price) must be provided. Omitting required fields may cause API errors.Invalid Data Types
Ensure numeric fields likeproductId,price, andinitial stockare numbers, not strings.
Links and References
- Tiny ERP API Documentation (official API docs, for reference on product variations)
- n8n OAuth2 Credential Setup (for configuring API authentication)
If you need further details about other operations or resources, feel free to ask!