Actions21
Estoque → Create Stock Movement
AI-generatedOverview
This node interacts with the Tiny ERP system to create stock movement records. It allows users to register inventory changes such as product entries (stock additions) or withdrawals (stock reductions) in a specified warehouse or deposit.
Common scenarios where this node is beneficial include:
- Recording incoming shipments to update stock levels.
- Logging sales or usage of products that reduce inventory.
- Tracking stock adjustments for auditing and inventory management.
Practical example: A retail business can use this node to automatically log stock received from suppliers or stock sold to customers, ensuring real-time inventory accuracy.
Properties
| Name | Meaning |
|---|---|
| Product ID | Identifier of the product involved in the stock movement. |
| Deposito ID | Identifier of the warehouse or deposit where the stock movement occurs. |
| Tipo | Type of stock movement: "Baixa (B)" for stock reduction, "Entrada (E)" for stock addition. |
| Data | Date of the stock movement in YYYY-MM-DD format. |
| Quantidade | Quantity of the product moved in this transaction. |
| Preço Unitário | Unit price of the product for this stock movement. |
| Observações | Optional notes or comments about the stock movement. |
Output
The node outputs JSON objects representing the created stock movement records as returned by the Tiny ERP API. Each output item corresponds to one stock movement entry and contains all relevant details as confirmed by the API.
No binary data output is produced by this node.
Dependencies
- Requires an OAuth2 API authentication credential configured in n8n to connect securely to the Tiny ERP API v3.
- The node depends on the Tiny ERP API being accessible and properly configured for the authenticated user.
Troubleshooting
Common issues:
- Invalid or missing required fields such as Product ID, Deposito ID, or date may cause API errors.
- Incorrect date format will likely result in validation errors.
- Insufficient permissions or expired OAuth2 tokens can lead to authentication failures.
Error messages:
"Unknown resource"error indicates the resource parameter is incorrect or unsupported.- API error messages related to stock movement creation typically reflect invalid input data or authorization problems.
Resolutions:
- Ensure all required properties are provided and correctly formatted.
- Verify OAuth2 credentials are valid and have necessary permissions.
- Check API endpoint availability and network connectivity.
Links and References
- Tiny ERP API Documentation (example link; replace with actual if available)
- n8n OAuth2 Credential Setup