Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP system to manage product stock information. Specifically, the Product Stock - Update operation allows users to update the stock quantity of a specific product in a particular deposit (warehouse or storage location). This is useful for inventory management workflows where stock levels need to be adjusted based on sales, restocking, or transfers.
Common scenarios:
- Automatically updating stock quantities after an order is fulfilled.
- Syncing stock levels between Tiny ERP and other inventory systems.
- Adjusting stock counts during stocktaking or manual corrections.
Practical example:
You have an e-commerce store connected to n8n. After a customer places an order, you use this node to decrease the stock quantity of the purchased product in the relevant warehouse deposit within Tiny ERP, ensuring your inventory stays accurate.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product whose stock you want to update. |
| Deposit ID | The unique identifier of the deposit (warehouse/storage location) where the stock is held. |
| Quantity | The new quantity of the product stock in the specified deposit. |
Output
The node outputs a JSON object representing the response from the Tiny ERP API after updating the stock. This typically includes confirmation details about the updated stock entry.
Example output structure:
{
"deposito": {
"id": 123
},
"quantidade": 50,
"tipo": "B",
"otherResponseFields": "..."
}
deposito.id: The ID of the deposit where stock was updated.quantidade: The updated quantity of the product stock.tipo: A fixed value"B"indicating the type of stock update (business logic internal to Tiny ERP).
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Tiny ERP API.
- Requires an API authentication credential configured in n8n (an OAuth2 token or API key).
- The node uses the Tiny ERP REST API endpoints to perform stock updates.
Troubleshooting
Error: "The operation 'updateStock' is not supported for resource 'produto_estoque'"
This error indicates that the selected operation does not match the resource. Ensure you select the correct resource (produto_estoque) when performing stock updates.API Authentication Errors
If the node fails due to authentication issues, verify that the API credentials are correctly set up and have sufficient permissions to update stock.Invalid Product or Deposit ID
Providing incorrect or non-existent product or deposit IDs will cause the API to return errors. Double-check these IDs before running the workflow.Quantity Validation
Ensure the quantity is a valid number. Negative values or invalid types may cause the API to reject the request.
Links and References
- Tiny ERP API Documentation (Note: link is illustrative; please refer to official Tiny ERP API docs)
- n8n Documentation - Creating Custom Nodes
- Inventory Management Best Practices
If you need further details on other operations or resources, feel free to ask!