Redis List Sugar icon

Redis List Sugar

Manage simple lists in Redis

Add Element

AI-generated

Summary

RPUSH one or more elements to the end of a Redis list.

Inputs

  • listId (required) — Redis key name for the list
  • value (required) — Data in YAML or JSON format. Supports a single object or an array of objects. If an array is provided, each object is added as a separate item to the Redis list. Only JSON objects are allowed.
  • ttl — Time to live for the whole list in seconds. 0 = do not change (or never expire if new). Note: Redis lists do not support TTL per element; this setting updates the expiration for the entire Redis key.
  • includeInputFields — Whether to copy all input data to the output. When enabled, the node result will be placed in a result field.

Output shape

Returns an array of executed items. Each item contains a result field with the Redis command output. If includeInputFields is true, the original input data is merged into the output under a result key.

The node parses value as YAML or JSON. If an array is detected, each element is RPUSHed individually. After the RPUSH, if ttl > 0 and the operation is add or update, the key's TTL is set via EXPIRE.

Examples

Example 1: Add a single JSON object to a Redis list

listId: myList, value: { a: 1 }, ttl: 0, includeInputFields: false

Example 2: Add an array of objects to a Redis list with TTL

listId: myList, value: [{ a: 1 }, { b: 2 }], ttl: 3600, includeInputFields: true

Discussion