Actions20
- Delivery Actions
- Inventory Actions
- Log Actions
- Order Actions
- Shipment Actions
Overview
The RedStage node for n8n allows you to interact with the Red Stage API, specifically targeting the "Inventory" resource and its "Lots" operation. This operation is typically used to retrieve a list of inventory lots, possibly filtered, sorted, and paginated according to your needs.
Common scenarios:
- Fetching inventory lots for stock management or reporting.
- Filtering lots by status or other attributes using JSON search filters.
- Paginating through large sets of inventory data.
- Sorting lots by specific fields in ascending or descending order.
Practical example:
You might use this node to automatically pull all active inventory lots (e.g., where status = 1), sort them by creation date, and limit the results to the first 50 entries for further processing in your workflow.
Properties
| Name | Type | Meaning |
|---|---|---|
| Additional Fields | Collection | A group of optional parameters to refine your query. |
| └ JSON Search Filter | JSON | Allows advanced filtering using a JSON object, e.g., { "status": { "eq": 1 } }. |
| └ Sort Field | String | The field name by which to sort the results. |
| └ Sort Direction | Options | The direction to sort: "Ascending" (asc) or "Descending" (desc). |
| └ Page | Number | The page number to retrieve (minimum: 1). |
| └ Limit | Number | Maximum number of results to return (min: 1, max: 100). |
Output
The output is an array of objects, each representing an inventory lot as returned by the Red Stage API. The exact structure depends on the API response, but typically includes fields relevant to inventory lots (such as IDs, status, quantities, etc.).
If an error occurs and "Continue On Fail" is enabled, the output will include an object with an error property containing the error message.
Example output:
[
{
"id": 123,
"status": 1,
"quantity": 50,
"...": "..."
},
{
"id": 124,
"status": 1,
"quantity": 30,
"...": "..."
}
]
Or, in case of error:
[
{
"error": "Some error message"
}
]
Dependencies
- External Service: Requires access to the Red Stage API.
- API Credentials: You must configure the
redStageApicredential in n8n. - n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid credentials: If the
redStageApicredential is missing or incorrect, authentication errors will occur. - Unknown resource/operation: If the resource or operation is misspelled or not supported, you'll see an error like:
"The resource \"inventory\" is not known!" - API errors: If the API returns an error (e.g., invalid filter syntax), it will be included in the output if "Continue On Fail" is enabled.
How to resolve:
- Double-check your API credentials in n8n.
- Ensure the resource is set to "Inventory" and the operation to "Lots".
- Validate your JSON search filter for correct syntax.
- Adjust pagination and limits within allowed ranges.
Links and References
- n8n Documentation
- Consult your Red Stage API documentation for details on available fields and filter syntax.