On this page
Sommatic Docs
Open portal

Redis - Command

Execute commands on a Redis key-value store.

View as Markdown
Open in
Integrations Available integrations.redis.command Version 1.0.0 Execution: async

Sends one raw Redis command (GET, SET, HGET, LPUSH, DEL…) with its arguments and returns the Redis reply under result.

Connect your Redis instance and automate cache and data operations. Send any Redis command with arguments — from simple key-value reads to complex data structure manipulation.

Operations:

  • GET / SET / MGET / MSET: Read and write string values, bulk operations.
  • HGET / HSET / HGETALL: Work with hash maps (field-value pairs).
  • LPUSH / RPUSH / LPOP / LRANGE: Manage ordered lists.
  • SADD / SMEMBERS / SINTER: Work with sets and intersections.
  • ZADD / ZRANGE / ZRANGEBYSCORE: Sorted sets with scoring.
  • DEL / EXISTS / TTL / EXPIRE: Key lifecycle and expiration management.
  • INCR / DECR: Atomic counters.
  • PUBLISH: Publish messages to channels.

How it works

  1. Resolves the expressions of the node config. Empty connection_id and command fall back to the incoming item; args falls back when it is missing or an empty array.
  2. Resolves the connection: a redis:// URL in connection_id, a connection-string credential (any URL the client accepts, including rediss://), or a basic-auth / object credential with host, port (default 6379) and optional password.
  3. Upper-cases command, drops null / undefined arguments, converts the rest with String() and sends the command as is.
  4. Disconnects and returns { result } on out with the reply: a string, a number, null or an array, depending on the command.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-cache-order",
  "label": "Read cached order",
  "operator_slug": "integrations.redis.command",
  "operator_version": "1.0.0",
  "config": {
    "connection_id": "pi-credential-xxxx",
    "command": "GET",
    "args": [
      "order:{{ $json.order_id }}"
    ]
  }
}

Configuration

connection_id string Required

Credential for your Redis instance. Accepts credentials of type `connection-string` (redis:// URI) or `basic-auth` (password + host + port).

command string Required Accepts expressions

Redis command to execute (e.g., GET, SET, HGET, LPUSH, DEL).

args array Optional

Command arguments (e.g., key, value, field name).

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

args
Every argument is converted with String(): an object becomes [object Object]. Serialize JSON values to a string before passing them.
connection_id
A structured credential builds a plain redis:// URL without TLS and without a username. For TLS or ACL users, store the full URL as a connection-string credential.

Output ports

out default

Redis replied. A GET on a missing key also leaves here, with result: null.

Data
{
  "result": "{\"status\":\"open\",\"total\":129.99}"
}
error

Validation, credential resolution, the connection or the command failed.

Data
{
  "error": "WRONGTYPE Operation against a key holding the wrong kind of value"
}

In expressions

What a later node can read from this node's output with $("Redis - Command").item.json.<path> (write your node's label instead of Redis - Command). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("Redis - Command").item.json.resultobject= "{\"status\":\"open\",\"total\":129.99}"Redis command response

Errors

Message Port Cause and fix
connection_id is required error No credential in the config or in the incoming item.
command is required error command is empty.
Credential <connection_id> (type '<type>') missing host error A structured credential lacks host.
ERR <Redis error message> error Redis rejected the command (unknown command, wrong number of arguments…); the message is passed through.

Input contract

connection_id string Required
command string Required
args array Optional

Output contract

result object Optional

Redis command response

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "integrations.redis.command",
  "name": "Redis - Command",
  "category": "integrations",
  "version": "1.0.0",
  "description": "Execute commands on a Redis key-value store.\n\n  Connect your Redis instance and automate cache and data operations. Send any Redis command with arguments — from simple key-value reads to complex data structure manipulation.\n\n  **Operations:**\n  - **GET / SET / MGET / MSET:** Read and write string values, bulk operations.\n  - **HGET / HSET / HGETALL:** Work with hash maps (field-value pairs).\n  - **LPUSH / RPUSH / LPOP / LRANGE:** Manage ordered lists.\n  - **SADD / SMEMBERS / SINTER:** Work with sets and intersections.\n  - **ZADD / ZRANGE / ZRANGEBYSCORE:** Sorted sets with scoring.\n  - **DEL / EXISTS / TTL / EXPIRE:** Key lifecycle and expiration management.\n  - **INCR / DECR:** Atomic counters.\n  - **PUBLISH:** Publish messages to channels.",
  "capabilities": [
    "kv",
    "cache",
    "redis",
    "database"
  ],
  "group": [
    {
      "key": "redis",
      "name": "Redis",
      "icon_url": "/icons/integrations/redis/redis.svg"
    }
  ],
  "icon_url": "/icons/integrations/redis/redis.svg",
  "config_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string",
        "title": "Redis Credential",
        "description": "Credential for your Redis instance. Accepts credentials of type `connection-string` (redis:// URI) or `basic-auth` (password + host + port).",
        "ui_widget": "connection_picker",
        "ui_options": {
          "credential_types": [
            "connection-string",
            "basic-auth"
          ],
          "types": [
            "redis"
          ]
        }
      },
      "command": {
        "type": "string",
        "title": "Command",
        "description": "Redis command to execute (e.g., GET, SET, HGET, LPUSH, DEL).",
        "format": "expression"
      },
      "args": {
        "type": "array",
        "title": "Arguments",
        "description": "Command arguments (e.g., key, value, field name)."
      }
    },
    "required": [
      "connection_id",
      "command"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string"
      },
      "command": {
        "type": "string"
      },
      "args": {
        "type": "array"
      }
    },
    "required": [
      "connection_id",
      "command"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "result": {
        "type": "object",
        "description": "Redis command response"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Result",
      "description": "Command result",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "Command execution error",
      "is_default": false,
      "supports_condition": false
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "standard-io",
    "fast-io"
  ],
  "tags": [
    "cache",
    "kv"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_sommatic_ai",
    "profile": {
      "name": "Sommatic AI",
      "verified": true,
      "url": "https://sommatic.ai",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Credentials
Resolved on the server from connection_id; the secret never reaches the workflow.
Capabilities
kvcacheredisdatabase
Tags
cachekv

Notes and limits

  • A new connection is opened and closed on every run; the node does not retry. Non-idempotent commands such as INCR or LPUSH run exactly once per execution.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs