# Prevent concurrent n8n workflows with Redis locks on Slack webhooks
This automation template solves the problem of duplicate workflow executions triggered by repeated webhooks from Slack. It uses Redis as a distributed locking mechanism to ensure that only one instance of the workflow runs at a time. Ideal for teams where avoiding duplicated operations is critical — such as during deployments, incident handling, or manual trigger-based processes.
## Who it´s for
- Developers integrating n8n with external systems via webhooks
- Engineers needing protection against duplicate task processing in real time
- Teams using Slack to manage and trigger automations
## What the automation does
- Receives an HTTP webhook from Slack
- Parses payload variables to generate a unique lock key
- Checks Redis for an existing lock
- If no lock exists, acquires it with TTL and proceeds to execute one of three workflows
- Discards duplicate requests if a lock is present
- Releases the lock after main process completion
## What´s included
- Ready-to-use n8n workflow with Redis lock management
- Trigger and handler logic using JavaScript
- Integrations with Slack and Redis
- Basic textual instructions for setup and adaptation
## Requirements for setup
- n8n account with editor access
- Access to a Redis server (self-hosted or cloud)
- Configured Slack webhook pointing to n8n
- Familiarity with environment variables and API keys
## Benefits and outcomes
- Prevents concurrent execution of the same workflow
- Eliminates system overload and errors from duplicate requests
- Ensures reliability when manually triggering processes via Slack
- Simplifies scaling under high-load conditions
- Reduces risk of errors during critical operations (incidents, deploys)
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet