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, named "Redis Enhanced," provides a comprehensive interface to interact with a Redis database. It supports a wide range of Redis operations such as getting and setting keys, manipulating lists, sets, sorted sets, hashes, running Lua scripts, and more. The node is useful for workflows that require caching, real-time data processing, message publishing, or any scenario where Redis is used as a fast key-value store or message broker.
For the List Length operation specifically, the node retrieves the length of a specified Redis list. This is beneficial when you need to monitor queue sizes, batch process items in a list, or control flow based on the number of elements in a Redis list.
Practical example:
- You have a Redis list acting as a job queue. Using this node's List Length operation, you can check how many jobs are pending before deciding to scale up workers or trigger alerts.
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 shown for certain key types (hash) and not relevant for 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.
Example output JSON:
{
"list": "myQueue",
"length": 42
}
No binary data output is produced by this operation.
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 connect and execute commands.
- The user must provide valid Redis credentials in n8n for the node to function.
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.
- If the Redis server is down or unreachable, the node will throw an error.
Error messages:
- Errors related to connection or command execution will be thrown as node operation errors.
- If "Continue On Fail" is enabled, errors for individual items will be returned in the output JSON under an
errorfield instead of stopping execution.
Resolution tips:
- Verify Redis credentials and network connectivity.
- Ensure the list name is correct and the Redis instance is operational.
- Use "Continue On Fail" cautiously to handle partial failures gracefully.