Reference · Tools

Redis

Perform key-value data operations against an external Redis instance including get, set, delete, keys, increment, list push/pop, publish, and server info.

Action Data & Storage v1

The Redis node performs key-value operations against an external Redis instance: get, set, delete, keys, increment, list push and pop, publish, and server info. A typical build is maintaining a counter or a deduplication set across workflow runs, which workflow state alone cannot do.

Node type
Action
Parameters
27
Outputs
Output, Error
Credentials
Redis

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

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Redis credentials. See the Credentials Guide for setup instructions.

Operations

OperationValueDescription
DeletedeleteDelete a key from Redis
GetgetGet the value of a key from Redis
IncrementincrAtomically increments a key by 1. Creates the key if it does not exist.
InfoinfoReturns generic information about the Redis instance
KeyskeysReturns all the keys matching a pattern
List LengthllenReturns the length of a list
PoppopPop data from a Redis list
PublishpublishPublish message to Redis channel
PushpushPush data to a Redis list
SetsetSet 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)

ParameterTypeRequiredDefaultDescription
KeystringYesName of the key to delete from Redis. Supports expressions like {{ $json.userId }}.

Get (get)

ParameterTypeRequiredDefaultDescription
Property NamestringYespropertyNameName of the property to write received data to. Supports dot-notation. Example: “data.person[0].name”.
KeystringYesName of the key to get from Redis. Supports expressions like {{ $json.userId }}.
Key TypeoptionsNoautomaticThe type of the key to get.
Options: automatic (asks Redis for the type first, which costs an extra round trip), hash, list, sets, string
OptionscollectionNo{}Optional settings for how the value is written onto the output item.
— Dot NotationbooleanNotrueWhether 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 StringbooleanNofalseWhen true, return the raw string value without attempting JSON.parse.

Increment (incr)

ParameterTypeRequiredDefaultDescription
KeystringYesName of the key to increment. Supports expressions like {{ $json.userId }}.
ExpirebooleanNofalseWhether to set a timeout on the key.
TTLnumberNo60Number of seconds before key expiration. (shown when Expire is true)

Keys (keys)

ParameterTypeRequiredDefaultDescription
Key PatternstringYesThe key pattern for the keys to return (e.g., “user:*”). Supports expressions.
Get ValuesbooleanNotrueWhether to also fetch the value of each matching key.
Confirm Scan AllbooleanNofalseRequired to scan with pattern ”*” (all keys). Otherwise the operation is rejected as a safety measure.

List Length (llen)

ParameterTypeRequiredDefaultDescription
ListstringYesName of the list in Redis. Supports expressions.

Pop (pop)

ParameterTypeRequiredDefaultDescription
ListstringYesName of the list in Redis. Supports expressions.
TailbooleanNofalseWhether to push/pop data from the end of the list (RPUSH/RPOP) instead of the head (LPUSH/LPOP).
Property NamestringNopropertyNameName of the property to write the popped value to. Supports dot-notation. Example: “data.person[0].name”.
OptionscollectionNo{}Optional settings for how the popped value is written onto the output item.
— Dot NotationbooleanNotrueWhether 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 StringbooleanNofalseWhen true, return the raw string value without attempting JSON.parse.

Publish (publish)

ParameterTypeRequiredDefaultDescription
ChannelstringYesThe pub/sub channel name to publish to. Supports expressions.
DatastringYesData to publish to the channel. Supports expressions like {{ $json.message }}.

Push (push)

ParameterTypeRequiredDefaultDescription
ListstringYesName of the list in Redis. Supports expressions.
DatastringYesData to push to the list. Supports expressions like {{ $json.message }}.
TailbooleanNofalseWhether to push/pop data from the end of the list (RPUSH/RPOP) instead of the head (LPUSH/LPOP).

Set (set)

ParameterTypeRequiredDefaultDescription
KeystringYesName of the key to set in Redis. Supports expressions like {{ $json.userId }}.
ValuestringNoThe value to write in Redis. Supports expressions like {{ $json.payload }}.
Key TypeoptionsNoautomaticThe 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 JSONbooleanNotrueWhether the value is JSON or key-value pairs separated by spaces. (shown when Key Type is hash)
ExpirebooleanNofalseWhether to set a timeout on the key.
TTLnumberNo60Number of seconds before key expiration. (shown when Expire is true)

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum 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.

OperationOutput item JSON
delete, set, push, publishThe input item, unchanged — the operation is a side effect
getA new object holding only the value, under the name you gave in Property Name
popA new object holding only the popped value, under the name you gave in Property Name
incrA new object with a single property named after the key, holding the incremented number
llenA 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)
infoThe 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:

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

Delete a key:

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

Read a string value onto a named property:

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

Read a hash into a nested property:

{
  "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:

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

Find every key under a prefix, with its value:

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

Measure a queue:

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

Write a string with a 30-minute expiry:

{
  "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:

{
  "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:

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

Push onto the head of a list:

{
  "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:

{
  "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:

{
  "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:

{
  "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:

{
  "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:

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

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes 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.

Frequently asked questions

What is this useful for in a workflow?

State that has to outlive a single run — counters, deduplication sets, simple caches, or a rate-limit marker shared between workflows.

Can it publish to subscribers?

Yes, publish is supported, so a workflow can emit a message onto a channel that other systems are listening on.

Does it talk to the platform's own Redis?

No — it targets an external Redis instance you supply credentials for, which keeps workflow data separate from platform internals.

Which credential does it need?

A Redis credential with the connection details for your instance.

Build with the Redis node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Redis credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.