Overview
The node "RedisExtended" provides extended interaction capabilities with a Redis database. It supports various operations such as getting, setting, deleting keys, working with hashes, lists, sets, and publishing messages to channels. The "Hash Keys" operation specifically retrieves all field names (keys) within a Redis hash key.
This node is beneficial in scenarios where you need to integrate Redis data storage or caching into your workflows, for example:
- Retrieving all fields of a user profile stored as a Redis hash.
- Managing and inspecting hash structures in Redis for analytics or monitoring.
- Dynamically accessing the structure of Redis hashes before processing their values.
Practical example: You have a Redis hash storing configuration settings under a key "appConfig". Using the "Hash Keys" operation, you can fetch all the setting names to dynamically adjust your workflow based on available configurations.
Properties
| Name | Meaning |
|---|---|
| Hash Key | Name of the Redis hash key from which to retrieve all field names. |
| Property Name | The name of the property in the output JSON where the retrieved list of hash fields will be stored. Supports dot-notation (e.g., data.person[0].name). |
| Options | Collection of additional options: - Dot Notation (boolean): Whether to interpret the property name using dot-notation. If true, nested objects are created; if false, the property name is used literally. |
Output
The output JSON contains a single property (named as per the "Property Name" input) holding an array of strings. Each string represents a field name present in the specified Redis hash key.
Example output JSON structure:
{
"propertyName": [
"field1",
"field2",
"field3"
]
}
If dot-notation is enabled and the property name includes dots, the output will be nested accordingly.
No binary data is produced by this operation.
Dependencies
- Requires a connection to a Redis instance.
- Needs an API authentication token or credentials configured in n8n to connect securely to Redis.
- Uses the Redis client library internally to perform commands like
HKEYS.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Specifying a non-existent hash key will return an empty array without error.
- Misconfiguration of the property name or dot-notation option may lead to unexpected output structure.
Error messages:
- Errors related to Redis connectivity will typically indicate failure to connect or authenticate. Verify credentials and network access.
- If the node throws an error about invalid parameters, ensure that the "Hash Key" is provided and not empty.
- If the node fails but "Continue On Fail" is enabled, errors will be returned in the output JSON under an
errorproperty.