New to Kestra?
Use blueprints to kickstart your first workflows.
Write and read JSON key-value pairs in Redis from Kestra. Pass the key and value as runtime inputs, with JSON serialization handled automatically.
Store a JSON document in Redis under a chosen key and read it back, all from a declarative Kestra workflow. This blueprint shows the round trip every Redis-backed pipeline relies on: write a value, then fetch it, with the key and payload supplied as runtime inputs so the same flow can manage cache entries, feature flags, session state, or shared data between tasks without code changes. Kestra handles JSON serialization on the way in and deserialization on the way out, so you work with structured objects instead of raw strings.
The flow accepts two inputs: a key (STRING, defaulting to johndoe) and a value (JSON, defaulting to a sample user profile object).
set task (io.kestra.plugin.redis.string.Set) connects to Redis at the configured url and writes inputs.value under inputs.key. With serdeType: JSON, the structured input is serialized into the stored value automatically.get task (io.kestra.plugin.redis.string.Get) reads the same inputs.key back from Redis. Again serdeType: JSON is set, so the stored string is deserialized into a JSON object available to downstream tasks and the execution outputs.serdeType: JSON.Redis has no built-in scheduler or workflow engine: it stores data but cannot decide when to write, react to upstream events, or retry on failure. Kestra fills that gap. Define the logic as declarative YAML, drive writes from event triggers or schedules, attach retries so a transient connection blip does not lose a write, and capture full execution lineage so every read and write is auditable. The parameterized inputs let one flow serve many keys, and the retrieved value flows directly into downstream tasks.
redis://host.docker.internal:6379/0; adjust the url for your environment.This blueprint references no secrets: the connection url is set inline on the tasks. For production, move the connection string to a secret or environment variable and reference it with {{ secret('REDIS_URL') }}.
docker run --name myredis -p 6379:6379 -d redis.url matches your Redis host.key and value, or supply your own at runtime.get task output to confirm the JSON value was written and read back.url with a {{ secret('REDIS_URL') }} reference for secure, environment-specific connections.