Prevent concurrent workflow runs using Redis
Configured with Execute Workflow, Execute Workflow Trigger, Redis, Stop And Error, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- Routing
- Subworkflow
- Data store
- Transform
- Wait
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When Executed by Another Workflow | Trigger | Execute Workflow Trigger | See node parameters |
| Switch | Routing | Switch | See node parameters |
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| If2 | Routing | If | See node parameters |
| Is Workflow Active | Subworkflow | Execute Workflow | See node parameters |
| Set Workflow Active | Subworkflow | Execute Workflow | See node parameters |
| Set Workflow Finished | Subworkflow | Execute Workflow | See node parameters |
| Get Key | Data store | Redis | get |
| Set Key | Data store | Redis | set |
| UnSet Key | Data store | Redis | delete |
| Set Timeout | Transform | Edit Fields | See node parameters |
| set continue | Transform | Edit Fields | See node parameters |
| If | Routing | If | See node parameters |
| Is Workflow Active1 | Subworkflow | Execute Workflow | See node parameters |
| Stop and Error | Routing | Stop And Error | See node parameters |
| No Operation, do nothing | Routing | No Op | See node parameters |
| Set Workflow Active1 | Subworkflow | Execute Workflow | See node parameters |
| Set Workflow Finished1 | Subworkflow | Execute Workflow | See node parameters |
| Wait | Wait | Wait | See node parameters |
| If1 | Routing | If | See node parameters |
| Is Workflow Active2 | Subworkflow | Execute Workflow | See node parameters |
| Stop and Error1 | Routing | Stop And Error | See node parameters |
| Set Workflow Finished2 | Subworkflow | Execute Workflow | See node parameters |
| Wait1 | Wait | Wait | See node parameters |
| Wait2 | Wait | Wait | See node parameters |
| Wait3 | Wait | Wait | See node parameters |
| Set Workflow "started" | Subworkflow | Execute Workflow | See node parameters |
| Set Workflow "finishing" | Subworkflow | Execute Workflow | See node parameters |
| Set Workflow "loading" | Subworkflow | Execute Workflow | See node parameters |
| Is Workflow Active3 | Subworkflow | Execute Workflow | See node parameters |
| Switch1 | Routing | Switch | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
redis
Workflow notes
Check if working
Check if working
Will output status if something is going on.
Inputs:
- action -> "get"
- key -> a string used for tracking
- Remove unused inputs when calling workflow *
Set workflow start
Set workflow start
Inputs:
- action -> "set"
- key -> a string used for tracking
- value -> "working" by default but you can use whatever, you can use this multiple times in combination with get to track progress of a execution.
- Remove unused inputs when calling workflow *
Set workflow end
Set workflow end
This mark workflow end by unsetting the key.
Inputs:
- action -> "unset"
- key -> a string used for tracking
- Remove unused inputs when calling workflow *
Redis logic
Redis logic
Modify Set Timeout to adjust timeout (in seconds)
Your logic that takes time
Your logic that takes time
If a process is ran at the same moment, it will raise a error
Example 2
Example 2
Track progress
Prevent concurrent workflow runs using Redis
Prevent concurrent workflow runs using Redis
Purpose and structure
This folder contains the Prevent concurrent workflow runs using Redis workflow. Its executable nodes use executeWorkflow, executeWorkflowTrigger, if, manualTrigger, noOp, redis, set, stopAndError, switch, wait. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When Executed by Another Workflow, When clicking ‘Test workflow’
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Stopanderror/0925_Stopanderror_Wait_Automate_Triggered.json MIT; preserve source notices.
Canvas section labels
These name areas of the original canvas; they do not include explanatory instructions.
- Example 1
- Process step 2
- Process step 3
- Check status of execution
- Connect this anywhere to test !