Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations including data retrieval, insertion, deletion, and advanced commands like blocking pops from lists. Specifically, the "Blocking Pop Right" operation allows the node to perform a blocking pop from the right end of a specified Redis list, waiting for an element to become available or until a timeout occurs.

This node is beneficial in scenarios where real-time or near-real-time processing of queued data is required, such as:

  • Consuming messages or tasks from a Redis-backed queue.
  • Implementing worker systems that wait for jobs pushed into Redis lists.
  • Synchronizing processes by waiting for data availability in Redis.

For example, using the "Blocking Pop Right" operation, a workflow can wait for new items added to a Redis list and process them immediately once they arrive, enabling efficient event-driven automation.

Properties

Name Meaning
List Name of the Redis list from which to perform the blocking pop on the right side.
Timeout Number of seconds to wait for an element before timing out; 0 means wait indefinitely.
Name The property name in the output JSON where the popped data will be stored.
Value Is JSON (Shown only if key type is hash) Indicates whether the value should be treated as JSON or key-value pairs.

Output

The node outputs JSON data containing the result of the blocking pop operation:

  • If an element is successfully popped from the right of the specified list, the output JSON includes:

    • A property named as specified by the "Name" input property, containing the popped element's value. The node attempts to parse this value as JSON; if parsing fails, it returns the raw string.
    • A list property indicating the name of the list from which the element was popped.
  • If no element is popped (e.g., due to timeout), the property specified by "Name" will be set to null.

No binary data output is produced by this operation.

Example output JSON when an element is popped:

{
  "propertyName": { /* parsed JSON object or raw string */ },
  "list": "myList"
}

Example output JSON when timeout occurs without popping:

{
  "propertyName": null
}

Dependencies

  • Requires a Redis server accessible via credentials configured in n8n.
  • Needs an API key or authentication token credential for connecting to Redis.
  • Uses the Redis client library internally to communicate with the Redis instance.

Troubleshooting

  • Timeouts: If the node waits indefinitely or times out without receiving data, verify that the specified Redis list exists and that data is being pushed to it.
  • Invalid JSON Parsing: If the popped data is expected to be JSON but parsing fails, ensure the data stored in Redis is valid JSON or adjust the workflow to handle raw strings.
  • Connection Issues: Errors related to connection failures usually indicate incorrect Redis credentials or network issues. Verify the Redis server address, port, and authentication details.
  • Operation Errors: If the node throws errors about invalid parameters (e.g., missing list name), ensure all required properties are correctly set.

Links and References

Discussion