redis-pro

Enhanced Redis node for n8n with professional features

Package Information

Downloads: 0 weeklyย /ย 12 monthly
Latest Version: 0.1.0
Author: Mohamad Abd Ulaziz

Documentation

n8n-nodes-redis-pro

n8n.io - Workflow Automation

This is an n8n community node that provides enhanced Redis functionality for your n8n workflows.

n8n is a fair-code licensed workflow automation platform.

Features

  • Connection Pooling: Choose between pooled (faster) or direct (safer) connection modes
  • Full Redis Operations: Get, Set, Delete, Increment, and more
  • List Operations: Push and Pop operations for Redis lists
  • Pub/Sub: Publish messages to Redis channels
  • Pattern Matching: Query keys using pattern matching
  • Multiple Data Types: Support for Strings, Hashes, Lists, and Sets
  • TTL Support: Set expiration times on keys
  • Flexible Authentication: Supports both user/password and password-only authentication
  • SSL/TLS Support: Secure connections with optional TLS verification control
  • Health Monitoring: Automatic reconnection and connection health checks (pooled mode)

Installation

Community Nodes (Recommended for Self-Hosted)

  1. Go to Settings โ†’ Community Nodes
  2. Select Install
  3. Enter n8n-nodes-redis-pro in the Enter npm package name field
  4. Select Install

After installation, the Redis Pro node will be available in your node palette.

Manual Installation

Navigate to your n8n installation directory and run:

npm install n8n-nodes-redis-pro

For Docker installations, add the following environment variable:

docker run -it --rm \
  --name n8n \
  -p 5678:5678 \
  -e N8N_CUSTOM_EXTENSIONS="/data/custom" \
  -v ~/.n8n:/home/node/.n8n \
  n8nio/n8n

Then install inside the container:

docker exec -it n8n npm install n8n-nodes-redis-pro

Credentials

To connect to Redis, you'll need to configure the Redis Pro credentials with the following information:

  • Host: The Redis server hostname (default: localhost)
  • Port: The Redis server port (default: 6379)
  • Password: Redis password (if required)
  • User: Redis username (optional, for ACL authentication)
  • Database Number: Redis database number (default: 0)
  • SSL: Enable SSL/TLS connection
  • Disable TLS Verification: Disable certificate verification for self-signed certificates (use with caution)

Configuration

Connection Mode

The node supports two connection modes:

Pooled (Reuse Connections) - Default, Recommended

  • โšก Faster: Reuses connections across multiple executions
  • ๐ŸŽฏ Efficient: Maintains connection pool for better performance
  • ๐Ÿ”„ Automatic Health Checks: Detects and removes dead connections
  • ๐Ÿ“Š Best for: High-frequency operations, production workloads
  • โš ๏ธ Note: Connections stay open until n8n restarts

Direct (New Connection Each Time)

  • ๐Ÿ›ก๏ธ Safer: Creates fresh connection for each execution
  • ๐Ÿงน Clean: Closes connection immediately after use
  • ๐Ÿ’พ Lower Memory: No persistent connections
  • ๐Ÿ“Š Best for: Occasional use, development, testing
  • โš ๏ธ Note: Slower due to connection overhead

How to Choose:

  • Use Pooled for production, workflows that run frequently (seconds/minutes apart)
  • Use Direct for workflows that run rarely (hours/days apart), or when you need guaranteed connection cleanup

Operations

Delete

Delete a key from Redis.

Parameters:

  • Key: Name of the key to delete

Get

Get the value of a key from Redis.

Parameters:

  • Name: Property name to store the retrieved value
  • Key: Name of the key to get
  • Key Type: Type of data (Automatic, String, Hash, List, Sets)
  • Options:
    • Dot Notation: Use dot notation for nested properties

Set

Set the value of a key in Redis.

Parameters:

  • Key: Name of the key to set
  • Value: The value to store
  • Key Type: Type of data to store (Automatic, String, Hash, List, Sets)
  • Value Is JSON: Whether the value is JSON (for Hash type)
  • Expire: Set TTL on the key
  • TTL: Time to live in seconds

Increment

Atomically increment a key by 1.

Parameters:

  • Key: Name of the key to increment
  • Expire: Set TTL on the key
  • TTL: Time to live in seconds

Info

Get information about the Redis instance.

Keys

Get all keys matching a pattern.

Parameters:

  • Key Pattern: Pattern to match (e.g., user:*)
  • Get Values: Whether to retrieve the values of matched keys

Publish

Publish a message to a Redis channel.

Parameters:

  • Channel: Channel name
  • Data: Message to publish

Push

Push data to a Redis list.

Parameters:

  • List: Name of the list
  • Data: Data to push
  • Tail: Push to the end of the list (RPUSH) instead of the beginning (LPUSH)

Pop

Pop data from a Redis list.

Parameters:

  • List: Name of the list
  • Name: Property name to store the popped value
  • Tail: Pop from the end of the list (RPOP) instead of the beginning (LPOP)
  • Options:
    • Dot Notation: Use dot notation for nested properties

Example Workflows

Caching API Responses

1. HTTP Request (Get data from API)
2. Redis Pro (Set: Cache the response with TTL)
3. ...later in the workflow...
4. Redis Pro (Get: Retrieve cached data)

Queue Processing

1. Webhook (Receive data)
2. Redis Pro (Push: Add to processing queue)
3. ...in another workflow...
4. Redis Pro (Pop: Get next item to process)

Pub/Sub Pattern

Publisher Workflow:
1. Schedule Trigger
2. Redis Pro (Publish: Send message to channel)

Subscriber Workflow:
1. Redis Trigger (Subscribe to channel)
2. Process the message

Development

Setup

# Clone the repository
git clone https://github.com/yourusername/n8n-nodes-redis-pro.git
cd n8n-nodes-redis-pro

# Install dependencies
npm install

# Build the node
npm run build

Building

npm run build

This compiles the TypeScript code and copies the icon files to the dist folder.

Testing Locally

To test the node in your local n8n installation:

# Link the node globally
npm link

# In your n8n installation directory
npm link n8n-nodes-redis-pro

# Start n8n
n8n start

Version History

0.1.0

  • Initial release
  • Support for all basic Redis operations
  • SSL/TLS support
  • Configurable connection pooling (pooled vs. direct modes)
  • Automatic health monitoring for pooled connections
  • Type-safe error handling

Compatibility

  • Requires n8n version 0.187.0 or above
  • Redis 4.0+ recommended

Resources

License

MIT

Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Join the n8n Community Forum

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.


Made with โค๏ธ for the n8n community

Discussion