Actions35
- 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
- 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 operations including data retrieval, insertion, deletion, and advanced data structure manipulations. Specifically, the "Sorted Set Remove" operation allows users to remove one or more members from a sorted set stored in Redis.
This node is beneficial in scenarios where you need to manage Redis data programmatically within an automation workflow, such as cleaning up sorted sets by removing outdated or unwanted members, managing leaderboard entries, or maintaining priority queues.
Example use case:
You have a sorted set representing user scores in a game leaderboard. When certain users are disqualified or leave the game, you can use this node's "Sorted Set Remove" operation to efficiently remove their entries from the leaderboard.
Properties
| Name | Meaning |
|---|---|
| Sorted Set | The name of the sorted set in Redis from which members will be removed. |
| Members | Space-separated list of members to remove from the sorted set (e.g., "member1 member2"). |
| Value Is JSON | Whether the value is JSON or key-value pairs (only relevant if the key type is "hash"). |
Output
The output JSON object for the "Sorted Set Remove" operation includes:
sortedSet: The name of the sorted set from which members were removed.removed: The number of members that were successfully removed.members: An array of the members that were requested to be removed.
Example output:
{
"sortedSet": "mySortedSet",
"removed": 2,
"members": ["member1", "member2"]
}
The node does not output binary data for this operation.
Dependencies
- Requires a connection to a Redis instance configured via an API key credential or equivalent authentication method.
- The node uses the Redis client library to perform commands; ensure the Redis server is accessible and credentials are valid.
- No additional external services are required beyond the Redis server.
Troubleshooting
Common issues:
- Invalid or unreachable Redis server connection: Ensure the Redis credentials and network access are correctly configured.
- Removing members that do not exist: The
removedcount may be less than the number of members specified if some members are not present in the sorted set. - Incorrect formatting of the
Membersinput (e.g., missing spaces): Make sure members are space-separated strings.
Error messages:
"Score-member pairs must be even number of arguments": This error occurs in other operations like adding to sorted sets but not in removal. For removal, ensure theMembersstring is properly formatted.- Connection errors or timeouts: Verify Redis server availability and credentials.
- If the node throws an error about invalid parameters, double-check that all required fields (
Sorted Set,Members) are provided and correctly formatted.
Links and References
- Redis Sorted Sets Documentation
- Redis Commands Reference - ZREM
- n8n Documentation (for general node usage and credential setup)