n8n

How to Streamline Redis Run Control?

Keep long jobs safe and simple with a reusable Redis run control. It stops the same process from running twice at the same time and lets your team check live status. Great for imports, API calls, and any task that should never overlap.

The flow accepts four inputs from another workflow or a manual test action, key, value, and timeout. A switch routes the action to get, set, or unset the status key in Redis, with a time to live so stale locks clear themselves. If checks and stop and error nodes block concurrent runs. Example steps show how to mark started, loading, and finishing with short waits so you can track progress without building a custom database.

Setup is simple. Add your Redis credential, pick a clear key naming rule, and set your timeout in seconds. Use it as a guard before heavy steps and clear the key when done. Teams reduce failed retries, protect rate limits, and save time by checking one status key instead of digging through logs.

What are the key features?

  • Reusable input model with action key value and timeout so any workflow can call it.
  • Redis get set and unset actions manage a status key with a time to live.
  • Switch node routes each action to the right Redis operation.
  • If checks and stop and error nodes block concurrent runs to avoid conflicts.
  • Progress markers update status to started loading and finishing during long tasks.
  • Wait nodes simulate long steps and allow safe pauses between phases.
  • Manual test trigger helps you verify locks and status updates before going live.
  • Called by other workflows using execute workflow so it works as a shared guard.

What are the benefits?

  • Prevent overlapping jobs so systems stay stable
  • Reduce manual checks from 30 minutes to 2 minutes with simple status lookups
  • Cut failed retries by stopping duplicate triggers early
  • Protect API rate limits by blocking repeat calls during a run
  • Clear stale locks automatically with timeout control

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Redis. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create a Redis credential. If you use Redis Cloud, copy the host, port, and password from your dashboard. Enable TLS if your provider requires it.
  4. Open each Redis node named Get Key, Set Key, and UnSet Key. In Credential to connect with choose your Redis credential or click Create new credential and follow the on screen steps. Save your changes.
  5. Set a default timeout in the Set Timeout node. This value is in seconds and controls how long a status key stays active before it expires.
  6. Choose a clear key naming rule. For example, use process name plus date or run id. Enter this in the key field when calling the workflow.
  7. Test the status flow. Run the workflow with action set and a key, then run action get with the same key to confirm the value and TTL. Finally run action unset and confirm the key is gone.
  8. Validate the concurrency guard. Start a run, then start another with the same key. You should see the stop and error node block the second run.
  9. From another workflow, add an Execute Workflow node. Pass action set before heavy steps, action get during progress checks, and action unset after completion. Use a unique key per job.
  10. If you see stale locks, lower the timeout or ensure the finishing path calls the unset action. Check network rules if Redis connection fails.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Redis

Sign up

Free plan: $0 / mo, 30 MB, single DB

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.