# Bug? Start multiple Sub-Workflows asynchronously

**URL:** <https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482>\
**Category:** Questions\
**Created:** [April 15, 2025, 9:05am UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482 "2025-04-15T09:05:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jelle\_van\_Wieringen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jelle_van_wieringen/32/67994_2.png) [@Jelle\_van\_Wieringen](https://community.n8n.io/u/Jelle_van_Wieringen)\
**Post date:** [April 15, 2025, 9:05am UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/1 "2025-04-15T09:05:44Z")

</div>

## Describe the problem/error/question

“Respond to Webhook” is reached as expected but it does not end its Webhook call. The Python client does not get a return code.

## Sample run as Test Workflow:

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/f/e/feee91eefb2ec012641dfb16f79e86a04f7ed430.png)

## Please share your workflow

{  
“name”: “AutonomousAgentFork”,  
“nodes”: [  
{  
“parameters”: {  
“jsCode”: “const resultset = [\n {\n "type": "workflow",\n "label": "SWOT",\n "pitch": "Explains the workings of SWOT to the user",\n "prompt": "Explain why the sky is blue.",\n "model": "qwen2.5:14b"\n },\n {\n "type": "workflow",\n "label": "SOFT",\n "pitch": "validate an issue of the user according to the rules of the SOFT framework",\n "prompt": "Explain the priciples of SWOT.",\n "model": "qwen2.5:14b"\n }\n]\nreturn resultset”  
},  
“id”: “d862ce0d-69bb-435c-8cde-238557a9f2c8”,  
“name”: “Code”,  
“type”: “n8n-nodes-base.code”,  
“typeVersion”: 2,  
“position”: [  
-900,  
660  
]  
},  
{  
“parameters”: {  
“options”: {}  
},  
“id”: “bbfb064f-9870-420b-9147-818e97ace361”,  
“name”: “Loop Over Items”,  
“type”: “n8n-nodes-base.splitInBatches”,  
“typeVersion”: 3,  
“position”: [  
-540,  
680  
]  
},  
{  
“parameters”: {  
“respondWith”: “allIncomingItems”,  
“options”: {}  
},  
“id”: “b2355924-5e07-43ac-ad6e-690e2d61546f”,  
“name”: “Respond to Webhook”,  
“type”: “n8n-nodes-base.respondToWebhook”,  
“typeVersion”: 1.1,  
“position”: [  
420,  
360  
]  
},  
{  
“parameters”: {  
“method”: “POST”,  
“url”: “[http://127.0.0.1:5678/webhook/ollamacall](http://127.0.0.1:5678/webhook/ollamacall)”,  
“sendHeaders”: true,  
“headerParameters”: {  
“parameters”: [  
{  
“name”: “callbackurl”,  
“value”: “={{ $execution.resumeUrl.replace(‘localhost’, ‘127.0.0.1’) }}”  
}  
]  
},  
“sendBody”: true,  
“bodyParameters”: {  
“parameters”: [  
{  
“name”: “prompt”,  
“value”: “={{ $json.prompt }}”  
},  
{  
“name”: “model”,  
“value”: “={{ $json.model }}”  
}  
]  
},  
“options”: {}  
},  
“id”: “1807ff4d-4d96-4bbe-aba1-05502222339a”,  
“name”: “HTTP Request”,  
“type”: “n8n-nodes-base.httpRequest”,  
“typeVersion”: 4.2,  
“position”: [  
-380,  
880  
]  
},  
{  
“parameters”: {  
“assignments”: {  
“assignments”: [  
{  
“id”: “f2c53234-7c3e-47be-ba4c-25500729a20d”,  
“name”: “=finishedSet”,  
“value”: “”,  
“type”: “array”  
}  
]  
},  
“options”: {}  
},  
“id”: “fde93d50-dd05-43cc-9bc8-945f2c5ea3fb”,  
“name”: “Edit Fields”,  
“type”: “n8n-nodes-base.set”,  
“typeVersion”: 3.4,  
“position”: [  
-380,  
420  
]  
},  
{  
“parameters”: {  
“resume”: “webhook”,  
“httpMethod”: “POST”,  
“responseMode”: “responseNode”,  
“options”: {}  
},  
“id”: “2e4eec41-803f-4a8f-99f7-a31ca1fb854f”,  
“name”: “Wait”,  
“type”: “n8n-nodes-base.wait”,  
“typeVersion”: 1.1,  
“position”: [  
120,  
520  
],  
“webhookId”: “76ec044a-e009-4467-941c-1d12c52e4599”  
},  
{  
“parameters”: {  
“conditions”: {  
“options”: {  
“version”: 1,  
“leftValue”: “”,  
“caseSensitive”: true,  
“typeValidation”: “strict”  
},  
“conditions”: [  
{  
“id”: “385c3149-3623-4dd2-9022-770c32f82421”,  
“operator”: {  
“type”: “number”,  
“operation”: “gte”  
},  
“leftValue”: “={{ $json.finishedSet.length }}”,  
“rightValue”: “={{ $(‘Code’).all().length }}”  
}  
],  
“combinator”: “and”  
},  
“options”: {}  
},  
“id”: “4e1e12b4-cb5e-4ace-828b-dfd9860f294d”,  
“name”: “If All Finished”,  
“type”: “n8n-nodes-base.if”,  
“position”: [  
-120,  
480  
],  
“typeVersion”: 2  
},  
{  
“parameters”: {  
“jsCode”: “let json = $(‘If All Finished’).first().json;\nif (!json.finishedSet) json.finishedSet = ;\nlet finishedItem = $(‘Wait’).item.json.body.result;\njson.finishedSet.push(finishedItem);\nreturn [json];”  
},  
“id”: “2ac23e12-dedb-4f1a-88cb-bf40a5a04a84”,  
“name”: “Update finishedSet”,  
“type”: “n8n-nodes-base.code”,  
“position”: [  
400,  
620  
],  
“typeVersion”: 2  
},  
{  
“parameters”: {  
“httpMethod”: “POST”,  
“path”: “agentfork”,  
“responseMode”: “responseNode”,  
“options”: {}  
},  
“id”: “6446bfd8-7b58-4c36-be91-609167b32511”,  
“name”: “Webhook”,  
“type”: “n8n-nodes-base.webhook”,  
“typeVersion”: 2,  
“position”: [  
-1140,  
600  
],  
“webhookId”: “425eb907-463d-417d-ab6e-71b62e2a68ff”  
}  
],  
“pinData”: {},  
“connections”: {  
“Code”: {  
“main”: [  
[  
{  
“node”: “Loop Over Items”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Loop Over Items”: {  
“main”: [  
[  
{  
“node”: “Edit Fields”,  
“type”: “main”,  
“index”: 0  
}  
],  
[  
{  
“node”: “HTTP Request”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“HTTP Request”: {  
“main”: [  
[  
{  
“node”: “Loop Over Items”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Edit Fields”: {  
“main”: [  
[  
{  
“node”: “If All Finished”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Wait”: {  
“main”: [  
[  
{  
“node”: “Update finishedSet”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“If All Finished”: {  
“main”: [  
[  
{  
“node”: “Respond to Webhook”,  
“type”: “main”,  
“index”: 0  
}  
],  
[  
{  
“node”: “Wait”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Update finishedSet”: {  
“main”: [  
[  
{  
“node”: “If All Finished”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
},  
“Webhook”: {  
“main”: [  
[  
{  
“node”: “Code”,  
“type”: “main”,  
“index”: 0  
}  
]  
]  
}  
},  
“active”: true,  
“settings”: {  
“executionOrder”: “v1”,  
“timezone”: “Europe/Berlin”,  
“saveManualExecutions”: true,  
“callerPolicy”: “workflowsFromSameOwner”  
},  
“versionId”: “8b6c8ff1-86c9-4285-9292-a90fcc1dc300”,  
“meta”: {  
“templateCredsSetupCompleted”: true,  
“instanceId”: “68f9e66783549a11e344292a1ef8ccb1a9d2307f134c3a15405499ae2f6cb69a”  
},  
“id”: “lYEkSxOsDcKqG4Ft”,  
“tags”: [  
{  
“createdAt”: “2025-03-02T10:43:14.580Z”,  
“updatedAt”: “2025-03-02T10:43:14.580Z”,  
“id”: “AlTrjLLH9GXckgNI”,  
“name”: “PlaygroundPrototype”  
}  
]  
}

## Share the output returned by the last node

A valid json as expected. The client is not notified.

## Information on your n8n setup

- **n8n version: 1.64.3**
- **Database default: SQLite**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via desktop app on localhost**
- **Operating system: Windows 10**

---

<div class="post-metadata">

**Author:** ![Jelle\_van\_Wieringen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jelle_van_wieringen/32/67994_2.png) [@Jelle\_van\_Wieringen](https://community.n8n.io/u/Jelle_van_Wieringen)\
**Post date:** [April 16, 2025, 6:34am UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/2 "2025-04-16T06:34:46Z")

</div>

I have been playing around with the sub-workflow to get new insights. I have a gut feeling that the logic of the Wait node collides with the Respond to Webhook node. Mixing Webhooks and Http Requests might be too much for n8n.

Experimenting with a sub-workflow instead of a webhook results in an empty set. The wrapping workflow does not wait for the sub-workflow to finish.

My insight: N8N is not suitable for parallelisation. I am kind of disappointed.

---

<div class="post-metadata">

**Author:** ![Jelle\_van\_Wieringen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jelle_van_wieringen/32/67994_2.png) [@Jelle\_van\_Wieringen](https://community.n8n.io/u/Jelle_van_Wieringen)\
**Post date:** [April 17, 2025, 11:54am UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/3 "2025-04-17T11:54:10Z")

</div>

For those who want to know: Adding an MQTT server solved my problem. Claims that you can without should be taken with care.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/d/4/d4ed1b6dbe18a567b4d7d55c6cdc042f4a86b59d.png)

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [April 17, 2025, 12:00pm UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/4 "2025-04-17T12:00:23Z")

</div>

n8n is perfectly suited for parallelisation. But yeah the best thing is to use a MQTT for example to keep it under control. I personally always use RabbitMQ as it has some nice native nodes to use 🙂

And no if you have a webhook that is waiting for a reply you should not be doing too much within that flow as timeouts and such can happen.  
That is also why you see a lot of APIs with an endpoint to start a report/export or whatever and then a seperate endpoint to actually get the data when it is finished running in the background.

---

<div class="post-metadata">

**Author:** ![Jelle\_van\_Wieringen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jelle_van_wieringen/32/67994_2.png) [@Jelle\_van\_Wieringen](https://community.n8n.io/u/Jelle_van_Wieringen)\
**Post date:** [April 17, 2025, 4:55pm UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/5 "2025-04-17T16:55:36Z")

</div>

Yes mom. Thank you for letting me know after I solved the issue myself. I love your way of teaching me. Its is really a pleasure after wasting weeks of frustration with n8n.

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [April 17, 2025, 5:00pm UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/6 "2025-04-17T17:00:28Z")

</div>

Sorry that u were stuck on it. But no need to reply like that. Just wanted to give a bit more info.  
I see you posted 2 days ago, so you got a pretty fast reply. That u solved it even faster is only good.

---

<div class="post-metadata">

**Author:** ![SlimeBswervin](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/slimebswervin/32/74970_2.png) [@SlimeBswervin](https://community.n8n.io/u/SlimeBswervin)\
**Post date:** [April 21, 2025, 7:22pm UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/7 "2025-04-21T19:22:02Z")

</div>

Rabbitmq node is broke wither rabbit mq version 4.1.0 ma and other ussers keep getting , ’  
read ECONNRESET ’ when trying to add cordentials

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [April 28, 2025, 7:22pm UTC](https://community.n8n.io/t/bug-start-multiple-sub-workflows-asynchronously/101482/8 "2025-04-28T19:22:18Z")

</div>

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