Recombee RecommendItemsToUser
Overview
This node generates personalized item recommendations for a specified user based on their interaction history and preferences. It leverages an external recommendation service to fetch relevant items tailored to the user's profile. This is useful in scenarios such as e-commerce platforms suggesting products, content platforms recommending articles or videos, or any system aiming to enhance user engagement through personalized suggestions.
For example, an online store can use this node to recommend products to a returning customer based on their past purchases and browsing behavior, improving the chances of conversion.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the user for whom recommendations are generated. |
| Return Properties | Whether to include detailed properties of the recommended items in the output. |
| Count | Number of recommended items to return. |
| Scenario | Optional scenario name to customize the recommendation context or algorithm. |
| Filter | Optional filter expression (ReQL) to refine recommendations; currently not used by the node. |
| Cascade Create | Whether to create the item in the database if it does not exist when generating recommendations. |
| Max Retries | Number of retry attempts for failed batch requests, useful for handling temporary network issues. |
| Batch Size | Number of requests processed per batch during execution. |
Output
The node outputs an array of JSON objects, each representing the result of a recommendation request for a user. Each object contains:
success: Boolean indicating if the recommendation was successful.userId: The user ID for which recommendations were requested.count: Number of recommendations returned.scenario: The scenario name used for the recommendation.returnProperties: Boolean indicating if item properties were included.data: The actual recommendation data returned by the external service, typically an array of recommended items with optional properties.error(if any): Error message string if the recommendation failed.
If binary data were involved, it would be summarized here, but this node only outputs JSON data.
Dependencies
- Requires an API key credential for the external recommendation service.
- Needs configuration of:
- Database ID
- Private token for authentication
- Region of the recommendation service
- Optional API timeout setting (defaulting to 10 seconds if unspecified)
- Uses the official client library of the recommendation service to communicate with its API.
Troubleshooting
Common Issues:
- Network timeouts or rate limits may cause request failures; these are mitigated by configurable retry logic (
Max Retries). - Incorrect or missing user IDs will result in errors or empty recommendations.
- Using unsupported or malformed filter expressions currently has no effect since filtering is not implemented.
- If the external service credentials are invalid or expired, authentication errors will occur.
- Network timeouts or rate limits may cause request failures; these are mitigated by configurable retry logic (
Error Messages:
- Errors from the external API are caught and either thrown or returned as part of the output if "Continue On Fail" is enabled.
- Typical error messages relate to authentication failure, invalid parameters, or network issues.
Resolution Tips:
- Verify that all required credentials and parameters are correctly set.
- Increase
Max Retriesif transient network issues are frequent. - Ensure the user ID exists in the recommendation database or enable
Cascade Createto auto-create missing items. - Check the external service status and API limits.
Links and References
- Recombee ReQL Filtering and Boosting Documentation: https://docs.recombee.com/reql_filtering_and_boosting#reql-filtering
- Recombee Official API Client: https://github.com/recombee/recombee-api-client-js
- n8n Node Development Guide: https://docs.n8n.io/integrations/creating-nodes/