Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP system to manage product stock information. Specifically, the Product Stock - Get operation retrieves stock details for a given product by its ID. This is useful in scenarios where you need to check current inventory levels or verify stock data within automated workflows.
Practical examples include:
- Automatically fetching stock levels before processing orders.
- Synchronizing stock data between Tiny ERP and other sales platforms.
- Monitoring inventory changes to trigger alerts or restocking actions.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product whose stock information you want to retrieve. It must be a number and is required. |
Output
The output is a JSON object containing the stock information of the specified product as returned by the Tiny ERP API. The exact structure depends on the API response but typically includes fields such as quantities available, reserved stock, and related deposit (warehouse) details.
No binary data is output by this operation.
Example output snippet (conceptual):
{
"productId": 123,
"stock": [
{
"depositId": 1,
"quantity": 50,
"type": "B"
},
{
"depositId": 2,
"quantity": 20,
"type": "B"
}
]
}
Dependencies
- Requires an active connection to the Tiny ERP API using OAuth2 authentication.
- The node expects valid credentials configured in n8n to authenticate API requests.
- Network access to the Tiny ERP service endpoint is necessary.
Troubleshooting
Common issues:
- Invalid or missing Product ID will cause the API request to fail.
- Authentication errors if the OAuth2 token is expired or misconfigured.
- Network connectivity problems preventing access to the Tiny ERP API.
Error messages:
"The operation "get" is not supported for resource "produto_estoque"!"— indicates that the requested operation is not implemented for the selected resource; ensure you are using supported operations.- API errors from Tiny ERP (e.g., 404 Not Found) usually mean the product ID does not exist.
Resolutions:
- Verify the Product ID is correct and exists in Tiny ERP.
- Check and refresh API credentials.
- Confirm network connectivity and API endpoint availability.
Links and References
- Tiny ERP API Documentation (example link, replace with actual)
- n8n documentation on OAuth2 Credentials
- n8n community forums for integration tips and troubleshooting