Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

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, delete, and manipulate data stored in Redis with enhanced capabilities beyond basic commands.

The Multi Set operation specifically enables setting multiple key-value pairs in Redis at once, which is useful for batch updates or initializing multiple keys efficiently. This operation accepts key-value pairs as a single string input, parses them, and sets all pairs atomically in Redis.

Common scenarios:

  • Initializing or updating multiple configuration values in Redis simultaneously.
  • Batch inserting cache entries to improve performance by reducing round-trips.
  • Setting multiple related keys in one atomic operation to maintain consistency.

Example:
Suppose you want to set user session tokens for multiple users at once:

user1_token abc123 user2_token def456 user3_token ghi789

Using the Multi Set operation, these key-value pairs can be set in Redis in a single command.


Properties

Name Meaning
Value Is JSON Whether the value part of the key-value pairs should be treated as JSON or plain strings.
Key-Value Pairs A space-separated string containing keys and their corresponding values in the format: key1 value1 key2 value2. Must contain an even number of elements.

Output

The output is an array of JSON objects representing the results of the operation for each input item.

For the Multi Set operation:

  • The output JSON corresponds to the original input JSON merged with the result of the Redis multi-set operation.
  • Since Redis MSET returns a simple OK status on success, the node outputs the original input unchanged (no explicit Redis response data).
  • If an error occurs (e.g., uneven number of key-value arguments), an error message is returned instead.

No binary data output is produced by this operation.


Dependencies

  • Requires a Redis server accessible via credentials configured in n8n.
  • Needs an API key or authentication token credential for connecting to Redis.
  • Uses the Redis client library internally to perform commands.
  • No additional external services are required.

Troubleshooting

  • Error: "Key-value pairs must be even number of arguments"
    This error occurs if the input string for key-value pairs does not contain an even number of space-separated elements. Ensure that every key has a corresponding value.

  • Connection errors
    If the node cannot connect to Redis, verify the credentials and network connectivity to the Redis instance.

  • Invalid JSON values
    If "Value Is JSON" is enabled but the values are not valid JSON strings, parsing errors may occur. Make sure JSON values are properly formatted.

  • Empty or malformed input
    Providing empty or incorrectly formatted key-value pairs will cause failures. Always provide valid input in the specified format.


Links and References

Discussion