<!-- BusyBot node reference — https://busybot.net/tools/redis-action/ -->

> Node: Redis (`redis_action`) · Action · v1
> Category: Data & Storage · Credentials: Redis (`redisActionApi`)
> Updated: 2026-08-16

# Redis

> Get, set, and manage data in an external Redis instance

## Overview

Connects to an external Redis instance — your own, separate from anything the platform runs — and performs key-value operations on it. String, hash, list and set data types are supported, with automatic type detection when you do not want to declare the type yourself. Operations include get, set, delete, key pattern search, atomic increment, list push/pop, list length, pub/sub publish and server info.

**Category:** Data & Storage  
**Tool Name:** `redis_action`  
**Version:** 1

**Appearance:** Icon: `si-redis` | Color: `#D82C20`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **Redis** credentials.
See the [Credentials Guide](https://busybot.net/credentials/redis-action-api/) for setup instructions.

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Delete | `delete` | Delete a key from Redis |
| Get | `get` | Get the value of a key from Redis |
| Increment | `incr` | Atomically increments a key by 1. Creates the key if it does not exist. |
| Info | `info` | Returns generic information about the Redis instance |
| Keys | `keys` | Returns all the keys matching a pattern |
| List Length | `llen` | Returns the length of a list |
| Pop | `pop` | Pop data from a Redis list |
| Publish | `publish` | Publish message to Redis channel |
| Push | `push` | Push data to a Redis list |
| Set | `set` | Set the value of a key in Redis. WARNING: setting a list replaces it entirely (DEL + RPUSH). To append, use a separate push operation. |

### Parameters

`Info` takes no parameters of its own — see All Operations.

`Value Is JSON` is gated on Key Type rather than on the operation, so it appears whenever Key Type is `hash`. It governs how Set writes the hash.

#### Delete (`delete`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Key | `string` | Yes | — | Name of the key to delete from Redis. Supports expressions like {{ $json.userId }}. |

#### Get (`get`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Property Name | `string` | Yes | `propertyName` | Name of the property to write received data to. Supports dot-notation. Example: "data.person[0].name". |
| Key | `string` | Yes | — | Name of the key to get from Redis. Supports expressions like {{ $json.userId }}. |
| Key Type | `options` | No | `automatic` | The type of the key to get. |
| | | | | Options: `automatic` (asks Redis for the type first, which costs an extra round trip), `hash`, `list`, `sets`, `string` |
| Options | `collection` | No | `{}` | Optional settings for how the value is written onto the output item. |
| — Dot Notation | `boolean` | No | `true` | Whether to use dot-notation in property names. When true, "a.b" sets property "b" underneath "a" so { "a": { "b": value } }. When false, sets { "a.b": value } instead. |
| — Keep As String | `boolean` | No | `false` | When true, return the raw string value without attempting JSON.parse. |

#### Increment (`incr`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Key | `string` | Yes | — | Name of the key to increment. Supports expressions like {{ $json.userId }}. |
| Expire | `boolean` | No | `false` | Whether to set a timeout on the key. |
| TTL | `number` | No | `60` | Number of seconds before key expiration. _(shown when Expire is `true`)_ |

#### Keys (`keys`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Key Pattern | `string` | Yes | — | The key pattern for the keys to return (e.g., "user:*"). Supports expressions. |
| Get Values | `boolean` | No | `true` | Whether to also fetch the value of each matching key. |
| Confirm Scan All | `boolean` | No | `false` | Required to scan with pattern "*" (all keys). Otherwise the operation is rejected as a safety measure. |

#### List Length (`llen`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| List | `string` | Yes | — | Name of the list in Redis. Supports expressions. |

#### Pop (`pop`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| List | `string` | Yes | — | Name of the list in Redis. Supports expressions. |
| Tail | `boolean` | No | `false` | Whether to push/pop data from the end of the list (RPUSH/RPOP) instead of the head (LPUSH/LPOP). |
| Property Name | `string` | No | `propertyName` | Name of the property to write the popped value to. Supports dot-notation. Example: "data.person[0].name". |
| Options | `collection` | No | `{}` | Optional settings for how the popped value is written onto the output item. |
| — Dot Notation | `boolean` | No | `true` | Whether to use dot-notation in property names. When true, "a.b" sets property "b" underneath "a" so { "a": { "b": value } }. When false, sets { "a.b": value } instead. |
| — Keep As String | `boolean` | No | `false` | When true, return the raw string value without attempting JSON.parse. |

#### Publish (`publish`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Channel | `string` | Yes | — | The pub/sub channel name to publish to. Supports expressions. |
| Data | `string` | Yes | — | Data to publish to the channel. Supports expressions like {{ $json.message }}. |

#### Push (`push`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| List | `string` | Yes | — | Name of the list in Redis. Supports expressions. |
| Data | `string` | Yes | — | Data to push to the list. Supports expressions like {{ $json.message }}. |
| Tail | `boolean` | No | `false` | Whether to push/pop data from the end of the list (RPUSH/RPOP) instead of the head (LPUSH/LPOP). |

#### Set (`set`)

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Key | `string` | Yes | — | Name of the key to set in Redis. Supports expressions like {{ $json.userId }}. |
| Value | `string` | No | — | The value to write in Redis. Supports expressions like {{ $json.payload }}. |
| Key Type | `options` | No | `automatic` | The type of the key to set. |
| | | | | Options: `automatic` (infers the type from the value — text becomes a string, an array a list, an object a hash), `hash`, `list`, `sets`, `string` |
| Value Is JSON | `boolean` | No | `true` | Whether the value is JSON or key-value pairs separated by spaces. _(shown when Key Type is `hash`)_ |
| Expire | `boolean` | No | `false` | Whether to set a timeout on the key. |
| TTL | `number` | No | `60` | Number of seconds before key expiration. _(shown when Expire is `true`)_ |

#### All Operations

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

Every operation produces **exactly one output item per input item** — nothing fans out, even when a key pattern matches thousands of keys. Binary data on the input item is forwarded untouched.

What happens to the item JSON depends on the operation, and this is the part worth reading before you build the rest of the pipeline: the write operations pass your item through, while the read operations **replace** it with the result.

| Operation | Output item JSON |
|-----------|------------------|
| `delete`, `set`, `push`, `publish` | The input item, unchanged — the operation is a side effect |
| `get` | A new object holding only the value, under the name you gave in Property Name |
| `pop` | A new object holding only the popped value, under the name you gave in Property Name |
| `incr` | A new object with a single property named after the key, holding the incremented number |
| `llen` | A new object with a single property named after the list, holding its length |
| `keys` (Get Values off) | `keys` — an array of the matching key names |
| `keys` (Get Values on) | A new object with one property per matching key, holding that key's value (`null` for keys that vanished mid-scan) |
| `info` | The Redis server INFO, parsed into an object of fields such as `redis_version`, `connected_clients` and `used_memory` |

Notes on the read operations:

- **Get and Pop discard the rest of the item.** If you need the incoming fields downstream, capture them before this node or merge them back afterwards.
- **String values are parsed as JSON when they look like JSON**, so a round-tripped object comes back as an object rather than a string. Turn on Keep As String to get the raw text instead.
- **Dot Notation builds nested objects.** With it on (the default), a Property Name of `data.result` produces `{ "data": { "result": … } }`; with it off you get a single flat property literally called `data.result`.
- **Key names come back as property names** for `incr`, `llen` and `keys` with values, so the shape of the output depends on the key you asked for. Address them with bracket syntax when they contain colons, e.g. `{{ $json['user:123'] }}`.

## Usage Examples

- Get the value of a key from Redis
- Set a string key with expiration
- Delete a key from Redis
- Increment a counter atomically
- Search for keys matching a pattern
- Push data onto a Redis list
- Pop data from a Redis list
- Publish a message to a Redis channel
- Get Redis server info

## Example Configuration

Read the server's INFO:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "info",
    "maxConcurrency": 10
  }
}
```

Delete a key:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "delete",
    "key": "user:123",
    "maxConcurrency": 10
  }
}
```

