Prevent Concurrent Workflow Runs Using Redis
detail.loadingPreview
This workflow prevents multiple instances of itself from running simultaneously by using a Redis key.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This workflow acts as a gatekeeper to prevent concurrent executions of another workflow. It leverages Redis to store a key that signifies whether the target workflow is currently active. When the workflow is triggered, it first checks if the Redis key exists. If it doesn't, it sets the key and proceeds. If the key does exist, it means another instance is already running, and the current execution is stopped.
Key Features
- Checks for existing Redis key to prevent concurrency.
- Sets a Redis key when starting a protected workflow.
- Unsets the Redis key when the protected workflow finishes.
- Customizable key and value for tracking.
How To Use
- Configure Redis Credentials: Ensure your n8n instance has access to a Redis instance.
- Set Workflow ID: In the
Is Workflow Active,Set Workflow Active, andSet Workflow Finishednodes, replaceFx8Ov5MblG2cmRWRwith the actual ID of the workflow you want to protect. - Define Key and Action: When calling this workflow from another workflow or manually:
key: Provide a unique string to identify the workflow instance (e.g.,my_processing_job).action: Usegetto check,setto mark as active, andunsetto mark as finished.value(optional, for 'set' action): You can specify a value to store, likeworkingor a timestamp.
Apps Used
Workflow JSON
{
"id": "f4765f5b-bf44-45cf-8e67-1631ed676b7e",
"name": "Prevent Concurrent Workflow Runs Using Redis",
"nodes": 0,
"category": "Stop and Error",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: f4765f5b-bf44...
About the Author
AI_Workflow_Bot
LLM Specialist
Building complex chains with OpenAI, Claude, and LangChain.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
Robust Concurrency Control for n8n Workflows with Redis
Prevent simultaneous execution of critical n8n workflows or tasks using a centralized, Redis-backed locking mechanism. This reusable utility workflow ensures data integrity and resource management by allowing other workflows to acquire, check, and release locks.
Telegram Profanity & Toxicity Filter
This n8n workflow automatically monitors incoming Telegram messages for profanity and toxic language. It leverages Google's Perspective API to analyze message content, and if a message is deemed inappropriate, the workflow sends an automated warning response back to the sender.
Automated Multi-Platform Influencer Discovery & Qualification
This powerful n8n workflow automates the entire process of discovering, scoring, and qualifying ideal influencers across Instagram, TikTok, and YouTube for your marketing campaigns. Streamline your talent acquisition by leveraging custom criteria and a sophisticated scoring algorithm.
Instant WooCommerce Order Notifications via Telegram
When a new order is placed on your WooCommerce store, instantly receive detailed notifications directly to your Telegram chat. Stay on top of your e-commerce operations with real-time alerts, including order specifics and a direct link to view the order.
Smart Expense Tracking with Telegram & AI
Automate your personal finance management by turning your Telegram chat into an intelligent expense tracker. Simply send a photo of a receipt or a text message, and this workflow uses AI to categorize your spending, extract crucial details, and provide instant summaries.
AI-Powered Accounts Receivable Reporting for Sabre EDI
This n8n workflow automates the extraction of Accounts Receivable (AR) data from complex Sabre EDI (Interface User Record) files stored in Google Drive. It leverages an AI agent, powered by OpenAI, to intelligently process financial information and generate structured AR reports. The workflow ensures accuracy by utilizing a Pinecone vector database for contextual understanding of EDI guidelines.