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, and manage data stored in Redis with enhanced capabilities beyond basic commands. This node is beneficial for scenarios where you need to integrate Redis caching, messaging, or data storage into your workflows, such as:

  • Managing session data or counters.
  • Implementing distributed locks or atomic increments.
  • Publishing messages to Redis channels for real-time notifications.
  • Manipulating complex data structures like sets, sorted sets, hashes, and lists.
  • Running Lua scripts for custom Redis logic.

For example, you can use this node to add members to a Redis set, check if a member exists, retrieve all members, or remove members from the set, all within an automated workflow.

Properties

Name Meaning
Value Is JSON Whether the value is JSON or key-value pairs (only shown when key type is "hash").
Set Name of the Redis set to operate on (required for set-related operations).

These properties are relevant specifically for the "Set Members" operation under the "Default" resource.

Output

The output is an array of JSON objects representing the results of the Redis operations performed. For the "Set Members" operation (smembers), the output JSON contains:

  • set: The name of the Redis set queried.
  • members: An array of all members currently in the specified Redis set.

Example output JSON for "Set Members":

{
  "set": "mySet",
  "members": ["member1", "member2", "member3"]
}

If other set operations like adding or removing members are used, the output includes fields indicating how many members were added or removed, along with the list of affected members.

The node does not output binary data.

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.

Troubleshooting

  • Connection errors: If the node cannot connect to Redis, verify that the Redis server is running, reachable, and credentials are correct.
  • Invalid key or set names: Ensure that the set name provided is valid and exists in Redis.
  • Malformed input: For operations requiring multiple members (e.g., adding/removing), ensure members are space-separated strings without extra whitespace.
  • Key-value pair mismatch: For hash-type keys with JSON values, ensure the JSON is well-formed; otherwise, parsing errors may occur.
  • Operation not supported: Using an unsupported operation or missing required parameters will cause errors.
  • Timeouts or network issues: May cause command failures; retry or check network stability.

Common error messages include:

  • "Key-value pairs must be even number of arguments": When setting multiple key-value pairs, ensure pairs are complete.
  • "Score-member pairs must be even number of arguments": For sorted set additions, provide pairs correctly.
  • "Error message from Redis": Indicates Redis-specific errors; consult Redis documentation for details.

To resolve errors, check parameter correctness, Redis server status, and network connectivity.

Links and References

Discussion