
Tip #1: Testing n8n sub-workflow
Description
Categories
🤖 AI & Machine Learning
Nodes Used
n8n-nodes-base.ifn8n-nodes-base.setn8n-nodes-base.setn8n-nodes-base.stickyNoten8n-nodes-base.manualTriggern8n-nodes-base.executeWorkflowTrigger
PriceGratis
Views0
Last Updated11/28/2025
workflow.json
{
"id": "VdaeEvTKSXCbdvaE",
"meta": {
"instanceId": "8981479cb588889c05b145eaed421551d37a4fff11ab279d3f4744a6577c6002"
},
"name": "Tip #1: Testing n8n sub-workflow",
"tags": [],
"nodes": [
{
"id": "40b39083-5786-47f8-b46f-31617d3c1e18",
"name": "When Executed by Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
220,
200
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "color"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "1b8c3f08-b677-4a2a-8cc4-1a9ec1d2a979",
"name": "When clicking ‘Execute workflow’",
"type": "n8n-nodes-base.manualTrigger",
"position": [
0,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0ccdd511-857a-4173-9dd3-9dcbafaaf8d3",
"name": "Test Input",
"type": "n8n-nodes-base.set",
"position": [
220,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ba91ff49-9785-4bdb-8285-32b312ba91a0",
"name": "color",
"type": "string",
"value": "blue"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4da32de9-6b05-4a26-9d67-eae677dbcbfe",
"name": "Combine Input",
"type": "n8n-nodes-base.set",
"position": [
440,
100
],
"parameters": {
"options": {},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "e5cdecb7-1e03-4010-8cdb-ddf39220b2fb",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
660,
100
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "15a5d561-e439-43b0-a11b-b969aee65d72",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $('Combine Input').item.json.color }}",
"rightValue": "blue"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "d7c3efc5-c495-4811-8b47-7681c67068a3",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-180
],
"parameters": {
"width": 400,
"height": 120,
"content": "## Tip #1: Testing n8n sub-workflow\nThis is the template with example of how you can organize your sub-workflow to be able to test it.\nMore details in my [N8n Tips blog](https://n8n-tips.blogspot.com/2025/06/tip-1-testing-n8n-sub-workflow.html)"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "d6190099-dc63-414d-b0e6-288416a78c62",
"connections": {
"Test Input": {
"main": [
[
{
"node": "Combine Input",
"type": "main",
"index": 0
}
]
]
},
"Combine Input": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Combine Input",
"type": "main",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Test Input",
"type": "main",
"index": 0
}
]
]
}
}
}