Redis Enhanced icon

Redis Enhanced

Get, send and update data in Redis with enhanced operations

Overview

This node provides enhanced interaction with a Redis database, allowing users to perform a wide range of operations such as appending data to strings, setting and getting keys, managing lists, sets, sorted sets, hashes, and executing Lua scripts. It is useful in scenarios where you need to manipulate Redis data structures programmatically within an n8n workflow, for example:

  • Appending additional information to existing string values in Redis.
  • Managing queues or lists by pushing or popping elements.
  • Incrementing counters atomically.
  • Publishing messages to Redis channels for real-time communication.
  • Executing custom Lua scripts for complex Redis operations.

The "Append" operation specifically appends a given value to the end of a string stored at a specified key.

Properties

Name Meaning
Value Is JSON Whether the value is JSON or key-value pairs (only relevant when key type is hash).
Key Name of the key in Redis to append the value to.
Value The string value to append to the existing value of the key.

Output

The output JSON object for the "Append" operation contains:

  • key: The name of the key to which the value was appended.
  • newLength: The new length of the string after the append operation.

Example output:

{
  "key": "myKey",
  "newLength": 42
}

This indicates that the value was successfully appended and the resulting string length is 42 characters.

The node does not output binary data.

Dependencies

  • Requires a Redis server connection configured via an API key credential (generic Redis authentication).
  • Uses a Redis client library internally to connect and execute commands.
  • The node expects the Redis credentials to be properly set up in n8n before execution.

Troubleshooting

  • Connection errors: If the node cannot connect to Redis, verify the Redis server address, port, and authentication credentials.
  • Invalid key or value: Ensure the key exists and the value to append is a valid string.
  • Operation not supported: Using the append operation on non-string key types may cause errors.
  • Error messages: Errors from Redis commands are caught and can either stop execution or be returned as error objects if "Continue On Fail" is enabled.
  • Key-value pairs mismatch: For other operations like multi-set, ensure even number of arguments; otherwise, an error is thrown.

Links and References

Discussion