Actions36
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of Redis operations including string manipulation, list handling, set and sorted set management, hash operations, key scanning, and Lua script execution. It is designed for users who want to get, send, or update data in Redis with enhanced capabilities beyond basic commands.
A common use case is managing sorted sets in Redis, such as adding members with scores, retrieving ranges of members, removing members, or getting the cardinality of a sorted set. For example, you can use this node to maintain leaderboards, priority queues, or time-series data where elements are scored and ordered.
Properties
| Name | Meaning |
|---|---|
| Sorted Set | The name of the sorted set to operate on |
| Start | Start index (inclusive) for range queries |
| Stop | Stop index (inclusive, -1 means the end) for range queries |
| With Scores | Whether to include the scores along with the members in the result |
| Value Is JSON | When working with hash-type keys, indicates if the value is JSON or key-value pairs |
Output
The output is an array of JSON objects representing the results of the Redis operation(s) performed. For the "Sorted Set Range" operation specifically:
- The
jsonoutput contains:sortedSet: The name of the sorted set queried.result: An array of members retrieved from the sorted set. If "With Scores" is enabled, this includes both members and their associated scores.
For other operations, the output structure varies accordingly, typically containing fields relevant to the operation such as counts, values, keys, or status indicators.
This node does not output binary data.
Dependencies
- Requires a Redis server connection configured via credentials that provide necessary authentication (e.g., API key or password).
- Uses the Redis client library internally to communicate with the Redis instance.
- No additional external services are required beyond the Redis server.
Troubleshooting
Common Issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Invalid input parameters, such as malformed score-member pairs for sorted set additions.
- Using incompatible key types for certain operations (e.g., treating a non-sorted set key as a sorted set).
Error Messages:
- Errors related to invalid arguments (e.g., uneven number of score-member pairs) will be thrown explicitly.
- Connection errors will occur if the Redis server is unreachable or credentials are invalid.
- If the node is set to continue on failure, errors for individual items will be included in the output JSON under an
errorfield.
Resolution Tips:
- Verify Redis credentials and network connectivity.
- Ensure input strings for score-member pairs and members are correctly formatted and space-separated.
- Confirm the key type in Redis matches the operation being performed.
Links and References
- Redis Official Documentation
- Redis Sorted Sets
- n8n Documentation (for general usage guidance)