Ten Redis steps work with your own Redis server, one step for each command:

Step What it does
Get Reads the value kept under a key
Set Keeps a value under a key, for a time if you like
Delete Removes a key and what it holds
Increment Adds to the number kept under a key
Push to a list Adds a value to one end of a list
Pop from a list Takes the value off one end of a list
Get keys The keys that match a pattern
Publish Sends a message to everyone subscribed to a channel
Hash set Keeps a value in one field of a hash
Hash get Reads one field of a hash

In the step picker, Changes data marks Set, Increment, Push to a list, Pop from a list and Hash set; Deletes data marks Delete.

Who can do this

Workspace Admins and Editors, on every plan.

Before you start

A Redis connection in this workspace — see Connect Redis.

Steps

  1. Select +, then in Apps select Redis, or search Redis. Choose the step.
  2. Choose the Connection.
  3. Fill in the step. Keys, fields and values can hold {{ }} from earlier steps — order:{{ trigger.id }}:status:
    • Get, Delete — Key.
    • Set — Key, Value, and optional Expires after (seconds); empty never expires.
    • Increment — Key, and By — empty adds 1; a negative number takes away; a decimal works too.
    • Push to a list — List, Value, and Add to The end or The start.
    • Pop from a list — List, and Take from The start or The end. Push to the end and pop from the start makes a queue.
    • Get keys — Pattern (* matches anything; empty is every key) and Most keys, 1,000 unless you change it, up to 10,000.
    • Publish — Channel and Message.
    • Hash set — Key, Field and Value. Hash get — Key and Field.
  4. Select Run this step, then check Output.

Output

Step Fields
Get, Pop from a list key, value, found — false and no value when there is nothing there.
Hash get key, field, value, found
Set key, and expiresIn in seconds when it expires
Hash set key, field
Delete key, deleted — false when there was no such key.
Increment key, value — the number after adding.
Push to a list key, length — the list's length after adding.
Get keys count, keys, and note when cut: Only the first 1,000 keys are kept.
Publish channel, receivers — how many subscribers got it.

Good to know

  • Values are text. A list or object from an earlier step is kept as its JSON.
  • Nothing found is not a failure. Get, Pop and Hash get give found false; follow them with an If step to act on it.
  • Get keys never stops the server. It walks the keys a page at a time (SCAN), never with KEYS. On a cluster it asks every primary.
  • Delete takes one key as written. A pattern is not expanded — use Get keys first, then Delete for each.
  • 15 seconds to connect, 30 seconds for each command. Each step runs once per item.

If something goes wrong

What the run says Why What to do
Redis refused: WRONGTYPE … The key holds another kind of value — a list where a text value was expected. Use the step for that kind, or another key.
Redis refused: ERR value is not an integer … Increment found text that is not a number. Start the counter from a number, or use another key.
Expires after “…” is not a whole number of seconds. Expires after holds something else. Give seconds, such as 3600.
Key is empty when the step ran … The {{ }} in Key gave nothing. Check the earlier step gives the value.
Redis refused the password. … The connection's password stopped working. Reconnect on Connections.
Redis did not answer. … The server's firewall, port or encryption. See Connect Redis.