The idea is:
To be able to save multiple variations of a node and select which one is active (perhaps via a drop down box). Currently I have to make multiple copies of the same node and then constantly reroute the connections & deactivate the variations that I’m wanting to retain but not delete. This is both time-consuming and messy (five variations of a node can take up a lot of space on a screen, whereas they could all fit inside the same JSON object of the worklflow with 1 tagged as the active variation).
My use case:
This would particularly useful during development when I often need to experiment with different variations of a node before settling on which one works best. The most obvious examples are LLM prompts, SQL queries and code nodes where sometimes after much experimentation I need to revert earlier variations. But I do this commonly with other nodes including those as basic as Edit Field(s).
A really simple example is that this workflow:
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce"
},
"nodes": [
{
"parameters": {},
"id": "fe97f49f-317d-4a70-85a3-d9afc2eafcd2",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1280,
600
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "191c489e-bacf-4efc-90b6-67949ba69b5f",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
600
],
"disabled": true
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option B",
"type": "string"
}
]
},
"options": {}
},
"id": "33f33553-e3ce-419f-bae5-37b1d1d26906",
"name": "Edit Fields1",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
780
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option C",
"type": "string"
}
]
},
"options": {}
},
"id": "e64028f2-f697-47a1-9e2a-7cdc1d0fe43d",
"name": "Edit Fields2",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
980
],
"disabled": true
},
{
"parameters": {},
"id": "33bb230a-6d12-4129-91ca-c08dc2a38f6a",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1740,
600
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}
Could be replaced with:
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce"
},
"nodes": [
{
"parameters": {},
"id": "fe97f49f-317d-4a70-85a3-d9afc2eafcd2",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1280,
600
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "191c489e-bacf-4efc-90b6-67949ba69b5f",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
600
],
"notesInFlow": true,
"notes": "Variation 2 is active"
},
{
"parameters": {},
"id": "33bb230a-6d12-4129-91ca-c08dc2a38f6a",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1740,
600
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {}
}
## I think it would be beneficial to add this because:
It would allow faster experimentation where it's easier to keep track of what you've tried (including the order) and what has worked best. This would aid quicker development of workflows.
Ultimately enabling node variations could become quite powerful if multple active variations could be integrated with IF and SWITCH nodes ... whereby the workflow could trigger the right variation based on conditions.
Again as an example, this could allow the following:
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce"
},
"nodes": [
{
"parameters": {},
"id": "fe97f49f-317d-4a70-85a3-d9afc2eafcd2",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1080,
1080
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "191c489e-bacf-4efc-90b6-67949ba69b5f",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
600
],
"notesInFlow": false
},
{
"parameters": {},
"id": "33bb230a-6d12-4129-91ca-c08dc2a38f6a",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1760,
1080
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option C",
"type": "string"
}
]
},
"options": {}
},
"id": "12882505-86f6-40db-b936-f9d185eba9f8",
"name": "Edit Fields2",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
980
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option B",
"type": "string"
}
]
},
"options": {}
},
"id": "ab0e1d9a-9536-4e0d-bd74-07a309ea4e61",
"name": "Edit Fields1",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
780
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "f48f613d-363a-4c6f-932f-5a5c26f7f1a2",
"name": "Edit Fields3",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
1160
],
"notesInFlow": false
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "be337b17-ca06-4cc9-a95f-b05e0aa45ba7",
"name": "Edit Fields4",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
1360
],
"notesInFlow": false
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "5390c408-90c2-4410-bc23-db60dad7450d",
"name": "Edit Fields5",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1500,
1580
],
"notesInFlow": false
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
}
},
{},
{},
{},
{},
{}
]
},
"options": {}
},
"id": "4d54497e-1818-4d04-875c-4deba2211348",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
1280,
1060
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields2": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields1": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields3": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields4": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields5": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields1",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields2",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields3",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields4",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields5",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"When clicking ‘Test workflow’": [
{
"variation": 1
}
]
}
}
To be collapsed into something as simple as:
{
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "dd03d9cb498785120d8a498a063118e303fdd6c6c29744ddc567c10a9974bdce"
},
"nodes": [
{
"parameters": {},
"id": "fe97f49f-317d-4a70-85a3-d9afc2eafcd2",
"name": "When clicking ‘Test workflow’",
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
1080,
1080
]
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b86c5a94-dc0e-4bd9-a595-50d4b63ffeef",
"name": "output_value",
"value": "Option A",
"type": "string"
}
]
},
"options": {}
},
"id": "191c489e-bacf-4efc-90b6-67949ba69b5f",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
1520,
1080
],
"notesInFlow": false
},
{
"parameters": {},
"id": "33bb230a-6d12-4129-91ca-c08dc2a38f6a",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
1760,
1080
]
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict"
},
"conditions": [
{
"leftValue": "",
"rightValue": "",
"operator": {
"type": "string",
"operation": "equals"
}
}
],
"combinator": "and"
}
},
{},
{},
{},
{},
{}
]
},
"options": {}
},
"id": "4d54497e-1818-4d04-875c-4deba2211348",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"typeVersion": 3,
"position": [
1280,
1060
]
}
],
"connections": {
"When clicking ‘Test workflow’": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"When clicking ‘Test workflow’": [
{
"variation": 1
}
]
}
}
Are you willing to work on this?
I don’t have the coding skills to develop something like this myself. But I’d certainly be happy to further info that may help (e.g. mock up more other workflows to illustrate other applications).