Problem with subworkflow run not returning the output to the parent

Describe the problem/error/question

I have a parent worfklow that checks if I have data in a node, if not, call the sub-wf.

The subworkflow node is set to wait for completion, and pass the correct input as specific fields (name, email) to the sub.

The sub-wf executes correctly and ends with a set node and I can see the output is correct in the sub-wf.

SUB-WF

However, once the sub-wf is done and returns to the parent, the ouput from the sub is never passed back to the parent. The output I can see on the parent flow for the sub-wf node is actually the ouptut from the previous node ! and not the sub output itself :weary_face:

Parent WF

I tried debugging with n8n AI, but it’s going in circle..

Expected child’s WF output back to the parent (which is correct looking at the sub’s exec output directly):

[
  {
    "full_name": "John Doe",
    "email": "johndoe@gmail.com",
    "company_name": "ACME",
    "personal_page": "https://wixsite.com/johndoe",
    "corporate_page": "https://www.acme.com/johndoe",
    "city_location": "Montreal",
    "preview_url": {
      "fr": "https://www.welcomespaces.io/fr/profiles/website_preview/abc123",
      "en": "https://www.welcomespaces.io/en/profiles/website_preview/abc123"
    }
  }
]

But what I see in the sub-wf node in the parent as output is always the output from the node BEFORE

Information on your n8n setup

  • n8n version: 1.107.4
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: Mac OSX Sequoia 15.6.1

Sub-wf:

and part of the parent WF (full wf is too large to paste in forum)

I think it’s happening because of the merge. It’s super buggy.

Hey, unfortunately you are most probably hitting a major bug:

If you remove the wait node from the subflow and it starts returning data, you will confirm it’s because of this. Workarounds:

  • stop using wait nodes in sub-flow (ANY nodes that wait for anything, not only the Wait node)
    OR
  • write data output from subflow to DB or somewhere, then read it from main flow, once it continues (make sure its set to wait for sub-flow to complete in that case)

Feel free to mark this as Solution if it helps

Good thinking on the output to DB and read it in the parent. I did not test this, but simply baked the subworkflow steps back into the parent.. Not ideal but it’s been working since then.