Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Set

AI-generated

Summary

Set a key's value in Redis with flexible handling of key types and conditional setting modes, optionally applying an expiration timeout.

Inputs

  • Key (required) — Name of the Redis key to set.
  • Value — The value to write for the key in Redis.
  • Key Type — Type of the key's data (automatic, hash, list, sets, string) to determine handling.
  • Value Is JSON — For 'hash' key type, whether the value is provided as a JSON string or key-value pairs.
  • Expire — Whether to set a timeout (expiration) on the key.
  • TTL — Number of seconds before the key expires; relevant only if Expire is true.
  • Set Mode — Controls when the key should be set: always, only if not exists (NX), or only if exists (XX); applicable for string and automatic key types.

Output shape

a single JSON object per input item indicating the Redis command result and including original input data.

Returns the result of the Redis set operation appended to each input item's JSON under the 'redis_result' property. The operation supports multiple input items processed individually. Errors can be handled according to node settings.

Discussion