Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations such as retrieving, setting, deleting keys, manipulating hashes, lists, sets, sorted sets, and executing Lua scripts. It is designed for users who want to integrate Redis data storage and retrieval into their workflows with enhanced flexibility and control.

A common use case is managing cache data, session storage, or real-time messaging within automation workflows. For example, you can fetch all field names from a hash to inspect stored user attributes, increment counters atomically, or publish messages to Redis channels for event-driven architectures.

Specifically, the "Hash Keys" operation retrieves all field names (keys) within a specified Redis hash, which is useful when you need to enumerate or audit the fields stored in a hash structure.

Properties

Name Meaning
Value Is JSON Whether the value is JSON or key-value pairs (boolean). Relevant when working with hashes.
Hash Name of the hash from which to retrieve all field names (string). Required for hash ops.

Output

The output is an array of items where each item contains a json object with the results of the Redis operation.

For the "Hash Keys" operation, the output JSON has the following structure:

{
  "hash": "name_of_the_hash",
  "keys": ["field1", "field2", "field3", "..."]
}
  • hash: The name of the Redis hash queried.
  • keys: An array of strings representing all the field names present in the hash.

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 for connecting to the Redis instance.
  • Uses the Redis client library internally to perform commands.
  • No additional external services are required beyond Redis itself.

Troubleshooting

  • Common issues:

    • Connection failures due to incorrect Redis credentials or network issues.
    • Specifying a non-existent hash name will return an empty list of keys.
    • Permissions errors if the Redis user does not have access to the requested keys.
  • Error messages:

    • Errors during connection or command execution will be thrown as node operation errors.
    • If "Continue On Fail" is enabled, errors for individual items will be returned in the output JSON under an error property.
  • Resolutions:

    • Verify Redis credentials and network connectivity.
    • Ensure the hash name exists in Redis before querying.
    • Check Redis user permissions for the requested operations.

Links and References

Discussion