Actions35
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- 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 Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
This node, "Redis Enhanced," provides a comprehensive interface to interact with a Redis database. It supports a wide range of Redis operations including string manipulation, list handling, set and sorted set management, hash operations, key scanning, expiration control, Lua script execution, and more.
The "Hash Exists" operation specifically checks if a particular field exists within a given Redis hash. This is useful in scenarios where you want to verify the presence of a specific attribute or piece of data inside a hash without retrieving the entire hash content.
Practical examples:
- Before updating a user profile stored as a hash, check if a certain field (e.g., "email") exists.
- Validate configuration settings stored in hashes by checking for required fields.
- Conditional logic in workflows based on the existence of specific hash fields.
Properties
| Name | Meaning |
|---|---|
| Hash | The name of the Redis hash to check the field in. |
| Field | The specific field name within the hash to check for existence. |
| Value Is JSON | Whether the value is JSON or key-value pairs (relevant when setting values in hashes). |
Note: For the "Hash Exists" operation, only "Hash" and "Field" are required inputs. "Value Is JSON" is shown for hash-related operations but not directly used in this 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 checked.field: The field name checked within the hash.exists: A boolean indicating whether the specified field exists (true) or not (false).
No binary data output is involved in 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 operations.
- No additional external services are required beyond the Redis server.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Specifying a non-existent hash or field will simply return
exists: false. - Providing empty or invalid hash or field names may cause errors.
Error messages:
- Connection errors: Indicate problems with Redis server availability or credentials. Verify connection details and network access.
- Invalid input errors: Ensure that the "Hash" and "Field" properties are provided and non-empty.
- If the node is set to continue on fail, errors will be returned in the output JSON under an
errorproperty.