Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Members
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
Overview
The node "Redis Enhanced" provides a comprehensive interface to interact with a Redis database, supporting a wide range of operations including setting keys, retrieving values, managing lists, sets, sorted sets, hashes, and controlling key expiration. The "Expire At" operation specifically allows users to set a key to expire at a precise Unix timestamp.
This node is beneficial in scenarios where you need to manage cache lifetimes, session expirations, or any time-sensitive data stored in Redis. For example, you can use the "Expire At" operation to automatically invalidate a user's session key at a specific time or schedule temporary feature flags that expire exactly when needed.
Properties
| Name | Meaning |
|---|---|
| Key | Name of the key to expire in Redis. |
| Timestamp | Unix timestamp (seconds since epoch) at which the key should expire. |
| Value Is JSON | Whether the value is JSON or key-value pairs (only relevant if key type is hash). |
Output
The output is an array of JSON objects, each representing the result of the operation for each input item processed. For the "Expire At" operation, the output JSON contains:
key: The name of the key on which expiration was set.set: A boolean indicating whether the expiration was successfully set (true) or not (false).
Example output JSON:
{
"key": "myKey",
"set": true
}
No binary data output is produced by this operation.
Dependencies
- Requires a Redis server connection configured via credentials providing necessary authentication (e.g., API key or password).
- The node uses a Redis client library internally to communicate with the Redis instance.
- No additional environment variables are required beyond the Redis connection credentials.
Troubleshooting
Common issues:
- Invalid or unreachable Redis server: Ensure the Redis server address and credentials are correct and accessible from n8n.
- Incorrect timestamp format: The timestamp must be a valid Unix timestamp in seconds.
- Key does not exist: Setting expiration on a non-existent key will return
set: false.
Error messages:
- Connection errors: Indicate problems connecting to Redis; verify network and credentials.
- Invalid parameters: Errors thrown if required parameters like
keyortimestampare missing or invalid.
Resolution tips:
- Double-check all input parameters for correctness.
- Test Redis connectivity separately to confirm access.
- Use the node's "Continue On Fail" option to handle errors gracefully during batch processing.