RedisExtended icon

RedisExtended

Get, send and update data in Redis

Overview

The RedisExtended node allows users to interact with a Redis database by performing various operations such as retrieving information about the Redis instance, managing keys and hashes, incrementing values, publishing messages, and manipulating lists. This node is useful in scenarios where workflows need to integrate with Redis for caching, messaging, or data storage purposes.

For example:

  • Retrieving server info to monitor Redis status.
  • Getting or setting key values for caching data.
  • Publishing messages to Redis channels for real-time notifications.
  • Incrementing counters atomically.
  • Managing hash fields for structured data storage.

Properties

Name Meaning
Operation The Redis operation to perform. Options include: Delete, Get, Hash Delete, Hash Get, Hash Keys, Increment, Info, Keys, Pop, Publish, Push, Set.
Key The name of the Redis key involved in the operation (used in multiple operations).
Property Name The property path in the output JSON where retrieved data will be stored (supports dot notation).
Key Type The type of the Redis key when getting or setting data. Options: Automatic, Hash, List, Sets, String.
Options Additional options such as whether to use dot notation in property names (true/false).
Expire Whether to set an expiration timeout on the key (boolean).
TTL Time-to-live in seconds before the key expires (number).
Key Pattern Pattern to match keys when listing keys (string).
Fields Comma-separated list of fields to delete from a hash (string).
Channel Redis channel name for publishing messages (string).
Data / Value The value or message data to set or publish (string).
Tail For list operations, whether to push/pop from the end of the list (boolean).
Value Is JSON When setting hash data, whether the value is JSON or key-value pairs (boolean).
Get Values When listing keys, whether to retrieve their values (boolean).

Output

The node outputs an array of items where each item contains a json object with the results of the Redis operation:

  • For Info operation: A JSON object representing generic information about the Redis instance.
  • For Get, Hash Get, Hash Keys, Keys, Pop operations: The retrieved data is stored under the specified property name, supporting nested properties via dot notation.
  • For Set, Delete, Increment, Publish, Push, Pop, Hash Delete operations: Outputs typically confirm the action was performed, sometimes returning affected counts or new values.
  • Errors are returned in the json.error field if "continue on fail" is enabled.

No binary data output is produced by this node.

Dependencies

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

Troubleshooting

  • Connection errors: Ensure Redis credentials are correct and the Redis server is reachable.
  • Operation failures: Check that keys and fields exist and are of the expected type.
  • JSON parsing errors: When using JSON values, ensure the input strings are valid JSON.
  • Timeouts: If setting expiration, verify TTL values are positive integers.
  • Common error messages are surfaced in the output's error field if "continue on fail" is enabled; otherwise, execution stops with an error.

Links and References

Discussion