Actions41
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Get
- Hash Keys
- Hash Length
- Hash Set
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- Multi Hash Get
- Multi Mix Get
- Multi Mix Set
- 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 setting, getting, deleting keys, working with hashes, lists, sets, sorted sets, and executing Lua scripts. The "Multi Set" operation specifically allows users to set multiple string keys at once in Redis by providing key-value pairs.
This node is beneficial in scenarios where batch updates to Redis are needed efficiently, such as caching multiple configuration values, updating session data for multiple users simultaneously, or bulk inserting data into Redis from other systems.
Example use case:
You have several user preference settings stored in Redis keys and want to update them all at once. Using the Multi Set operation, you can provide all key-value pairs in one go, reducing the number of calls to Redis and improving performance.
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the value is JSON or key-value pairs (only shown when key type is hash) |
| Key-Value Pairs | Key-value pairs in format: key1 value1 key2 value2 (strings only). Used to set multiple string keys at once |
Output
The output is an array of JSON objects, each corresponding to an input item processed. For the "Multi Set" operation:
- The output JSON mirrors the input JSON but includes a property
redis_resultwhich contains the result of the multi-set operation. - Since this operation sets multiple keys at once, no direct values are returned from Redis; the output confirms the operation was performed.
- No binary data output is produced by this operation.
Example output snippet for one input item:
{
"json": {
"...originalInputProperties...",
"redis_result": "OK"
}
}
Dependencies
- Requires a Redis server accessible via credentials configured in n8n.
- Needs an API key credential or connection details for Redis authentication.
- Uses the Redis client library internally to connect and execute commands.
- No additional external services are required beyond Redis itself.
Troubleshooting
Key-value pairs must be even number of arguments:
This error occurs if the provided key-value pairs string does not contain an even number of space-separated tokens. Ensure that every key has a corresponding value.Invalid JSON in value (if using JSON parsing):
If the "Value Is JSON" option is enabled for hash types and the value is not valid JSON, the node will throw an error. Validate your JSON syntax before input.Connection errors:
If the node cannot connect to Redis, verify the credentials and network connectivity to the Redis server.Operation not supported or invalid parameters:
Double-check that the operation selected is "Multi Set" and that the key-value pairs are formatted correctly.