← All N8N workflows
Automation & utilitiesExecute WorkflowExecute Workflow TriggerIfManual TriggerNo Op

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.

Workflow preview
TriggerWhen Executed byAnother WorkflowExecute Workflow TriggerRoutingSwitchSwitchTriggerWhen clicking ‘Testworkflow’Manual TriggerRoutingIf2IfSubworkflowIs Workflow ActiveExecute WorkflowSubworkflowSet Workflow ActiveExecute WorkflowSubworkflowSet Workflow FinishedExecute WorkflowData storeGet KeyRedisData storeSet KeyRedisData storeUnSet KeyRedisTransformSet TimeoutEdit FieldsTransformset continueEdit FieldsRoutingIfIfSubworkflowIs Workflow Active1Execute WorkflowRoutingStop and ErrorStop And ErrorRoutingNo Operation, donothingNo OpSubworkflowSet Workflow Active1Execute WorkflowSubworkflowSet Workflow Finished1Execute WorkflowWaitWaitWaitRoutingIf1IfSubworkflowIs Workflow Active2Execute WorkflowRoutingStop and Error1Stop And ErrorSubworkflowSet Workflow Finished2Execute WorkflowWaitWait1WaitWaitWait2WaitWaitWait3WaitSubworkflowSet Workflow "started"Execute WorkflowSubworkflowSet Workflow"finishing"Execute WorkflowSubworkflowSet Workflow "loading"Execute WorkflowSubworkflowIs Workflow Active3Execute WorkflowRoutingSwitch1Switch

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.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When Executed by Another WorkflowTriggerExecute Workflow TriggerSee node parameters
SwitchRoutingSwitchSee node parameters
When clicking ‘Test workflow’TriggerManual TriggerSee node parameters
If2RoutingIfSee node parameters
Is Workflow ActiveSubworkflowExecute WorkflowSee node parameters
Set Workflow ActiveSubworkflowExecute WorkflowSee node parameters
Set Workflow FinishedSubworkflowExecute WorkflowSee node parameters
Get KeyData storeRedisget
Set KeyData storeRedisset
UnSet KeyData storeRedisdelete
Set TimeoutTransformEdit FieldsSee node parameters
set continueTransformEdit FieldsSee node parameters
IfRoutingIfSee node parameters
Is Workflow Active1SubworkflowExecute WorkflowSee node parameters
Stop and ErrorRoutingStop And ErrorSee node parameters
No Operation, do nothingRoutingNo OpSee node parameters
Set Workflow Active1SubworkflowExecute WorkflowSee node parameters
Set Workflow Finished1SubworkflowExecute WorkflowSee node parameters
WaitWaitWaitSee node parameters
If1RoutingIfSee node parameters
Is Workflow Active2SubworkflowExecute WorkflowSee node parameters
Stop and Error1RoutingStop And ErrorSee node parameters
Set Workflow Finished2SubworkflowExecute WorkflowSee node parameters
Wait1WaitWaitSee node parameters
Wait2WaitWaitSee node parameters
Wait3WaitWaitSee node parameters
Set Workflow "started"SubworkflowExecute WorkflowSee node parameters
Set Workflow "finishing"SubworkflowExecute WorkflowSee node parameters
Set Workflow "loading"SubworkflowExecute WorkflowSee node parameters
Is Workflow Active3SubworkflowExecute WorkflowSee node parameters
Switch1RoutingSwitchSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. 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 !

More in Automation & utilities