Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

This node, "Redis Enhanced," provides a comprehensive interface to interact with a Redis database. It supports a wide range of Redis operations including data retrieval, insertion, deletion, list manipulation, set and sorted set commands, Lua script execution, and more. The "Blocking Pop Right" operation specifically allows the user to perform a blocking pop from the right end of a Redis list, which means it waits for an element to become available if the list is empty.

Common scenarios where this node is beneficial include:

  • Integrating Redis as a caching layer or message queue in workflows.
  • Managing real-time data streams or task queues using Redis lists.
  • Performing atomic increments or conditional key updates.
  • Executing custom Lua scripts for advanced Redis operations.

Practical example for "Blocking Pop Right":

  • A workflow that processes tasks pushed into a Redis list by other systems can use this operation to wait for new tasks on the right end of the list and process them as they arrive.

Properties

Name Meaning
List Name of the Redis list to pop from (required).
Timeout Number of seconds to wait for an element if the list is empty; 0 means wait indefinitely.
Name Property name in the output JSON where the popped value will be stored.
Value Is JSON (Shown only if key type is hash) Whether the value is JSON or key-value pairs (true/false).

Output

The output JSON contains the following fields when using the "Blocking Pop Right" operation:

  • The property named as specified by the "Name" input property will hold the popped element's value. If the value is valid JSON, it is parsed into an object; otherwise, it remains a string.
  • Additionally, a list field is included indicating the name of the list from which the element was popped.
  • If no element is popped within the timeout period, the property will be set to null.

Example output JSON structure:

{
  "propertyName": { /* popped element, parsed if JSON */ },
  "list": "name_of_the_list"
}

Dependencies

  • Requires a Redis server accessible via credentials configured in n8n.
  • Needs an API key or authentication token for Redis connection (configured in n8n credentials).
  • Uses the Redis client library internally to connect and execute commands.

Troubleshooting

  • Timeouts: If the operation times out without popping an element, ensure the list has elements or increase the timeout.
  • Connection errors: Verify Redis credentials and network connectivity.
  • JSON parsing errors: If the popped value is not valid JSON but "Value Is JSON" is enabled, parsing will fail silently and return the raw string.
  • Invalid list name: Ensure the list name exists and is correctly spelled.
  • Permission issues: Make sure the Redis user has permissions for the blocking pop command.

Links and References

Discussion