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 on different Redis data types such as strings, hashes, lists, sets, and sorted sets. It allows users to get, set, update, delete, and query keys and their values in Redis with enhanced capabilities like automatic type detection, JSON parsing, and Lua script execution.
The "Hash Exists" operation specifically checks if a particular field exists within a given hash key in Redis. This is useful for workflows that need to verify the presence of specific data fields before proceeding with further processing or conditional logic.
Common scenarios:
- Validating if a configuration or user attribute exists in a Redis hash before updating or reading it.
- Conditional branching in automation based on the existence of certain hash fields.
- Efficiently checking membership without retrieving the entire hash content.
Example:
You have a Redis hash storing user profiles keyed by user IDs. Before updating a user's email address, you use the "Hash Exists" operation to check if the "email" field exists in that user's hash.
Properties
| Name | Meaning |
|---|---|
| Hash | The name of the Redis hash key to check the field in. |
| Field | The specific field name within the hash to check for existence. |
| Value Is JSON | (Not applicable for this operation) Generally indicates if values are JSON or key-value pairs; shown only for some hash operations but not used here. |
Output
The output JSON object for the "Hash Exists" operation contains:
hash: The name of the hash key checked.field: The field name checked within the hash.exists: A boolean indicating whether the specified field exists (true) or not (false).
Example output:
{
"hash": "user:1234",
"field": "email",
"exists": true
}
This output allows downstream nodes or workflow logic to easily branch or act based on the presence of the field.
Dependencies
- Requires a Redis server accessible via credentials configured in n8n.
- Needs an API key credential or connection details for Redis authentication.
- 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 simply return
exists: false. - Providing an empty or invalid field name may cause errors or unexpected results.
Error messages:
- Errors related to Redis connectivity will be thrown if the node cannot connect or authenticate.
- If the field parameter is missing or invalid, the node may throw an error indicating a required parameter is missing.
- Invalid JSON parsing errors do not apply to this operation since it only checks existence.
Resolutions:
- Verify Redis credentials and network accessibility.
- Ensure the "Hash" and "Field" properties are correctly set and not empty.
- Use the "Continue On Fail" option to handle errors gracefully in workflows.