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
The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations including data retrieval, modification, and management of various Redis data types such as strings, lists, sets, hashes, and sorted sets. The "Blocking Pop Left" operation specifically allows the node to perform a blocking pop from the left side of a Redis list, which means it waits for an element to become available if the list is empty, up to a specified timeout.
This node is beneficial in scenarios where you need to consume messages or tasks from a Redis list in a queue-like fashion, especially when you want to wait for new items without polling continuously. For example, it can be used in event-driven workflows where jobs are pushed into a Redis list by one process and consumed by another, ensuring efficient resource usage by blocking until data is available.
Properties
| Name | Meaning |
|---|---|
| List | Name of the Redis list from which to perform the blocking pop (required). |
| Timeout | Number of seconds to wait for an element if the list is empty; 0 means wait indefinitely. |
| Name | Property name under which the popped data will be stored in the output JSON. |
| Value Is JSON | (Shown only if key type is hash) Indicates whether the value is JSON or key-value pairs. |
Output
The output JSON contains the following structure for the "Blocking Pop Left" operation:
- A property named as specified by the "Name" input property (default
"propertyName"), containing the popped element's value.- If the popped element is valid JSON, it is parsed and returned as an object/array.
- Otherwise, the raw string value is returned.
- An additional
listproperty indicating the name of the Redis list from which the element was popped. - If no element is popped within the timeout period, the property specified by "Name" will be
null.
No binary data output is produced by this operation.
Example output JSON:
{
"propertyName": {
"id": 123,
"task": "process_data"
},
"list": "myTaskQueue"
}
or if no element was popped (timeout reached):
{
"propertyName": null
}
Dependencies
- Requires a Redis server accessible via credentials configured in n8n.
- Needs an API key credential or connection details for Redis authentication.
- Uses the Redis client library internally to connect and execute commands.
- No additional external services are required.
Troubleshooting
- Timeouts: If the node appears to hang, ensure the "Timeout" parameter is set appropriately. A value of 0 causes indefinite waiting.
- Connection errors: Verify Redis credentials and network connectivity to the Redis server.
- JSON parsing errors: If the popped data is not valid JSON but "Value Is JSON" is enabled, parsing will fail silently and return raw string instead.
- Empty list: If the list is empty and timeout expires, the output property will be
null. - Permission issues: Ensure the Redis user has permissions to perform blocking pop operations on the specified list.
Common error messages:
- Connection refused or timeout: Check Redis server availability and credentials.
- Invalid key or list name: Confirm the list name exists and is correctly spelled.
- Parsing errors: Data may not be JSON formatted; consider disabling JSON parsing if needed.