Templates / Prevent concurrent workflow runs using Redis

Prevent concurrent workflow runs using Redis

Ready for 3.0

by Hugues Stock ✓ · 975 views · created 2025-05-10 · Engineering

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 31 nodes and runs when another workflow calls it (plus 1 other trigger). Along the way it connects Redis.

How it runs

Trigger: When another workflow calls it (plus 1 other trigger).

  1. Set Timeout (Edit Fields (Set)): sets 1 field: timeout
  2. Switch: routes items into 3 branches
  3. Get Key (Redis): get
  4. Set Key (Redis): set
  5. UnSet Key (Redis): delete
  6. set continue (Edit Fields (Set)): sets 1 field: ok
  7. Is Workflow Active (Execute Sub-workflow): calls another n8n workflow
  8. If: checks a condition and branches into true / false
  9. Set Workflow "started" (Execute Sub-workflow): calls another n8n workflow
  10. Stop and Error: stops the run with an error

…plus 18 more steps. See the full node list below.

Services it uses

Redis

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (10)

From the author

What does this template do? This workflow sets a small "lock" value in Redis so that only one copy of a long job can run at the same time. If another trigger fires while the job is still busy, the workflow sees the lock, stops early, and throws a clear error.…

Excerpt from Hugues Stock's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.