Actions25
Overview
This node integrates with the Tiny ERP API v3 to manage various business resources, including products, customers, orders, invoices, stock, contacts, and accounts. Specifically, the Update Stock operation under the Stock resource allows users to update the stock quantity of a specific product in their inventory.
Common scenarios for this node include automating inventory management workflows, synchronizing stock levels between sales platforms and ERP, or adjusting stock quantities after physical stock counts or returns.
For example, after receiving new shipments, a user can automatically update the stock quantity of products in Tiny ERP using this node, ensuring accurate inventory tracking without manual entry.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product whose stock quantity you want to update. |
| Stock Quantity | The new stock quantity to set for the specified product. |
Output
The node outputs JSON data representing the response from the Tiny ERP API after updating the stock. This typically includes confirmation details about the updated stock quantity and the product affected.
No binary data output is produced by this operation.
Dependencies
- Requires an API authentication token configured via OAuth2 credentials to access the Tiny ERP API.
- The node makes HTTP requests to
https://erp.tiny.com.br/public-api/v3. - Proper configuration of the OAuth2 credential within n8n is necessary for successful API communication.
Troubleshooting
- API Request Failures: Errors like "Tiny ERP API request failed" indicate issues with network connectivity, invalid credentials, or incorrect API endpoint usage. Verify that the OAuth2 credentials are correctly set up and have sufficient permissions.
- Invalid Product ID: If the provided Product ID does not exist, the API may return an error. Ensure the Product ID is correct and corresponds to an existing product in Tiny ERP.
- Incorrect Stock Quantity: Providing a negative or non-numeric stock quantity might cause errors. Always provide a valid non-negative number.
- Unknown Operation Error: If the operation parameter is misconfigured or unsupported, the node will throw an "Unknown operation" error. Confirm that the operation is set to "Update Stock" when working with the Stock resource.
Links and References
- Tiny ERP API Documentation (official API docs for further details on endpoints and data formats)
- n8n OAuth2 Credential Setup (guide on configuring OAuth2 credentials in n8n)