Actions41
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Get
- Hash Keys
- Hash Length
- Hash Set
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- Multi Hash Get
- Multi Mix Get
- Multi Mix Set
- 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 including getting, setting, deleting keys, working with hashes, lists, sets, sorted sets, and executing Lua scripts. The "Multi Hash Get" operation specifically allows retrieving multiple fields from a Redis hash in one request, which is efficient for fetching related data stored under a single key.
This node is beneficial in scenarios where you need to integrate Redis as a fast, in-memory data store within your workflows. For example, you can use it to fetch multiple user attributes stored as fields in a hash, retrieve configuration settings, or batch read multiple values efficiently.
Practical example: Suppose you have a Redis hash named user:1001 with fields like name, email, and age. Using the "Multi Hash Get" operation, you can retrieve all these fields at once by specifying them in the "Fields" property, and write the result into a workflow property for further processing.
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the hash field values are JSON strings that should be parsed into objects, or plain strings. |
| Hash | The name of the Redis hash key from which to retrieve fields. |
| Fields | Space-separated list of field names to retrieve from the specified hash. |
| Property Name | The name of the property in the output JSON where the retrieved data will be stored. Supports dot-notation (e.g., data.userInfo). |
Output
The output JSON contains the requested fields and their corresponding values from the specified Redis hash. If "Value Is JSON" is enabled, the node attempts to parse each field's value as JSON; otherwise, it returns raw string values.
Example output structure when retrieving fields field1 and field2 into property data:
{
"data": {
"field1": <value_of_field1>,
"field2": <value_of_field2>
}
}
If parsing fails for a field's value, the raw string is returned instead.
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
- Invalid JSON in value: If "Value Is JSON" is enabled but the field value is not valid JSON, the node will return the raw string instead of throwing an error. However, if you manually set "Value Is JSON" incorrectly, you might get unexpected results.
- Hash does not exist or fields missing: If the specified hash key or some fields do not exist, those fields will be returned as
nullor omitted depending on Redis behavior. - Connection errors: Ensure the Redis credentials are correct and the Redis server is reachable. Connection failures will cause the node to throw errors.
- Empty fields parameter: The "Fields" property must contain at least one field name separated by spaces; otherwise, the node will throw an error.
- Dot notation issues: If the "Property Name" uses dot notation but you want to disable it, adjust the node settings accordingly to avoid unexpected nested properties.