Tiny ERP Auth2 icon

Tiny ERP Auth2

Interact with Tiny ERP API v3 with OAuth2

Produtos → Update

AI-generated

Overview

This node allows updating product information in the Tiny ERP system via its API v3 using OAuth2 authentication. It is designed to modify existing product records by specifying the product ID and providing updated details such as pricing, dimensions, stock control, tax information, SEO metadata, and supplier data.

Common scenarios where this node is beneficial include:

  • Automating product catalog updates from external systems or spreadsheets.
  • Synchronizing inventory and pricing changes across sales channels.
  • Managing detailed product attributes like packaging dimensions and tax classifications programmatically.
  • Updating SEO-related fields to improve product visibility on e-commerce platforms.

For example, a user can update the price and stock levels of a product after receiving new cost data or change the product description and add a promotional price for a marketing campaign.

Properties

Name Meaning
ID The unique identifier of the resource (required for update).
Product ID Numeric ID of the product to update (required).
Additional Fields Optional collection of additional product details: SKU, description, complementary description, unit of measurement, units per box, NCM code, GTIN barcode, origin code (0-8), tax substitution code, warranty, observations, brand ID, category ID.
Pricing Collection of pricing details: regular price, promotional price, and cost price.
Dimensions Collection describing product package and physical dimensions: package ID and type, width, height, length, diameter (all in cm), net weight, and gross weight (both in kg).
Tax Information Tax-related fields including package GTIN, fixed IPI tax value, and IPI tax class.
SEO SEO metadata for the product: SEO title, description, keywords (comma-separated), video link, and URL slug.
Stock Stock control settings: whether to control stock, if product is made on demand, minimum and maximum stock levels, preparation days, and stock location.
Suppliers Multiple suppliers can be added with their ID, product code at supplier, and indication if it is the default supplier.

Output

The node outputs an array of JSON objects representing the updated product data returned from the Tiny ERP API. Each item corresponds to one update operation and contains the updated product fields as confirmed by the API.

If multiple items are processed, the output will be an array of these JSON objects.

No binary data output is indicated.

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate with the Tiny ERP API v3.
  • Depends on the external Tiny ERP service being accessible and the API endpoint supporting product update operations.
  • The node uses an internal OperationFactory to handle resource-specific logic, but this is abstracted from the user.

Troubleshooting

  • Unknown resource error: If the specified resource name is invalid or not supported, the node throws an error "Unknown resource". Ensure the resource parameter is set correctly to "produtos" for product updates.
  • API authentication failures: Errors related to OAuth2 token issues may occur if credentials are misconfigured or expired. Re-authenticate or update the API key credential.
  • Validation errors: Missing required fields like Product ID or invalid data types may cause the API to reject the update. Verify all required properties are provided and correctly formatted.
  • Partial failures: If continueOnFail is enabled, failed updates return an error message in the output JSON instead of stopping execution. Review these messages to identify problematic items.
  • Network or API downtime: Connectivity issues or API unavailability will cause request failures. Check network status and Tiny ERP service health.

Links and References

Discussion