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.

This node is beneficial in scenarios where you need to integrate Redis caching, messaging, or data storage into your workflows. For example:

  • Caching API responses for faster retrieval.
  • Managing real-time message queues using Redis lists.
  • Performing atomic increments or conditional key sets.
  • Executing Lua scripts for complex Redis operations.
  • Bulk setting or getting multiple keys at once.

Specifically, the Multi Set operation lets you set multiple keys and their values simultaneously in Redis, which is useful for batch updates or initializing multiple cache entries efficiently.

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. Required for Multi Set operation.

Explanation of properties relevant to Multi Set operation:

  • Key-Value Pairs: A string containing space-separated keys and values. The number of elements must be even, as each key must have a corresponding value. Example: "user:1 John user:2 Jane" sets two keys (user:1 and user:2) with their respective values.

  • Value Is JSON: When working with hash-type keys, this boolean indicates if the value should be treated as JSON or as simple key-value pairs.

Output

The output is an array of items, each containing a json object representing the result of the operation for each input item.

For the Multi Set operation, the output simply returns the original input item unchanged after successfully setting the keys in Redis. There is no additional data returned from Redis for this operation.

Example output item for Multi Set:

{
  "json": {
    // Original input data passed through
  }
}

No binary data output is produced by this node.

Dependencies

  • Requires a connection to a Redis server.
  • Needs an API key credential or equivalent authentication configured in n8n to connect securely 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 provided key-value pairs string does not contain an even number of space-separated elements. Ensure every key has a corresponding value.

  • Connection errors
    If the node cannot connect to Redis, verify that the Redis credentials are correct and the Redis server is reachable.

  • Invalid command parameters
    Make sure all required fields (like Key-Value Pairs) are filled correctly according to the operation's requirements.

  • JSON parsing issues
    If using JSON values, ensure they are valid JSON strings to avoid errors during processing.

Links and References


This summary focuses on the "Default" resource and the "Multi Set" operation of the Redis Enhanced node, describing its usage, inputs, outputs, dependencies, and common troubleshooting tips.

Discussion