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 node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of Redis operations. It allows users to get, set, update, and delete data in Redis with enhanced capabilities such as working with strings, hashes, lists, sets, sorted sets, and executing Lua scripts.
For the Set Add operation specifically, this node adds one or more members to a Redis set. This is useful when you want to maintain a collection of unique items (e.g., user IDs, tags, or categories) without duplicates.
Practical example:
You have a Redis set named "activeUsers" and want to add multiple user IDs at once to track currently active users. Using this node's Set Add operation, you can add those user IDs efficiently.
Properties
| Name | Meaning |
|---|---|
| Set | The name of the Redis set to which members will be added. |
| Members | Space-separated list of members to add to the set (e.g., "member1 member2 member3"). |
| Value Is JSON | Whether the value is JSON or key-value pairs (only shown for hash key type, not relevant here). |
Output
The output JSON object for the Set Add operation contains:
set: The name of the set where members were added.added: The number of members that were actually added to the set (excluding existing members).members: An array of the members that were attempted to be added.
Example output:
{
"set": "mySet",
"added": 2,
"members": ["member1", "member2"]
}
This output confirms which members were processed and how many were newly added.
Dependencies
- Requires a Redis server connection configured via an API key credential or equivalent authentication method.
- The node uses a Redis client library internally to communicate with the Redis instance.
- Proper Redis credentials must be provided in n8n for the node to connect successfully.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Adding members to a non-existent or misconfigured Redis set.
- Providing empty or improperly formatted members string (should be space-separated).
Error messages:
- Errors related to connection or authentication will indicate failure to connect to Redis.
- If the members string has invalid format or is empty, the node may throw an error or add zero members.
- If the Redis server returns an error, it will be surfaced by the node; ensure Redis commands are supported by your Redis version.
Resolutions:
- Verify Redis credentials and network accessibility.
- Ensure the "Set" property is correctly specified.
- Provide valid space-separated members without extra spaces or invalid characters.