Actions35
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
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 enhanced control over Redis data within their n8n workflows.
For the Hash Keys operation specifically, this node retrieves all field names (keys) stored in a specified Redis hash. This is useful when you need to inspect or process the structure of a hash without fetching all its values.
Practical examples:
- Fetching all user IDs stored as fields in a Redis hash representing user sessions.
- Listing configuration keys stored in a Redis hash to dynamically generate UI elements.
- Debugging or auditing the contents of a Redis hash by enumerating its fields.
Properties
| Name | Meaning |
|---|---|
| Hash | The name of the Redis hash from which to retrieve all field names. |
Note: The property "Value Is JSON" exists but is not relevant for the "Hash Keys" operation.
Output
The output is an array of items where each item contains a json object with 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 is output by this operation.
Dependencies
- Requires a connection to a Redis instance configured via credentials that provide necessary authentication.
- The node uses a Redis client library internally to communicate with the Redis server.
- No additional environment variables are required beyond the Redis connection credentials.
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.
- Permission errors if the Redis user does not have access to the requested hash.
Error messages:
- Errors related to connection or command execution will be thrown as node operation errors.
- If the node is set to continue on failure, errors will be returned in the output JSON under an
errorproperty.
Resolution tips:
- Verify Redis credentials and network connectivity.
- Ensure the hash name is correct and exists in the Redis database.
- Check Redis user permissions for accessing hashes.