Workflow fork doesn't wait nor run all the way to the end

I have two problems I’m trying to understand:

I’m “forking” the workflow at a certain point in which they do two different things, but I get them together in the end for a tweet that needs both those inputs. However one path is faster than the other one and essentially it results in the tweet being incomplete. I’d probably need to implement some sort of “wait” node so that the tweet only triggers when both data points have arrived. Is this (Wait node in workflow) the way to do it?

  "nodes": [
      "parameters": {
        "functionCode": "const waitTimeSeconds = 3;\n\nreturn new Promise((resolve) => {\n  setTimeout(() => {\n    resolve();\n  }, waitTimeSeconds * 1000);\n});\n\n"
      "name": "Wait",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
  "connections": {}

1.1: How many seconds can I delay it?
1.2 How would I attach an IF element to check if the data did not arrive in time and only continue to tweet if both elements are ready?

  1. the workflow does not seem to run all to the end - in my case after another fork, it does go towards the tweet, but not towards appending that data to a spreadsheet. What am I not considering?

Thank you, screenshot of situation is attached:

If you connect two input-connections to a node with only one input then the node will execute two times. Once for every input-connection.

What you want is to merge the branches first with a Merge-Node. It will then only proceed once data of both branches is available.

amazing @jan, I think that should fix both of my problems and I’ll move the sheet to the very end after the Twitter node.

Glad to hear! Have fun!