Actions36
- 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
- List Range
- 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
The node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations such as checking key existence, getting and setting values, manipulating lists, sets, hashes, sorted sets, running Lua scripts, and more. It is designed for users who want enhanced control over Redis data within their n8n workflows.
The Exists operation specifically checks whether one or more specified keys exist in the Redis database. This can be useful in scenarios where you need to verify the presence of certain data before proceeding with further processing, such as conditional branching based on cache availability or validating if configuration keys are set.
Practical example:
You might use this node to check if user session keys exist in Redis before attempting to retrieve session data, helping avoid errors or unnecessary queries.
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the value stored in the Redis hash is JSON formatted or simple key-value pairs. |
| Keys | Space-separated list of key names to check for existence in Redis (e.g., "key1 key2"). |
Output
The output JSON object contains:
exists: A number indicating how many of the specified keys exist in Redis.keys: An array of the keys that were checked.
Example output:
{
"exists": 2,
"keys": ["key1", "key2"]
}
This allows downstream nodes to easily determine which keys are present and how many matched.
Dependencies
- Requires a Redis server connection configured via an API key credential or equivalent authentication method.
- The node uses a Redis client library internally to communicate with the Redis instance.
- No additional external services are required beyond the Redis server.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Specifying keys incorrectly (e.g., empty string or malformed keys) may lead to unexpected results.
- If no keys are provided, the operation will not perform any meaningful check.
Error messages:
- Errors related to connection or authentication will typically indicate inability to connect or authenticate with Redis.
- If the node throws an error about key-value pairs being uneven (not applicable here but relevant for other operations), ensure input formatting is correct.
- To handle errors gracefully, enable the "Continue On Fail" option in the node settings.