Templates / Prevent simultaneous workflow executions with Redis

Prevent simultaneous workflow executions with Redis

Ready for 3.0

by Mario ✓ · 1,544 views · created 2024-05-18 · DevOps

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 7 nodes and runs on a schedule (every 5 seconds). Along the way it connects Redis.

How it runs

Trigger: On a schedule (every 5 seconds).

  1. Get Flag (Redis): get
  2. Flag does not exists (Filter): keeps only the items that match a condition
  3. Set Flag (Redis): set
  4. Execute Workflow (Execute Sub-workflow): calls another n8n workflow
  5. Remove Flag (Redis): delete

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 (5)

From the author

Purpose This ensures that executions of scheduled workflows do not overlap when they take longer than expected. How it works - This is a separate workflow which monitors the execution of the main workflow - Stores a flag in Redis (key dynamically named after…

Excerpt from Mario'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.