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 such as checking key existence, setting and getting values, manipulating lists, sets, hashes, sorted sets, and executing Lua scripts. The "Exists" operation specifically checks whether one or more specified keys exist in the Redis store.
This node is beneficial in scenarios where workflows need to verify the presence of certain data before proceeding, such as conditional branching based on cache availability, validating configuration keys, or ensuring prerequisite data exists in Redis before performing further actions.
Example use case:
Before attempting to retrieve user session data from Redis, the workflow can use the "Exists" operation to check if the session keys are present, avoiding unnecessary errors or handling missing data gracefully.
Properties
| Name | Meaning |
|---|---|
| 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 available and how many matched.
Dependencies
- Requires a Redis server connection configured via an API key credential.
- The node uses a Redis client library to connect and execute commands.
- Proper Redis credentials must be set up in n8n for authentication.
Troubleshooting
- Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Empty or malformed key names causing no keys to be checked.
- Error messages:
- If the Redis connection fails, the node will throw an error indicating connection or authentication failure.
- If no keys are provided, the operation may return zero existence count without error.
- Resolution:
- Verify Redis credentials and network accessibility.
- Ensure keys are correctly specified and not empty.
- Use the "Continue On Fail" option to handle errors gracefully within workflows.