Read a string value onto a named property:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "get",
    "key": "user:name",
    "propertyName": "userName",
    "keyType": "string",
    "maxConcurrency": 10
  }
}
```

Read a hash into a nested property:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "get",
    "key": "user:profile",
    "propertyName": "data.userProfile",
    "keyType": "hash",
    "options": {
      "dotNotation": true
    },
    "maxConcurrency": 10
  }
}
```

Increment a counter and give it an hour to live:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "incr",
    "key": "counter:visits",
    "expire": true,
    "ttl": 3600,
    "maxConcurrency": 10
  }
}
```

Find every key under a prefix, with its value:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "keys",
    "keyPattern": "user:*",
    "getValues": true,
    "maxConcurrency": 10
  }
}
```

Measure a queue:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "llen",
    "list": "messages:queue",
    "maxConcurrency": 10
  }
}
```

Write a string with a 30-minute expiry:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "set",
    "key": "session:token",
    "value": "abc123xyz",
    "keyType": "string",
    "expire": true,
    "ttl": 1800,
    "maxConcurrency": 10
  }
}
```

Write a hash from a JSON string:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "set",
    "key": "user:profile:456",
    "value": "{\"name\": \"John\", \"age\": 30}",
    "keyType": "hash",
    "valueIsJSON": true,
    "maxConcurrency": 10
  }
}
```

Publish to a channel:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "publish",
    "channel": "notifications",
    "messageData": "New user registered",
    "maxConcurrency": 10
  }
}
```

Push onto the head of a list:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "push",
    "list": "tasks:pending",
    "messageData": "Process order #123",
    "tail": false,
    "maxConcurrency": 10
  }
}
```

Pop from the tail of a list into a nested property:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "pop",
    "list": "results:completed",
    "propertyName": "data.result",
    "tail": true,
    "options": {
      "dotNotation": true
    },
    "maxConcurrency": 10
  }
}
```

**Cache management.** Use `set` with a TTL for temporary caching and `get` for retrieval:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "set",
    "key": "cache:user:123",
    "value": "{\"name\": \"Alice\", \"role\": \"admin\"}",
    "keyType": "string",
    "expire": true,
    "ttl": 300,
    "maxConcurrency": 10
  }
}
```

**Counter operations.** Use `incr` for atomic counters with optional expiration:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "incr",
    "key": "api:calls:daily",
    "expire": true,
    "ttl": 86400,
    "maxConcurrency": 10
  }
}
```

**Queue processing.** Combine `push` and `pop` for queue-like behavior:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "pop",
    "list": "work:queue",
    "propertyName": "currentTask",
    "tail": false,
    "maxConcurrency": 5
  }
}
```

**Bulk operations.** Use `keys` with pattern matching to find multiple related keys:

```json
{
  "type": "redis_action",
  "parameters": {
    "operation": "keys",
    "keyPattern": "session:*",
    "getValues": false,
    "maxConcurrency": 50
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Perform key-value operations (get, set, delete, keys, incr, push, pop, publish, info) against an external Redis instance.
</content>