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 getting, setting, deleting keys, manipulating lists, sets, sorted sets, hashes, and executing Lua scripts. The "Hash Values" operation specifically retrieves all values stored in a given Redis hash key.

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

  • Fetching all values from a user session hash to analyze session data.
  • Retrieving configuration parameters stored as a hash in Redis.
  • Extracting all field values from a hash representing an object or entity.

Properties

Name Meaning
Hash The name of the Redis hash key from which to retrieve all values.
Value Is JSON Whether the value is JSON or key-value pairs (only relevant when setting hash values).

Note: For the "Hash Values" operation, only the Hash property is required and used.

Output

The output is an array of items, each containing a json object with the following structure for the "Hash Values" operation:

{
  "hash": "<name_of_hash>",
  "values": [ /* array of all values stored in the hash */ ]
}
  • hash: The name of the hash key queried.
  • values: An array containing all the values stored in the specified Redis 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 key will return an empty list of values.
    • Permission errors if the Redis user does not have access to the requested keys.
  • Error messages:

    • Errors related to connection or authentication will be thrown during the initial connection phase.
    • If the hash key parameter is missing or empty, the node will throw an error indicating the required input is missing.
    • If Redis returns an error for the command, it will be surfaced unless "Continue On Fail" is enabled, in which case the error message will be included in the output JSON.
  • Resolution tips:

    • Verify Redis credentials and network connectivity.
    • Ensure the hash key exists in Redis before running the node.
    • Use the "Continue On Fail" option to handle errors gracefully in workflows.

Links and References

Discussion