redis-extended

Comprehensive Redis operations for n8n including key management, strings, hashes, lists, sets, and sorted sets

Package Information

Downloads: 33 weekly / 90 monthly
Latest Version: 1.1.0
Author: Redis Extended Node

Documentation

n8n-nodes-redis-extended

This is a comprehensive n8n community node that provides extensive Redis operations beyond the built-in Redis node.

Features

This node provides complete Redis functionality across all major data types and operations:

Key Management Operations

  • EXISTS: Check if one or multiple keys exist
  • TYPE: Get the data type of a key
  • RENAME: Rename a key
  • EXPIRE: Set key expiration in seconds
  • TTL: Get time to live for a key
  • PERSIST: Remove expiration from a key
  • SCAN: Safely iterate over keys with pattern matching

String Operations

  • GET: Get the value of a key (basic string retrieval)
  • SET: Set the value of a key (basic string storage with optional TTL)
  • DEL: Delete one or more keys
  • KEYS: Find keys matching a pattern
  • APPEND: Append value to a string
  • INCR/DECR: Increment/decrement a key by 1
  • INCRBY/DECRBY: Increment/decrement a key by specified amount
  • MGET: Get multiple keys at once
  • MSET: Set multiple key-value pairs at once

Hash Operations

  • HGET: Get field value(s) from a Redis hash (single, multiple, or all fields)
  • HSET: Set field value(s) in a Redis hash (single, multiple, or from JSON)
  • HDEL: Delete hash fields
  • HEXISTS: Check if hash field exists
  • HINCRBY: Increment hash field by integer
  • HKEYS: Get all hash field names
  • HVALS: Get all hash values
  • HLEN: Get number of fields in hash

List Operations

  • LLEN: Get list length
  • LRANGE: Get list elements in range
  • LINDEX: Get list element by index
  • LINSERT: Insert element in list (before/after pivot)
  • LTRIM: Trim list to specified range
  • LSET: Set list element by index

Set Operations

  • SADD: Add members to set
  • SREM: Remove members from set
  • SMEMBERS: Get all set members
  • SISMEMBER: Check if member exists in set
  • SCARD: Get set size
  • SPOP: Remove and return random set member(s)

Sorted Set (ZSET) Operations

  • ZADD: Add members with scores to sorted set
  • ZREM: Remove members from sorted set
  • ZRANGE: Get sorted set range by rank (with optional scores)
  • ZSCORE: Get member score in sorted set
  • ZCARD: Get sorted set size
  • ZRANK: Get member rank in sorted set

Installation

To use this node in your n8n instance:

  1. Install the package:

    npm install n8n-nodes-redis-extended
    
  2. Restart your n8n instance

  3. The "Redis Extended" node will be available in the node palette

Prerequisites

  • n8n version 0.174.0 or later
  • Redis server (any version supported by the redis npm package)
  • Redis credentials configured in n8n

Usage Examples

Key Management

Check if keys exist:

  • Operation: EXISTS
  • Key: user:123
  • Keys: user:123,user:456,user:789 (optional, for multiple keys)

Set expiration:

  • Operation: EXPIRE
  • Key: session:abc123
  • Seconds: 3600

String Operations

Increment counter:

  • Operation: INCRBY
  • Key: page_views
  • Amount: 5

Get multiple keys:

  • Operation: MGET
  • Keys: user:name,user:email,user:age

Hash Operations

Set user data from JSON:

  • Operation: HSET
  • Key: user:123
  • Set Mode: JSON Object
  • JSON Data: {"name": "John Doe", "email": "john@example.com", "age": 30}

Get specific hash fields:

  • Operation: HGET
  • Key: user:123
  • Get Mode: Multiple Fields
  • Fields: name,email

List Operations

Get list range:

  • Operation: LRANGE
  • Key: recent_orders
  • Start: 0
  • Stop: 9 (get first 10 items)

Set Operations

Add multiple members:

  • Operation: SADD
  • Key: user_tags
  • Members: premium,verified,active

Sorted Set Operations

Add scored members:

  • Operation: ZADD
  • Key: leaderboard
  • Score-Member Pairs: 100:player1,95:player2,87:player3

Get top players with scores:

  • Operation: ZRANGE
  • Key: leaderboard
  • Start: 0
  • Stop: 2
  • With Scores: true

Advanced Features

  • Dot Notation Support: Use dot notation for nested property names in output
  • Bulk Operations: Efficient multiple key/field operations
  • TTL Support: Set expiration on hash operations
  • Pattern Matching: Safe key iteration with SCAN
  • Error Handling: Comprehensive error handling with continue-on-fail support
  • Type Safety: Full TypeScript support with proper type definitions

Credentials

This node uses the same Redis credentials as the built-in Redis node. Configure your Redis connection in n8n's credentials section with:

  • Host
  • Port
  • Database
  • Username (optional)
  • Password (optional)
  • SSL/TLS (optional)

Performance Benefits

  • Direct Operations: No type detection overhead for specific operations
  • Bulk Processing: Multiple keys/fields in single operations
  • Safe Iteration: SCAN instead of KEYS for production use
  • Connection Pooling: Efficient Redis connection management

Use Cases

  • Session Management: Handle user sessions with TTL
  • Caching: Advanced cache operations with expiration
  • Counters & Analytics: Increment/decrement operations
  • Leaderboards: Sorted set operations for rankings
  • Tag Systems: Set operations for categorization
  • Queue Management: List operations for job queues
  • User Profiles: Hash operations for structured data

License

MIT

Version History

  • 1.1.0: Complete Redis operations including all basic operations (GET, SET, DEL, KEYS) and advanced data types
  • 1.0.0: Initial comprehensive Redis operations including all major data types and commands

Discussion