Actions30
Overview
This node interacts with the MoySklad API v1.2 to retrieve multiple Product records based on specified criteria. It is designed to fetch a list of products, supporting filtering, pagination, and expansion of related entities. This functionality is useful in scenarios where you need to synchronize product data from MoySklad into another system, generate reports, or perform bulk operations on product datasets.
For example, you can use this node to:
- Retrieve all products with specific attributes (e.g., only those in stock or belonging to a certain category).
- Paginate through large product catalogs by specifying limits and offsets.
- Expand related information such as product categories or custom fields for richer data integration.
Properties
| Name | Meaning |
|---|---|
| Additional Options | A collection of optional parameters to refine the query: |
| - Expand | Comma-separated relations to expand (e.g., related entities to include in the response). |
| - Filters | Semicolon-separated filters to narrow down results; supports custom fields (e.g., attributes.name=value). |
| - Limit | Maximum number of products to return (1 to 1000). |
| - Offset | Number of products to skip before starting to collect the result set (for pagination). |
Output
The output JSON contains a single field:
rows: An array of product objects returned by the API. Each object represents a product with its properties as provided by MoySklad, including any expanded relations if requested.
Example output structure:
{
"rows": [
{
"id": "product-id-1",
"name": "Product Name 1",
"code": "P001",
"attributes": { ... },
...
},
{
"id": "product-id-2",
"name": "Product Name 2",
"code": "P002",
"attributes": { ... },
...
}
]
}
No binary data output is produced by this operation.
Dependencies
- Requires an API token credential for MoySklad API authentication.
- The node uses the Axios HTTP client internally to make requests to the MoySklad REST API endpoint at
https://api.moysklad.ru/api/remap/1.2. - Network connectivity to MoySklad's API service is necessary.
- No additional environment variables are required beyond the API token credential.
Troubleshooting
- Missing Credentials: If the API token is not provided or invalid, the node will throw an error indicating missing credentials. Ensure that a valid MoySklad API token is configured in n8n credentials.
- API Rate Limiting: The node implements retry logic for HTTP 429 responses (rate limiting). However, excessive requests may still cause failures. Reduce request frequency or increase limits cautiously.
- Invalid Filters or Parameters: Incorrectly formatted filters or unsupported expand relations may cause API errors. Verify filter syntax and available expansions in MoySklad API documentation.
- HTTP Errors: Any HTTP status code >= 400 from the API will cause the node to throw an error with the status code and response body. Check the error message for details and adjust input parameters accordingly.
- Pagination Issues: Setting very high limits or offsets beyond the available dataset size may result in empty results. Adjust limit and offset values to match your dataset.