Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

This node, named "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, key expiration management, Lua script execution, and more.

The Pop operation specifically allows users to remove and retrieve an element from a Redis list. It can pop from either the start (head) or end (tail) of the list, depending on configuration. This is useful in scenarios such as implementing queues, stacks, or other list-based workflows where you need to consume items from Redis lists dynamically.

Practical examples:

  • Consuming tasks from a Redis queue by popping items from the head or tail.
  • Implementing stack-like behavior by popping from the tail.
  • Processing messages or events stored in Redis lists.

Properties

Name Meaning
List Name of the Redis list from which to pop data.
Tail Boolean flag indicating whether to pop from the end (tail) of the list (true) or from the start (false).
Name Optional property name to store the popped data in the output JSON. Supports dot-notation for nested assignment. Example: "data.person[0].name". Defaults to "propertyName".
Options Collection of additional options:
  Dot Notation Boolean flag controlling whether dot-notation is used when writing the popped value to the output property. If true (default), "a.b" sets property b under a (nested object). If false, it sets the property literally as "a.b".

Output

The node outputs an array of JSON objects, one per input item processed. For the Pop operation:

  • The popped value from the Redis list is parsed as JSON if possible; otherwise, it is returned as a string.
  • The value is assigned to the specified property name in the output JSON, respecting the dot-notation option.
  • Example output structure if dot-notation is enabled and propertyName is "data.person[0].name":
    {
      "data": {
        "person": [
          {
            "name": <popped_value>
          }
        ]
      }
    }
    
  • If dot-notation is disabled, the property would be:
    {
      "data.person[0].name": <popped_value>
    }
    

No binary data output is produced by this operation.

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 beyond Redis itself.

Troubleshooting

  • Common issues:

    • Connection failures due to incorrect Redis credentials or network issues.
    • Popping from an empty list returns null or no data.
    • JSON parsing errors if the popped data is not valid JSON (the node falls back to raw string).
    • Misconfiguration of the property name or dot-notation may lead to unexpected output structure.
  • Error messages:

    • Connection errors will indicate inability to connect or authenticate with Redis.
    • If key or list names are missing or invalid, errors will be thrown.
    • If the node is set to fail on error, any Redis command failure will stop execution; otherwise, errors are captured in the output JSON under an error property.
  • Resolutions:

    • Verify Redis credentials and network connectivity.
    • Ensure the list exists and contains elements before popping.
    • Use the "Value Is JSON" setting appropriately if pushing JSON strings to the list.
    • Adjust dot-notation option to match desired output structure.

Links and References

Discussion