Actions36
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- Keys
- List Length
- List Range
- Multi Get
- 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
This node, named "Redis Enhanced," provides a comprehensive interface to interact with a Redis database. It supports a wide range of Redis operations including pushing and popping list elements, setting and getting keys, managing hashes, sets, sorted sets, and executing Lua scripts. The "Push" operation specifically allows users to add data to a Redis list either at the head or tail.
Common scenarios where this node is beneficial include:
- Managing queues or task lists by pushing messages or jobs into Redis lists.
- Implementing caching mechanisms by setting and retrieving key-value pairs.
- Performing atomic increments or conditional updates on keys.
- Executing custom Lua scripts for advanced Redis operations.
Practical example for the "Push" operation:
- You have a job queue stored as a Redis list named "jobQueue". Using this node, you can push new job data (e.g., JSON strings describing tasks) to the head or tail of the list, enabling efficient queue management.
Properties
| Name | Meaning |
|---|---|
| Value Is JSON | Whether the value is JSON or key-value pairs (only relevant when key type is hash). |
| List | Name of the Redis list to which data will be pushed. |
| Data | The actual data string to push onto the list. |
| Tail | Boolean indicating whether to push data to the end (tail) of the list (true) or to the start (head) (false). |
Output
The output is an array of items corresponding to each input item processed. For the "Push" operation, the output item is essentially the same as the input item, passed through without modification. This means the node does not return the result of the push command explicitly but confirms successful execution by forwarding the input data.
No binary data output is produced by 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 connect and execute commands.
Troubleshooting
- Connection issues: If the node cannot connect to Redis, verify that the Redis server is running, reachable from n8n, and that credentials are correct.
- Invalid list name or empty data: Ensure the "List" property is set and non-empty, and that "Data" contains valid string data.
- JSON parsing errors: When popping data (not push), if the data is expected to be JSON but is malformed, parsing will fail. For push, ensure data format matches expectations downstream.
- Permission errors: Make sure the Redis user has permissions to perform list push operations.
- Error messages: Errors thrown by Redis commands will be surfaced. Use the "Continue On Fail" option to handle errors gracefully within workflows.