Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire
- 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 Members
- 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 getting, setting, deleting keys, working with hashes, lists, sets, sorted sets, and executing Lua scripts. It is designed for users who want to perform advanced Redis commands within n8n workflows, enabling automation scenarios involving caching, messaging, data storage, and real-time data processing.
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 iterate over the fields of a hash without fetching their values.
Practical examples:
- Retrieving all user IDs stored as fields in a Redis hash representing user sessions.
- Listing configuration keys stored in a Redis hash to dynamically adjust workflow logic.
- Debugging or monitoring Redis hashes by enumerating their fields.
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the value is JSON or key-value pairs (boolean). Relevant only if the key type is "hash". |
| Hash | The name of the Redis hash from which to retrieve all field names (string, required). |
Output
The output JSON object contains:
hash: The name of the Redis hash queried.keys: An array of strings representing all the field names present in the specified hash.
Example output JSON:
{
"hash": "myHash",
"keys": ["field1", "field2", "field3"]
}
This output allows subsequent nodes in the workflow to process or iterate over the list of hash fields.
Dependencies
- Requires a Redis server connection configured via an API key credential or equivalent authentication method.
- The node uses a Redis client library internally to communicate with the Redis instance.
- Proper Redis credentials must be set up in n8n to allow connection and command execution.
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 hash.
Error messages:
- Errors related to connection or authentication will typically indicate inability to connect or authenticate.
- If the hash parameter is missing or empty, the node may throw an error indicating a required parameter is missing.
Resolutions:
- Verify Redis credentials and network connectivity.
- Ensure the hash name exists in Redis before querying.
- Check Redis user permissions for accessing hashes.