Tiny ERP icon

Tiny ERP

Interact with Tiny ERP API

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
    The productId and at least some fields in variationData (like SKU or price) must be provided. Omitting required fields may cause API errors.

  • Invalid Data Types
    Ensure numeric fields like productId, price, and initial stock are numbers, not strings.

Links and References


If you need further details about other operations or resources, feel free to ask!

Discussion