Connect a Redis® database once, and your flows can read and write keys (with an expiry if you want one), work with hashes, lists, sets and streams, start when a stream gets a new entry, and let an AI node use only the keys you choose. It can also keep an AI node's memory and a vector store. Valkey works the same way.
HostWebhook can do whatever the Redis user can.
If your server has ACL users, give it one of its own, with only what your flow needs (see step 01).
Connect your database
In HostWebhook, click Settings in the left sidebar, then Credentials, and start a new credential. Choose the Redis credential type and give it a name.
- Marker 1: Host and Port: your database's address, like
eu1-able-cat-12345.upstash.io, and its port (6379 by default). - Marker 2: Username: optional. Empty means
default, what Upstash and Redis Cloud give you. - Marker 3: TLS: Required encrypts the connection and checks the certificate. Upstash always uses TLS.
Fill in Password: it's encrypted, and it comes back to the panel only in Edit keys and settings, after you verify it's you, and only for a person who can see it. A database with no password can leave it empty, and you get a warning. Database number is 0 by default, and it's the only one that Upstash and Redis Cloud have.
| Where it lives | What to choose |
|---|---|
| Upstash | TLS Required: Upstash always uses TLS and you can't turn it off. Leave Username empty unless you made ACL users, which come with its paid databases |
| Redis Cloud | The free plan has no TLS, and HostWebhook only connects without TLS through a tunnel (step 02), so use a plan with TLS. Leave Username empty unless you made an ACL user |
| Amazon ElastiCache (Redis OSS or Valkey) | A cache can only be reached from inside its VPC, so use a tunnel (step 02). It works with users (RBAC), and serverless caches only accept them |
| Valkey | The same fields as any other: host, port, user, password and the TLS your server has |
CA certificate is optional. If the certificate can't be checked, paste the PEM your provider gives you, as text (not a file path). Under TLS, Off only works through a tunnel (step 02): without one it's refused, because your password and data would cross the internet in the clear.
If your provider only lets in some addresses, add the IP the form shows for your allowlist.
Click Save Redis connection, then open the credential and click Test connection. It answers with one line, like Redis server 7.2.4 · TLS · user default (or Valkey server 8.0.1 · TLS · user default).
A Redis Cluster isn't supported yet: when the server sends a step to another node of a cluster, the step stops with Redis Cluster isn't supported yet. Use a single endpoint, e.g. ElastiCache with cluster mode off. Sentinel isn't supported either.
Give HostWebhook a Redis user of its own
ACL users need server version 6 or newer. Redis Cloud and ElastiCache (with RBAC) have them, and Upstash has them on its paid databases. For a flow that reads and writes the keys that start with cart: and the key orders, and publishes to notifications:
ACL SETUSER hostwebhook reset on >CHANGE-ME-to-a-long-random-password ~cart:* ~orders resetchannels ¬ifications +@read +@write +publish -@dangerous -@scripting +ping +hello +select
reset goes first because ACL SETUSER on a user that already exists only adds rules: it would keep the permissions the user had. resetchannels goes before the channel because, in Redis 6.2, a new user can use every channel until you reset them, and ¬ifications gives an error. Channels need version 6.2 or newer: on 6.0 leave out resetchannels and ¬ifications. PUBLISH isn't part of @write, so it has its own +publish: leave it out, with ¬ifications, if no flow publishes. -@dangerous takes away FLUSHALL, CONFIG, KEYS and DEBUG, and -@scripting takes away the functions that @write lets through (FUNCTION LOAD, FUNCTION DELETE, FUNCTION FLUSH, FUNCTION RESTORE) and the scripts themselves (EVAL, FCALL and their _RO forms). Test connection sends only PING, HELLO (to read the server version) and, if Database number isn't 0, SELECT: that is what +ping +hello +select are for, and they come after -@dangerous and -@scripting on purpose, so no rule takes them away. A trigger only needs +xread +xrevrange +xinfo +type on its stream, plus +select if Database number isn't 0, and +ping if you want to test the connection with that user. Never give the user +@admin or +@dangerous: they include FLUSHALL, CONFIG, KEYS and DEBUG. On a managed service, create the user where your provider does it and give it the same rules.
Without ACL users (a free plan, say), the user can do everything, and the prefixes in step 07 are the only limit for an AI node.
Paste a URL instead
Click Paste a URL instead and paste a URL like rediss://default:password@eu1-able-cat-12345.upstash.io:6379. HostWebhook reads the host, port, user, password and database number from it, and refuses anything else. A rediss:// URL (two s) sets Required. For a plain redis:// URL, choose TLS yourself after pasting. A URL that carries a parameter after a ?, like ?host=, ?tls= or ?path=, is refused, naming the parameter: use the form for those.
Reach a private Redis server (optional)
OptionalHostWebhook only connects to public hosts: localhost and private addresses are refused. For a Redis server on your own network, run the tunnel agent next to it and leave it running:
npm install -g hostwh hostwh login hostwh expose-tcp --target localhost:6379 --id my-redis
For Amazon ElastiCache, a cache can only be reached from inside its VPC, so run the agent on a machine inside that VPC and point --target to the cache's own address and port:
hostwh expose-tcp --target your-cache-address:6379 --id my-elasticache
- Marker 1: How do we reach it: pick your tunnel. It has to say ONLINE.
- Marker 2: There's no IP to allow: your agent connects from inside your network.
- Marker 3: Host and Port: the ones of your agent's
--target, usuallylocalhostand6379.
Fill in Username (if your server has users) and Password as you would without a tunnel: the tunnel moves the bytes, it doesn't log you in. Under TLS, choose Off: the tunnel already encrypts the connection. If your server only accepts TLS (ElastiCache asks for it when you use a password), choose Required and paste the CA instead: the certificate is checked against the Host you type, so use the name the certificate carries (for ElastiCache, its endpoint) as your agent's --target and as the Host, not localhost.
Adding, changing or removing the tunnel asks for the password again.
Read and write keys
In Flows, add a Redis node and open it. Pick your credential under Redis connection, choose Single operation under Mode, and open Operation. These are the ones for plain keys:
| Operation | What it does |
|---|---|
| Get value | The value of a key, or null if it doesn't exist, with its type |
| Set value | Writes a value, with an expiry if you want one, and can leave a key alone if it's already there |
| Delete keys | Deletes one key or a list of keys, and gives back how many it deleted |
| Set expiry | Sets the seconds until a key is deleted, or makes it never expire |
| Get expiry | The seconds a key has left: -1 means it never expires and -2 that it doesn't exist |
| Increment | Adds a number, whole or decimal, to a key and gives back the new value |
| Get many | The values of up to 1,000 keys at once |
| Find keys | The keys that start with a prefix, up to 1,000 |
Get value is the one to start with. Run it with a key you know, to see what's there. A key takes a template: cart:{{payload.userId}} uses a value from the event. Browse lists the keys that start with a prefix, so you can pick one as an example.
Set value writes a key. Add Expire after and the key deletes itself.
- Marker 1: Key: the key to write, with a value from the event, like
cart:{{payload.userId}}. - Marker 2: Value: text. An object is saved as JSON.
- Marker 3: Expire after: seconds until it's deleted, e.g. 3600 means one hour. Empty means never.
- Marker 4: Only if: Always overwrites. Only if new keeps what's there, e.g. for a lock.
For a cache, always set Expire after, so old values don't pile up. Overwriting a key replaces its expiry too: leave Expire after empty and the key stops expiring, unless you turn on Keep the current expiry. For a counter per window, use Increment with Expire after, only when created: the countdown starts when the counter is created and doesn't restart with every increment (it works on any server version).
Values are text. Get value gives back an object if you turn on Parse JSON, and a value that isn't valid text comes back as base64, marked "encoding": "base64". Get many, Find keys and the lists, sets and streams in step 04 give back up to 1,000 items, and the output says when it cut something, like "truncated": true after Find keys.
The node after it can use what the operation gives back, like the value of Get value.
Set, Delete, Increment and the other operations that write change your data.
Run really writes or deletes. Delete keys, Delete hash fields, Pop from list and Remove from set delete for real, and Publish reaches other systems and can't be taken back. Try a read first, like Get value or Find keys, to see what a key holds.
Work with hashes, lists, sets and streams
A hash is one key with several named fields, like user:42 with name, plan and country. Get hash gives them back as an object. Leave Fields empty to get them all.
- Marker 1: Key: the hash to read, like
user:42. - Marker 2: Fields (optional): only these. Empty means all of them.
- Marker 3: The output: the fields of the hash as an object under
hash, like{"name": "Ana", "plan": "pro"}, with itssize.
If a key has a different type than the operation expects, the node says what it is and which operation to use, like cart:42 is a hash, not text. Use Get hash.
The rest of the node works the same way:
| Operation | What it does |
|---|---|
| Set hash fields | Writes the fields you give and leaves the others as they are |
| Delete hash fields | Deletes the fields you list from a hash |
| Increment hash field | Adds a number to one field and gives back the new value |
| Push to list | Adds values at the start or the end of a list, and gives back its length |
| Pop from list | Takes items off the start or the end of a list: they leave it |
| Get list | A range of a list, up to 1,000 items, and its length |
| Add to set | Adds members to a set |
| Remove from set | Takes members out of a set |
| Get set | The members of a set, up to 1,000 |
| Check members | Which of the members you give are in a set |
| Publish | Sends a message to a channel, and gives back how many received it |
| Add to stream | Adds an entry to a stream, and gives back its id. Keep at most keeps the stream to about that many entries |
| Read stream | The entries between two ids, up to 1,000 |
Publish only reaches the clients that are listening right now. Use Add to stream to keep a message: a trigger can start a flow from a stream (step 05).
There's no operation that runs a command you type yourself.
Start a flow when a stream gets an entry
A Redis stream can also start a flow. Add a Trigger node, choose the Redis service, pick your credential and the Stream: the list shows the keys of the type stream.
- Marker 1: Stream: the stream to watch, like
orders. - Marker 2: How often it checks, how many entries it takes at a time and how many of the latest ones fire when you activate.
- Marker 3: Ignore changes made by this flow: on, so the entries your own flow adds don't start it again. The line below counts the ones it skipped.
| Setting | What it does |
|---|---|
| Stream | The key of the stream to watch |
| Check every, in seconds | How often HostWebhook checks for new entries: 300 (every 5 minutes) by default, and not under 60. Your plan sets the minimum: every minute on the paid plans, every 15 minutes on Free |
| Entries per check | The most entries one check takes, from 1 to 500 |
| Start with the last entries | How many of the latest entries fire when you activate, from 0 to 500. With 0, only the entries that arrive afterwards fire |
| Ignore changes made by this flow | On by default: the entries added by this flow's Redis nodes don't fire it again |
When everything is set, click Activate. A trigger needs at least one connected node. Activating adds nothing to your database: HostWebhook only reads the stream, so a user that can only read is enough. It remembers the last entry it saw, checks for new ones every Check every, and starts the flow once for each new entry. The entries that were already there don't fire it, unless you set Start with the last entries.
Test push shows the latest entries (up to 10) it would pick up. Nothing is sent and your flow doesn't run.
A restart or a deploy of HostWebhook loses nothing: it carries on from the last entry it saw. If it stops in the exact moment between starting the flows of a batch and saving where it was, that batch can fire twice.
Entries removed before HostWebhook reads them are lost.
An entry stays in a stream until something trims it (MAXLEN, MINID or XDEL). Once an hour HostWebhook checks whether that happened, on servers of version 7 or newer, and the trigger warns you: Some entries were removed from orders before HostWebhook read them. If you trim a stream, keep it long enough for a check to come first.
If the key doesn't exist yet, the trigger waits: the first XADD creates it. If the key is of another type, the trigger pauses and says so.
What it costs in commands. Each check is normally one command (a bit more when many entries arrive), plus one more an hour. At the default of 5 minutes that's about 9,400 commands a month. Upstash's free database includes 500,000 a month and charges per command after that, so a trigger at the default stays far inside it.
Why there is no trigger for Pub/Sub, and how to react to a channel
Pub/Sub delivers a message at most once: if nobody is listening when it's published, it's gone for good. A trigger would need an open connection to your server, always, and every deploy of HostWebhook cuts it: everything published in the meantime would be lost without a trace.
Keyspace notifications don't work either. They're off by default, so turning them on means changing your server's configuration. They only tell you the name of the key and the event, not the value. And the notice for an expired key arrives when the key is actually deleted, not when its time runs out.
To react to your events in HostWebhook, add them to a stream with XADD instead of publishing them. The stream keeps every entry until you trim it, so nothing is lost if HostWebhook is busy. Where your app runs:
PUBLISH orders "order 1042 paid"
use this instead, and trigger on the orders stream:
XADD orders * message "order 1042 paid"
A flow can do the same with Add to stream, with orders as the Key and message as a field.
Only streams start a flow.
A list used as a queue doesn't: reading an item takes it out of the list, which would clash with the other consumers of your queue.
Use what arrives
Everything the trigger sends is in payload, so the nodes after it can use it from the start:
{
"stream": "orders",
"id": "1730688000000-0",
"timestamp": "2024-11-04T02:40:00.000Z",
"fields": { "orderId": "1042", "status": "new", "total": "59.97" }
}stream is the key of the stream. id is the id of the entry, and timestamp is the time it carries (when the entry was added). fields has what was added with XADD, as text, so 59.97 arrives as "59.97". Use the fields like {{payload.fields.status}}. The most common flow is a Redis node after the trigger: Set value with the key order:{{payload.fields.orderId}} and Expire after 86400, to keep a copy of the order for a day.
Another credential or another app can start the flow again.
Ignore changes made by this flow covers Add to stream with the same credential only. An entry added by your app, or by a flow that uses another credential for the same database, fires the trigger. A flow that adds to the stream that starts it would start itself over and over: keep the switch on.
Let an AI node use your Redis keys (optional)
OptionalIn step 03, choose AI toolkit instead of Single operation. The node has 14 tools, such as get_redis_value and set_redis_value, and six of them start blocked. Add the tools you want to an AI node from its Tools: Add Tool, then From Workspace.
- Marker 1: Keys the AI can use: one prefix per line, like
cart:. Empty means the AI can't use any. - Marker 2: Channels the AI can publish to: one channel per line, like
notifications. Empty means none. They only matter once you turn onpublish_redis_message. - Marker 3: 6 of 14 blocked: a blocked tool can't be used here by any AI node or MCP server.
Every key of every call has to start with one of the prefixes, and HostWebhook checks it before it connects. A prefix is plain text: a * in it means a star, not "anything". The AI is told which prefixes and channels it can use, so it doesn't have to guess, and when it tries a key outside them the refusal names them.
Six tools start blocked.
delete_redis_keys, delete_redis_hash_fields, pop_redis_list_items, remove_redis_set_members, expire_redis_keys and publish_redis_message. They delete, or can't be undone: publish_redis_message reaches other systems and can't be taken back. Turn one on only if the agent should do that. set_redis_value, set_redis_hash_fields and increment_redis_value stay on: they overwrite, but that's what a cache or a counter does. If the AI node's warning for destructive tools is on, it stops those three before they run.
The AI gets up to 200 items per read, with the type and the expiry of each key. The values in your database can say anything, because your app's users write them, so a model can still be fooled by them, even though they are data, not instructions: block the tools it doesn't need.
Without ACL users, the prefixes are the only limit.
On a plan that has no ACL users (a free plan, say), nothing else stops the AI from using what the prefixes allow. Choose them with care, and block what it doesn't need.
If a flow uses AI (the AI node, Hermes or Claude), the values it reads or changes go to that AI.
Remember conversations in your Redis database (optional)
OptionalAn AI node's memory lives in HostWebhook's storage by default. It can live in your Redis database instead: each conversation is one list of its latest turns (what the person said and the answer), kept for as long as you choose, and nothing is sent to an embeddings provider. Open the AI node, go to its Memory tab, turn Memory on and choose Redis database.
- Marker 1: Redis connection: the credential of step 01.
- Marker 2: Key prefix: fixed text that ends with a colon, like
hostwebhook:memory:. HostWebhook adds the node and the conversation to it. - Marker 3: Keep a conversation for: 30 days after its last message to start. Pick hours or days, from 1 hour to 365 days, or turn on Never.
- Marker 4: Turns kept per conversation: the latest 100 turns to start, 1,000 at most.
Choose the Redis connection, check the Key prefix, and set how long a conversation is kept. Under Settings on the same tab, Session ID says which turns belong together: use something from the event that identifies one conversation, like {{payload.from}}, so each person gets their own. The memory recalls the latest turns of the conversation, in order, so AI-extracted facts isn't offered: it needs embeddings.
Never keeps every conversation until you delete it.
Leave the 30 days unless you have a reason: with Never your database keeps growing, one list for each conversation.
The key of a conversation holds a hash of its Session ID, never the ID itself: an ID is often a phone number or an email, and key names show up in your server's slow log and in your provider's tools. The real ID is kept next to it so the panel can show it. Under Settings, AI Memory, open the node to read the conversations, forget one, delete what is older than 7, 30 or 90 days, or empty the node. What you delete goes from your Redis database.
Give the memory a Redis user of its own
The memory needs only these commands, on the keys that start with its prefix. Change the prefix and the name to your own:
ACL SETUSER hostwebhook-memory reset on >CHANGE-ME-to-a-long-random-password +rpush +ltrim +lrange +llen +expire +persist +zadd +zrevrange +zrangebyscore +zrem +hset +hmget +hdel +unlink +scan +ping +hello +select ~hostwebhook:memory:*
reset goes first because ACL SETUSER on a user that already exists only adds rules. +select only matters when the database number isn't 0.
Use a prefix that nothing else of yours reads.
If an AI toolkit's Keys the AI can use (step 07) included this prefix, an AI node could read the conversations of other people. HostWebhook refuses it from both sides, with the line These keys hold the conversations of an AI Node's memory. Pick a prefix that doesn't include them.
If your database doesn't answer, the node still answers, just without its memory, and Monitoring shows an AI Memory warning with the reason. When you delete the node, HostWebhook empties its keys in your database if it answers. It can't do it for you if you delete the whole account.
Upstash and Valkey work for the memory.
Search your documents with your Redis database (optional)
OptionalA vector store can keep its chunks and vectors in your Redis database and search them by meaning, from the Vector Store node or as a tool of an AI node. It needs a server with search commands, and not every server has them:
| Where it lives | Vector store |
|---|---|
| A Redis server 8 or later, or one with the search module | Works |
| Redis Cloud and Redis Software | Works |
| Valkey with search (Amazon ElastiCache for Valkey 8.2 or later, Google Memorystore for Valkey) | Works. Filtering by a Text field (a tag) needs valkey-search 1.1 or later: 1.0 can crash on it, so HostWebhook refuses it on 1.0. If the server doesn't say which version it runs, HostWebhook asks it with one small test search first, and refuses the filter if the server answers like 1.0 or doesn't answer. Numbers work on any version |
| Upstash | Not yet: it has its own vector commands. It keeps an AI node's memory (step 08) |
| A Redis server 7 with no modules, Valkey without search, KeyDB, Dragonfly | No search commands |
Open Settings, then Vector Stores, click New, choose the embedding model and, as the backend, Redis database (your own).
- Marker 1: Redis connection: the credential of step 01.
- Marker 2: Index name and Key prefix: fixed text. Leave them empty and HostWebhook picks one for the store.
- Marker 3: Metadata fields: up to 10 fields you can filter by, each Text or Number. You can't add one after the store exists.
- Marker 4: Test connection: one line about the search commands of your server.
Click Test connection. If it says Vector search: available. the server has the commands. If it doesn't, it says why (This Redis server has no vector search…, or, on Upstash, that the database answered with an error, or that the user can't run search commands) and Create store refuses with the same line. Then click Create store.
HostWebhook creates one index and one hash for each chunk under your prefix. The index is always the same shape (HNSW, cosine), so there is nothing to choose, and the number of dimensions comes from the embedding model. Two stores can't share a prefix, or have one start with the other: an index reads every key under its prefix, so they would mix their chunks. The prefix can't be one that an AI toolkit, an AI node's memory or another search index of your server already uses either: the Test and Create store say so, with a line.
A search can be narrowed by the document a chunk comes from and by the metadata fields you declared. A Text field matches an exact value (a language), and a Number field matches an exact number (a year). A field you didn't declare can't be filtered on later: create a new store. The Metadata filter of the Vector Store node uses those names.
Give the vector store a Redis user of its own
ACL SETUSER hostwebhook-vector reset on >CHANGE-ME-to-a-long-random-password +@search +hset +hincrby +hget +unlink +scan +ping +hello +select ~hostwebhook:vec:docs:* ~hostwebhook:vec:docs#stats
+@search are the search commands. Valkey needs the user to reach all the keys under an index's prefix, which is the first pattern. The second one is the store's counter, which sits outside the prefix. Change both to your own. With this user, a store can't be created while the server has another search index under a prefix the user can't reach: create the store with a user that reaches those prefixes too.
- Marker 1: Delete store, keep my data: the main button. HostWebhook forgets the store and leaves your database as it is, so you can use the index and the chunks anywhere else.
- Marker 2: Also delete my data: it removes the chunks under this store's prefix first and then drops the index, and nothing else: it checks that each key is one of the store's chunks, so a key of your own app under the same prefix stays. It can't be undone.
Because the chunks are in your database, deleting the store asks you what to do with them, and never chooses for you. Flush deletes the chunks and keeps the store.
A store on your Redis database doesn't count against your plan.
Its chunks are in your server, so the storage of your plan isn't used. You pay your provider for the memory they take.
Reconnect after a password change
If the password changes in your database, the nodes fail with The Redis server rejected the user or password. Reconnect the credential. and the triggers of that credential pause at their next check.
Open the credential and click Edit keys and settings. It is in the Keys and settings card and at the top of the page, and the Reconnect button of the warning, when there is one, opens it too. First you verify it's you, and then the form you connected with opens, filled in with what the credential has.
- Marker 1: Keys and settings: Edit keys and settings opens the form of the connection after you verify it's you.
Type the new password, change the server, TLS or tunnel if they moved, and click Save: the nodes work at once. If you paste a URL, like rediss://…/2, the database number comes from the URL. If you can't see the keys of the credential, the password box comes empty: an empty password keeps the one it has, but a new server or tunnel needs it typed again.
Then click Activate on each paused trigger. It continues where it stopped, so the entries added in between still arrive, as long as nothing trimmed them.
To disconnect for good, delete the credential in Settings, Credentials, and delete its user in your database.
Troubleshooting
The certificate couldn't be checked. Paste your provider's CA (step 01), or reach the server through a tunnel (step 02). HostWebhook always checks the certificate: there is no mode that skips the check.
This connection skips the check of the server's certificate, or does not use TLS. A credential saved before with Required, no check, or with Off and no tunnel, isn't deleted, but it stops connecting and says so. Change it to Required, or to a tunnel, in Edit keys and settings (step 10).
Couldn't reach the server. HostWebhook waits 10 seconds to connect. Check the host and the port, and that your provider allows HostWebhook's IP.
This Redis user can't run GET on cart:42. The user has no access to that command or key. Give it access (see the Redis user in step 01), or use another user. If a trigger paused naming a command like XREAD, it's the same: fix the access, then click Activate.
A key you know exists isn't found. Check Database number: Upstash and Redis Cloud only have 0.
Nothing connects through the tunnel. Check that the agent is running and that the tunnel says ONLINE. Run only one agent per tunnel.
The trigger paused because the key isn't a stream. Pick a stream and click Activate.
The trigger warns that entries were removed. Something trimmed the stream before HostWebhook read those entries, and they won't come back. Trim less, or let it keep more entries.
Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd. Redis does not sponsor or endorse HostWebhook or its Redis integration.