Keep incoming Slack requests clean and safe with controlled, single run processing. The flow prevents duplicate work, avoids race conditions, and routes each request to the right path. It is ideal for teams that get many webhook events and need stable handling.
The webhook node receives the request, then a code step parses the payload and sets a unique value for locking. Redis checks if a lock already exists. If no lock is found, the flow sets a short lived lock with a 180 second expiry. If a lock is present, a wait step polls and a check decides if the event is a duplicate and should be skipped. A switch node routes the request to one of three paths. Each path finishes by removing the Redis key to release the lock and end cleanly.
You will need a Redis database and a Slack app that can send requests to the n8n webhook URL. Set the same lock key across check, set, and delete so the cleanup works. Expect fewer double runs, safer routing, and less manual cleanup. This is useful for actions from Slack buttons, command results, or any repeated webhook events.