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 an existing string key.
  • Incrementing counters atomically.
  • Managing message queues using Redis lists.
  • Publishing messages to Redis channels.
  • 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 shown 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 connection to a Redis instance configured via credentials providing necessary authentication.
  • Uses a Redis client library internally to communicate with the Redis server.
  • No additional environment variables are explicitly required beyond the Redis credentials.

Troubleshooting

  • Connection issues: If the node cannot connect to Redis, verify the Redis credentials and network accessibility.
  • Invalid key or value: Ensure the key exists and the value to append is a valid string.
  • Operation errors: Errors during execution (e.g., wrong data type for append) will throw exceptions unless "Continue On Fail" is enabled, in which case error details are returned in the output.
  • Key type mismatch: Appending only works on string keys; attempting to append to other types (hash, list, set) may cause errors.

Links and References

Discussion