Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire
- 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 Members
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
The node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations such as managing strings, lists, sets, sorted sets, hashes, and executing Lua scripts. It is designed for scenarios where users need to get, set, update, or delete data in Redis with enhanced capabilities beyond basic commands.
For the Set Remove operation specifically, the node removes one or more members from a specified Redis set. This is useful when you want to maintain a collection of unique items and selectively remove certain elements from it.
Practical example:
- Removing specific user IDs from an active session set after logout.
- Cleaning up tags or labels from a set associated with an item.
Properties
| Name | Meaning |
|---|---|
| Set | The name of the Redis set from which members will be removed. |
| Members | Space-separated list of members to remove from the set (e.g., "member1 member2 member3"). |
| Value Is JSON | Whether the value is JSON or key-value pairs; shown only if key type is "hash" (not relevant for Set Remove). |
Output
The output JSON object for the Set Remove operation contains:
set: The name of the set from which members were removed.removed: The number of members that were successfully removed from the set.members: An array of the members that were requested to be removed.
Example output:
{
"set": "mySet",
"removed": 2,
"members": ["member1", "member2"]
}
This output confirms which members were targeted and how many were actually removed.
Dependencies
- Requires a Redis server connection configured via credentials providing necessary authentication (e.g., API key or password).
- The node uses a Redis client library internally to communicate with the Redis instance.
- No additional external services are required beyond the Redis server itself.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Attempting to remove members from a non-existent set will simply result in zero removals without error.
- Providing an empty or malformed members string may cause unexpected behavior or errors.
Error messages:
- Errors related to Redis connectivity or command execution will be thrown and can be caught if "Continue On Fail" is enabled.
- If the members list is not properly space-separated or empty, the node might throw an error indicating invalid input.
Resolution tips:
- Verify Redis credentials and network accessibility.
- Ensure the "Members" property is correctly formatted as space-separated values.
- Use "Continue On Fail" option to handle errors gracefully in workflows.
Links and References
- Redis Sets Documentation – Official Redis documentation on sets and their commands.
- Redis SREM Command – Details about the command used to remove members from a set.
- n8n Documentation – General information about creating and using nodes in n8n.