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 node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of Redis operations. The specific operation "Hash Exists" checks whether a particular field exists within a specified hash key in Redis.
This node is beneficial when you need to verify the presence of a field inside a Redis hash without retrieving the entire hash data. For example, it can be used in caching scenarios where you want to confirm if a cached attribute exists before performing further processing or fetching fresh data.
Practical example:
- Check if a user profile hash contains a specific attribute like "emailVerified" before sending a verification reminder email.
Properties
| Name | Meaning |
|---|---|
| Hash | The name of the Redis hash key to check within. |
| Field | The specific field name inside the hash to check for existence. |
| Value Is JSON | Whether the value stored in the hash is JSON or key-value pairs (boolean). |
Note: The "Value Is JSON" property is shown only when the key type is set to "hash" but is not directly used in the "Hash Exists" operation.
Output
The output JSON object for the "Hash Exists" operation has the following structure:
{
"hash": "name_of_the_hash",
"field": "name_of_the_field",
"exists": true_or_false
}
hash: The name of the hash key checked.field: The field name checked within the hash.exists: A boolean indicating whether the field exists (true) or not (false).
No binary data output is produced by this operation.
Dependencies
- Requires a connection to a Redis instance.
- Needs an API key credential or equivalent authentication configured in n8n to connect securely to Redis.
- The node uses the Redis client library internally to perform commands.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Specifying a non-existent hash key or field will simply return
exists: false. - Providing empty or invalid values for "Hash" or "Field" properties may cause errors.
Error messages:
- Errors related to Redis connectivity will be thrown if the node cannot connect or authenticate.
- If the "Hash" or "Field" parameter is missing or invalid, the node will throw an error indicating the required parameter is missing.
- When using the node in workflows with multiple items, errors on individual items can be handled by enabling "Continue On Fail" to avoid stopping the entire workflow.