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 "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations such as getting and setting keys, manipulating lists, sets, sorted sets, hashes, executing Lua scripts, and more. It is designed for users who want to integrate Redis data storage and retrieval into their n8n workflows with enhanced capabilities beyond basic commands.
For the List Length operation specifically, this node retrieves the length of a specified list stored in Redis. This is useful when you need to know how many elements are currently in a Redis list, for example, to monitor queue sizes or batch processing workloads.
Practical examples:
- Checking the number of pending jobs in a Redis-backed task queue.
- Monitoring the size of a message list before processing.
- Validating that a list has reached a certain length before triggering downstream actions.
Properties
| Name | Meaning |
|---|---|
| List | The name of the Redis list whose length you want to retrieve. |
Note: The property "Value Is JSON" exists but is only relevant when the key type is "hash" and does not apply to the List Length operation.
Output
The output JSON object contains:
list: The name of the Redis list queried.length: The integer length of the list (number of elements).
Example output:
{
"list": "myList",
"length": 42
}
This output allows subsequent workflow nodes to use the list length value for conditional logic or further processing.
Dependencies
- Requires a Redis server connection configured via an API key credential in n8n.
- The node uses a Redis client library internally to connect and execute commands.
- No additional external services are required beyond the Redis instance.
Troubleshooting
Common issues:
- Connection failures due to incorrect Redis credentials or network issues.
- Specifying a non-existent list name will return a length of 0 without error.
- Using the wrong key type (e.g., querying a string key as a list) may cause unexpected results or errors.
Error messages:
- Errors related to connection or authentication will be thrown if the Redis server is unreachable or credentials are invalid.
- If the node encounters an error during execution and "Continue On Fail" is disabled, it will stop and report the error.
- When "Continue On Fail" is enabled, errors for individual items will be included in the output JSON under an
errorfield.
To resolve errors:
- Verify Redis credentials and connectivity.
- Ensure the list key exists and is of type list.
- Enable "Continue On Fail" to handle partial failures gracefully.