Actions41
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Get
- Hash Keys
- Hash Length
- Hash Set
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- Multi Hash Get
- Multi Mix Get
- Multi Mix Set
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
The "Redis Enhanced" node provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations for managing and querying data stored in Redis. It allows users to perform common Redis commands such as getting and setting keys, working with hashes, lists, sets, sorted sets, and executing Lua scripts, among others.
This node is beneficial in scenarios where you need to integrate Redis caching, session storage, message publishing, or complex data structures into your workflows. For example, you can use it to:
- Retrieve multiple string keys at once to efficiently fetch cached data.
- Push or pop items from Redis lists to manage queues.
- Publish messages to Redis channels for real-time notifications.
- Execute Lua scripts for atomic and complex operations.
- Manage expiration times on keys for cache invalidation.
Specifically, the "Multi Get" operation enables fetching multiple string keys simultaneously, which is useful when you want to retrieve several cached values in one request, reducing round-trip time and improving performance.
Properties
| Name | Meaning |
|---|---|
| Keys | Space-separated list of string key names to retrieve from Redis (e.g., "key1 key2 key3"). |
| Value Is JSON | Boolean flag indicating whether the value is JSON or key-value pairs (used with hash types). |
Note: The "Value Is JSON" property is shown only when the key type is "hash" but is not relevant for the "Multi Get" operation.
Output
The output of the "Multi Get" operation is a JSON object where each requested key is a property, and its corresponding value is the string value retrieved from Redis. If a key does not exist, its value will be null.
Example output JSON structure for keys "key1", "key2", and "key3":
{
"key1": "value1",
"key2": "value2",
"key3": null
}
This structure allows easy access to all requested keys' values in a single object.
The node does not output binary data for 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 communicate with the Redis instance.
Troubleshooting
Common Issues:
- Providing keys that do not exist in Redis will return
nullvalues for those keys. - Incorrectly formatted keys (e.g., empty strings or keys with unsupported characters) may cause errors.
- Network connectivity issues or incorrect Redis credentials will prevent successful connection.
- Providing keys that do not exist in Redis will return
Error Messages:
- Errors related to connection failures typically indicate misconfigured credentials or unreachable Redis server.
- If the keys parameter is empty or malformed, the node may throw an error indicating missing required parameters.
- JSON parsing errors are unlikely in "Multi Get" since it retrieves string values directly, but other operations involving JSON parsing may fail if the data is malformed.
Resolution Tips:
- Verify Redis credentials and network accessibility.
- Ensure keys are provided as space-separated strings without extra whitespace.
- Use the "Continue On Fail" option to handle errors gracefully within workflows.
Links and References
- Redis Official Documentation
- Redis MGET Command
- n8n Redis Integration Guide (general Redis node documentation)