Hello,
The version 1.69.0 came with a new feature to improve the sub-workflow debugging.
Now when debugging we can easily switch between parent and child workflows because now the Execute Workflow node adds metadata with the parent executionId
when calling the child workflow.
If you get the execution using the Publica API you can see how the Execute Workflow Trigger node has that information in its metadata:
{
"id": "74",
"finished": true,
"mode": "integrated",
"retryOf": null,
"retrySuccessId": null,
"status": "success",
"createdAt": "2024-12-11T07:56:46.567Z",
"startedAt": "2024-12-11T07:56:46.572Z",
"stoppedAt": "2024-12-11T07:56:46.576Z",
"deletedAt": null,
"workflowId": "ib6jLYrNcEtDFLKl",
"waitTill": null,
"data": {
"startData": {},
"resultData": {
"runData": {
"Execute Workflow Trigger": [
{
"hints": [],
"startTime": 1733903806576,
"executionTime": 0,
"source": [],
"metadata": {
"parentExecution": {
"executionId": "73",
"workflowId": "zarAaBmk9BonhzsK"
}
},
"executionStatus": "success",
"data": {
"main": [
[
{
"json": {
"field": "value"
},
"pairedItem": {
"item": 0
}
}
]
]
}
}
]
},
"lastNodeExecuted": "Execute Workflow Trigger"
},
"executionData": {
"contextData": {},
"metadata": {},
"nodeExecutionStack": [],
"waitingExecution": {},
"waitingExecutionSource": {}
}
},
"workflowData": {
"id": "ib6jLYrNcEtDFLKl",
"name": "Child",
"active": false,
"createdAt": "2024-12-10T11:03:32.436Z",
"updatedAt": "2024-12-11T07:56:38.830Z",
"nodes": [
{
"parameters": {
"notice": "",
"events": "worklfow_call"
},
"type": "n8n-nodes-base.executeWorkflowTrigger",
"typeVersion": 1,
"position": [
0,
0
],
"id": "08938be1-92ca-462b-8ff8-bfb7433b4dc1",
"name": "Execute Workflow Trigger"
}
],
"connections": {
"Execute Workflow Trigger": {
"main": [
[]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"pinData": {}
},
"customData": {}
}
My question is: Is it possible to access that parentExecution
metadata from the from other nodes of the sub-workflow in runtime?
My setup:
- n8n version: 1.70.3
- Database (default: SQLite): Postgres
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: MacOs
Thanks!