Tiny ERP icon

Tiny ERP

Interact with Tiny ERP API

Overview

This node integrates with the Tiny ERP system to manage product data, specifically allowing users to create a new variation for an existing product. Creating a product variation is useful when you want to add different versions of a product that may differ in attributes like price, SKU, stock, or GTIN (barcode). For example, if you sell a T-shirt available in multiple sizes or colors, each size/color can be a variation.

The "Create Variation" operation lets you specify details such as the SKU, GTIN, initial stock quantity, price, and promotional price for the new variation under a given product ID.

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 JSON contains the response from the Tiny ERP API after creating the variation. This typically includes details about the newly created variation such as its ID and the data sent back by the API confirming creation.

Example output structure (simplified):

{
  "id": 12345,
  "sku": "SKU123",
  "gtin": "0123456789012",
  "preco": 29.99,
  "precoPromocional": 24.99,
  "estoque": {
    "inicial": 100
  }
}

No binary data is produced by this operation.

Dependencies

  • Requires an active connection to the Tiny ERP API.
  • Needs an API authentication credential configured in n8n (an OAuth2 token or API key).
  • The node uses the internal helper function to make HTTP requests to Tiny ERP endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing Product ID: Ensure the product exists in Tiny ERP before adding variations.
    • Incorrect data types for variation fields (e.g., non-numeric price): Validate input values.
    • Authentication errors: Verify that the API credentials are correctly set up and have sufficient permissions.
    • Network or API downtime: Check connectivity and Tiny ERP service status.
  • Error messages:

    • "The operation "createVariation" is not supported!" — This indicates a misconfiguration; ensure the Resource is set to "Product" and Operation to "Create Variation".
    • API error responses will be passed through; check the message for details like invalid fields or permission issues.

Links and References

Discussion