How to enable or disable specific node during workflow execution

Hello Community
I would like to know if there is a way to enable or disable a particular node (or trigger) during workflow execution?

Suppose I want to enable or disable a particular node/trigger inside a workflow (during that workflow execution) based upon certain condition or logic. Suppose I want to enable a node when ‘IF’ node return TRUE? or may be I want to disable a node when ‘IF’ node return TRUE?

Is it something do able or possible in n8n workflow? Please advise


It is sadly currently not possible to dynamically enable or disable a node, but as a workaround you can achieve the same by using an IF-Node and one branch goes then through the node, and the other one bypasses that.

Hello @jan

Thanks you for your response and I appreciate. I can understand the workaround you suggested and thank you for that. However, in my scenario the particular node I want to enable or disable is actually one of the trigger nodes in my workflow. I have two triggers in my workflow. One of them is rabbitMQ trigger and the other one is schedule trigger.

Scenario details is that, in my workflow, by default, the rabbitMQ trigger will be in disabled/deactivated mode (i.e. it is manually disabled in workflow at the time of workflow development) and it should remain disabled (even after workflow is activated) and only under certain specific situation/condition this rabbitMQ trigger should be enabled during workflow execution (and not manually enabled).

Please advise if it is possible to place trigger node in the TRUE or FALSE path of n8n workflow? As per my understanding it is not possible however you may please correct me if I am mistaken.

Hey @mahmed11,

Trigger nodes have no input option so it wouldn’t be possible to put them in an If branch. Another solution could be to have 2 workflows and you can then enable or disable the workflow as needed.

1 Like

What @jon said just wanted to add that this can also be done dynamically via the n8n API or via the n8n node (which uses the API).

1 Like

I guess just to close the circle a bit more… I made a workflow a while back that allows you to toggle a workflow from a Telegram message so if an example is needed this might help.

Thanks @jan. I can understand what you suggested and it is good idea in fact. I know API can be used for dynamic activation/deactivation of workflow.

Thanks @Jon for sharing example workflow. Big help.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.