Redis
Read, write, delete, and count keys in a Redis instance, read and write hash fields, list keys by pattern, publish messages to channels, and inspect server information
This node signs in with a credential: Redis Connection. See Connect a credential.
Actions
Steps this node can perform. Add one from Add a step, then pick the action.
Delete Key
Delete a key from Redis
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Key to delete |
Output
Later steps use this data by picking this step in the $ picker. For example, deleted is $.<step ID>.output.deleted.
{
"deleted": false,
"deletedCount": 0,
"key": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
deleted | Yes / No | Whether the key existed and was removed |
deletedCount | Number | Number of keys removed (0 or 1) |
key | Text | The key that was deleted |
Get Value
Get the value of a key from Redis
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Key to read |
| Parse JSON | Yes / No | Decode the stored value as JSON and expose it as a structured object Default: false |
Output
Later steps use this data by picking this step in the $ picker. For example, found is $.<step ID>.output.found.
{
"found": false,
"key": "string",
"parsed": {},
"ttlSeconds": 0,
"value": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
found | Yes / No | Whether the key exists |
key | Text | The key that was read |
parsed | Object | The value decoded as JSON. Present only when Parse JSON is enabled and the value is valid JSON |
ttlSeconds | Number | Remaining time to live in seconds. -1 when the key has no expiry, -2 when the key does not exist |
value | Text | The raw string value stored at the key. Empty when the key does not exist |
Get Hash Field
Get the value of a single field in a Redis hash
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Hash key to read |
| Field | Text | Yes | Field to read |
| Parse JSON | Yes / No | Decode the stored field value as JSON and expose it as a structured object Default: false |
Output
Later steps use this data by picking this step in the $ picker. For example, field is $.<step ID>.output.field.
{
"field": "string",
"found": false,
"key": "string",
"parsed": {},
"value": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
field | Text | The field that was read |
found | Yes / No | Whether the field exists |
key | Text | The hash key that was read |
parsed | Object | The field value decoded as JSON. Present only when Parse JSON is enabled and the value is valid JSON |
value | Text | The raw string value stored at the field. Empty when the hash or the field does not exist |
Get Hash
Get every field and value of a Redis hash
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Hash key to read |
Output
Later steps use this data by picking this step in the $ picker. For example, count is $.<step ID>.output.count.
{
"count": 0,
"fields": {},
"found": false,
"key": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
count | Number | Number of fields returned |
fields | Object | Every field of the hash as field/value pairs. Empty when the hash does not exist |
found | Yes / No | Whether the hash exists |
key | Text | The hash key that was read |
Set Hash Field
Set the value of a single field in a Redis hash, creating the hash if it does not exist
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Hash key to write |
| Field | Text | Yes | Field to write |
| Value | Text | Yes | Value to store. Objects and arrays are stored as JSON |
| Expire After (seconds) | Number | Expire the whole hash after this many seconds. Leave 0 to keep the current expiry. Redis cannot expire a single field Default: 0 |
Output
Later steps use this data by picking this step in the $ picker. For example, created is $.<step ID>.output.created.
{
"created": false,
"field": "string",
"key": "string",
"success": false,
"ttlSeconds": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
created | Yes / No | True when the field was added, false when an existing field was overwritten |
field | Text | The field that was written |
key | Text | The hash key that was written |
success | Yes / No | Whether the field was written |
ttlSeconds | Number | Expiry applied to the hash in seconds. 0 means the expiry was left untouched |
Increment Key
Atomically increment a key by 1. Creates the key if it does not exist
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Key to increment. Must hold an integer value if it already exists |
Output
Later steps use this data by picking this step in the $ picker. For example, key is $.<step ID>.output.key.
{
"key": "string",
"value": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
key | Text | The key that was incremented |
value | Number | The value after the increment |
Get Server Info
Return generic information about the Redis instance
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Section | Choice | INFO section to return Options: All, Server, Clients, Memory, Persistence, Stats, Replication, CPU, KeyspaceDefault: all |
Output
Later steps use this data by picking this step in the $ picker. For example, info is $.<step ID>.output.info.
{
"info": {},
"raw": "string",
"section": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
info | Object | Parsed INFO output, grouped by section name |
raw | Text | Unparsed INFO output as returned by the server |
section | Text | The requested INFO section |
List Keys
Return the keys matching a pattern, filtered to a single Redis type so every result can be fed into the matching read action
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Pattern | Text | Yes | Glob-style pattern, for example user:* or *:session Default: * |
| Limit | Number | Maximum number of keys to return (1-10000). The result is marked as truncated when more keys match Default: 1000 | |
| Type | Choice | Redis type to list. String keys work with Get Value, hash keys with Get Hash Options: String, Hash, List, Set, Sorted Set, AnyDefault: string |
Output
Later steps use this data by picking this step in the $ picker. For example, count is $.<step ID>.output.count.
{
"count": 0,
"keys": [
"string"
],
"pattern": "string",
"truncated": false,
"type": "string"
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
count | Number | Number of keys returned |
keys[] | List | Matching string keys |
pattern | Text | The glob pattern that was matched |
truncated | Yes / No | True when more keys match the pattern than the configured limit |
type | Text | The Redis type the result was filtered to |
Publish Message
Publish a message to a Redis channel
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Channel | Text | Yes | Channel to publish to |
| Message | Text | Yes | Message payload. Objects and arrays are published as JSON |
Output
Later steps use this data by picking this step in the $ picker. For example, channel is $.<step ID>.output.channel.
{
"channel": "string",
"receivers": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
channel | Text | The channel the message was published to |
receivers | Number | Number of subscribers that received the message |
Set Value
Set the value of a key in Redis, with an optional expiry
Settings
| Field | Type | Required | Description |
|---|---|---|---|
| Key | Text | Yes | Key to write |
| Value | Text | Yes | Value to store. Objects and arrays are stored as JSON |
| Expire After (seconds) | Number | Expire the key after this many seconds. Leave 0 for no expiry Default: 0 | |
| Write Mode | Choice | When the value should be written Options: Always, Only If Not Exists, Only If ExistsDefault: always |
Output
Later steps use this data by picking this step in the $ picker. For example, key is $.<step ID>.output.key.
{
"key": "string",
"skipped": false,
"success": false,
"ttlSeconds": 0
}Example values show the shape of the data, not real values. See Using data from earlier steps.
Field descriptions
| Field | Type | Description |
|---|---|---|
key | Text | The key that was written |
skipped | Yes / No | True when the write condition (Only If Not Exists / Only If Exists) was not met, so nothing was written |
success | Yes / No | Whether the value was written |
ttlSeconds | Number | Expiry applied to the key in seconds. 0 means no expiry |