Parent workflow is continuing while a subworkflow is waiting for webhook

Hello there ! I’m a brand new n8n user and I’m encountering a behaviour which is -I believe- quite strange.
I’m very sorry if the answer exists somewhere on this forum, I just haven’t found it yet :person_shrugging:

Describe the issue/error/question

I have a workflow containing a subworkflow, which have a Wait node (waiting for webhook). I want the subworkflow to avoid parent workflow to continue while the webhook has not been called.
The strange thing is that it works when the Wait node’s Resume field is set to “After time interval” but not when it is set to “On webhook call”.

Please share the workflow

Main workflow


Information on your n8n setup

  • n8n version:
    "n8n": "0.185.0",
    "n8n-core": "0.125.0",
    "n8n-workflow": "0.107.0",
  • Database you’re using (default: SQLite): PostgreSQL
  • Running n8n with the execution process [own(default), main]: own (I guess)
  • Running n8n via [Docker, npm,, desktop app]: npm

Hi @Arnoid, welcome to the community!

I am sorry to hear you’re having trouble. You’re quite right, this seemed unexpected to me as well when I first came across this. We have filed this internally as a bug, but it’s a rather complex one to address from the looks of it, so I don’t have a timeline for a fix I am afraid.

So for the time being you might want to avoid using the Wait node in a sub-workflow and move it into your parent :frowning:

1 Like

Okay then, thanks a lot for your answer, keep up the good work :slight_smile:

1 Like

I think I’ve encountered this before. Out of curiosity what time period did you have set? I think this might occur when n8n stores the waiting workflow back into the DB to save on memory. Can you try a wait value under 50s and then one over 5mins? I’d expect the one under 50s to work OK and the 5min one to get saved to the DB and return prematurely.

Yes, n8n would treat wait times differently depending on their length (everything above 65 seconds goes to the database). So it’d probably be fine with a wait time of less than 65 seconds. However, with the Wait node waiting for a webhook call like here the wait time can’t be configured. @jan put a lot of thought into the issue already, so I hope we’ll have a proper solution eventually.

Just for information, we are working on a workaround, basically having a webhook awaiter in main workflow, called by an action in the subworkflow.
Hope it can help :slight_smile:

1 Like

Here is a ugly but working workaround (all credits for my teammate, obviously) :

Main Workflow