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 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, delete, and manipulate data stored in Redis using enhanced commands beyond basic key-value access. This includes working with strings, hashes, lists, sets, sorted sets, and executing Lua scripts.
The Multi Set operation specifically enables setting multiple keys and their corresponding values at once in Redis. This is useful for batch updates or initializing multiple related keys efficiently in a single command.
Common scenarios:
- Bulk updating configuration settings stored as multiple keys in Redis.
- Initializing multiple cache entries simultaneously.
- Efficiently storing multiple related pieces of data without multiple round-trips to the Redis server.
Example:
Setting multiple user session tokens at once:
user1_token abc123 user2_token def456 user3_token ghi789
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the value is JSON or key-value pairs (only shown if key type is hash). |
| Key-Value Pairs | Key-value pairs in format: key1 value1 key2 value2. Required for Multi Set operation. |
Output
The output is an array of JSON objects representing the result of the multi-set operation. For each input item, the node outputs the original input JSON extended with a field indicating the Redis operation result.
For the Multi Set operation, the output JSON is essentially the same as the input JSON because the Redis mset command returns a simple acknowledgment and no complex data. The node pushes the input data forward after successfully setting the keys.
No binary data output is produced by this operation.
Dependencies
- Requires a Redis server accessible via credentials configured in n8n.
- Requires an API key credential or connection details for Redis authentication.
- Uses the Redis client library internally to connect and execute commands.
Troubleshooting
Error: "Key-value pairs must be even number of arguments"
This error occurs if the provided key-value string does not contain an even number of space-separated elements. Ensure that keys and values are paired correctly.Connection errors
If the node cannot connect to Redis, verify the Redis server address, port, and authentication credentials.Invalid key or value formats
Make sure keys and values do not contain unsupported characters or formatting issues.Timeouts or slow responses
Large numbers of keys or network latency can cause delays. Consider splitting large batches into smaller chunks.