Actions21
Produtos → Get Stock
AI-generatedOverview
This node interacts with the Tiny ERP API v3 using OAuth2 authentication. Specifically, for the "Produtos" resource and the "Get Stock" operation, it retrieves stock information for a specified product by its ID. This is useful in scenarios where you need to monitor inventory levels, automate stock checks, or integrate product availability data into other workflows such as order processing or reporting.
Practical example:
You can use this node to automatically fetch the current stock quantity of a product before creating a sales order, ensuring that orders are only placed for products that are in stock.
Properties
| Name | Meaning |
|---|---|
| Product ID | ID of the product to get stock for (number) |
Output
The output is a JSON object containing the stock information of the specified product. The exact structure depends on the Tiny ERP API response but typically includes fields such as available quantity, reserved stock, warehouse location, or similar stock-related details.
If multiple items are returned (unlikely for a single product ID), they will be output as an array of JSON objects.
No binary data output is indicated.
Dependencies
- Requires an OAuth2 API credential configured in n8n to authenticate with the Tiny ERP API.
- The node depends on the Tiny ERP API v3 being accessible and the provided credentials having permission to read product stock data.
Troubleshooting
Common issues:
- Invalid or missing Product ID: Ensure the Product ID is correctly set and corresponds to an existing product.
- Authentication errors: Verify that the OAuth2 credentials are valid and have not expired.
- API connectivity problems: Check network access to the Tiny ERP API endpoint.
Error messages:
Unknown resource: Indicates the resource parameter is invalid; ensure "produtos" is selected.- Errors from the API (e.g., 404 Not Found): Usually mean the product does not exist or is inaccessible.
- If
continueOnFailis enabled, errors will be returned in the output JSON under anerrorfield instead of stopping execution.
Links and References
- Tiny ERP API Documentation (example link, replace with actual if available)
- n8n OAuth2 Credential Setup