When calling a sub-workflow containing a Wait (Webhook) node, the return data is incorrect:
Sub workflow :
{
"nodes": [
{
"parameters": {
"resume": "webhook",
"httpMethod": "POST",
"responseMode": "lastNode",
"limitWaitTime": true,
"resumeAmount": 10,
"resumeUnit": "minutes",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
400,
0
],
"id": "ff89d4fa-5c3b-48ba-81cb-abb6554445ac",
"name": "Wait response",
"webhookId": "7e72cb0f-e29c-4e74-9509-95cc75e8e836"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "e2347a4a-cc19-4049-8a19-e11a411b648d",
"name": "test",
"value": "={{ \n /(x|twitter)\\.com.*?status/.test($json.url) ? {\n scraping_type: \"x post (ex-twitter)\",\n dataset_id: \"gd_lwxkxvnf1cynvib9co\"\n } : \n /linkedin\\.com\\/posts/.test($json.url) ? {\n scraping_type: \"linkedin post\", \n dataset_id: \"gd_lyy3tktm25m4avu764\"\n } : null\n}}",
"type": "object"
}
]
},
"includeOtherFields": true,
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-140,
0
],
"id": "bd71d82e-1b4e-4b52-b066-e3bf801331c4",
"name": "Set variable based on social network"
},
{
"parameters": {
"method": "POST",
"url": "https://api.brightdata.com/datasets/v3/trigger",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "dataset_id",
"value": "={{ $json.test.dataset_id }}"
},
{
"name": "include_errors",
"value": "true"
},
{
"name": "endpoint",
"value": "={{ $execution.resumeUrl }}"
},
{
"name": "format",
"value": "json"
},
{
"name": "uncompressed_webhook",
"value": "true"
},
{
"name": "force_deliver",
"value": "true"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "=[\n {\n \"url\": \"{{ $json.url }}\"\n }\n]",
"options": {
"response": {
"response": {
"fullResponse": true,
"neverError": true
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
180,
0
],
"id": "070df48f-adb7-4f8e-8c36-855a45f283c0",
"name": "Scrap special dataset post1",
"alwaysOutputData": true
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "2b1c7ff8-06a7-448b-99b7-5ede4b2e0bf0",
"name": "response",
"value": "={{ $json }}",
"type": "object"
}
]
},
"options": {}
},
"id": "ed06fc70-12fe-4d96-a135-8f20b3a6f566",
"name": "Set response",
"type": "n8n-nodes-base.set",
"typeVersion": 3.3,
"position": [
880,
0
]
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "={\n \"scraping_type\": \"{{ $('Set variable based on social network').first().json.test.scraping_type }}\",\n \"username\": \"{{ $json.body[0].name || $json.body[0].headline }} \",\n \"description\":{{ JSON.stringify($json.body[0].description?.replaceAll('\"',\"'\")) || JSON.stringify($json.body[0].post_text?.replaceAll('\"',\"'\"))}}\n}\n ",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
640,
0
],
"id": "21d7a234-7542-41be-b8cd-9d2f2dbee24a",
"name": "Prepare Response"
},
{
"parameters": {
"inputSource": "passthrough"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1.1,
"position": [
-440,
0
],
"id": "63ec4196-1b1b-4dd0-af8f-4110abb6f833",
"name": "When Executed by Another Workflow"
}
],
"connections": {
"Wait response": {
"main": [
[
{
"node": "Prepare Response",
"type": "main",
"index": 0
}
]
]
},
"Set variable based on social network": {
"main": [
[
{
"node": "Scrap special dataset post1",
"type": "main",
"index": 0
}
]
]
},
"Scrap special dataset post1": {
"main": [
[
{
"node": "Wait response",
"type": "main",
"index": 0
}
]
]
},
"Set response": {
"main": [
[]
]
},
"Prepare Response": {
"main": [
[
{
"node": "Set response",
"type": "main",
"index": 0
}
]
]
},
"When Executed by Another Workflow": {
"main": [
[
{
"node": "Set variable based on social network",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {
"When Executed by Another Workflow": [
{
"url": "https://x.com/tom_doerr/status/1887628241587827097"
}
]
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "8e95de061dd3893a50b8b4c150c8084a7848fb1df63f53533941b7c91a8ab996"
}
}
[
{
"url": "https://x.com/tom_doerr/status/1887628241587827097"
}
]
[
{
"response": {
"scraping_type": "x post (ex-twitter)",
"username": "Tom Dörr ",
"description": "Build AI agents with MCP"
}
}
]
Describe the problem/error/question
When calling a sub-workflow containing a Wait (Webhook) node, the return data is incorrect:
Steps to Reproduce
Current Behavior
Expected Behavior
Should return the processed data from the last node after webhook completion
Technical Details
What is the error message (if any)?
Please share your workflow/screenshots/recording
Share the output returned by the last node
Parent Workflow :
Sub-workflow :
Debug info
core
storage
pruning
client
Generated at: 2025-02-07T17:56:34.150Z}