# Node execution order / wait for both inputs before node execution

**URL:** <https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184>\
**Category:** Questions\
**Tags:** core, node\
**Created:** [May 20, 2022, 9:31am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184 "2022-05-20T09:31:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Pedot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thomas_pedot/32/11975_2.png) [@Thomas\_Pedot](https://community.n8n.io/u/Thomas_Pedot)\
**Post date:** [May 20, 2022, 9:31am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184/1 "2022-05-20T09:31:48Z")

</div>

Hello,  
I wonder if we can control the node execution order or block the execution of a node if both inputs are not started.

Use case:  
I am using $node[‘SomeNodeToBeTriggeredBefore’] inside a **Actual** Function node.

If **SomeNodeToBeTriggeredBefore** is not triggered before the **Actual** node will fail since $node[‘SomeNodeToBeTriggeredBefore’] is not defined.

How to be ensure this ?

I read this but I am not convinced about _in the order of what you connected first_.

- [Workflow nodes execution order?](http://community.n8n.io/t/workflow-nodes-execution-order/13546)
- [Order of execution among nodes](http://community.n8n.io/t/order-of-execution-among-nodes/7962)

The way we built work flow is not the way we want it executed 🙂

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [May 20, 2022, 9:52am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184/2 "2022-05-20T09:52:15Z")

</div>

Hey @Thomas_Pedot,

Best I can think of at the moment would be to use a merge node with the wait option, The other more complicated option would be to redesign the workflow and maybe use sub workflows that you call where you need them.

Being able to specify a run order seems like a solid feature request though.

---

<div class="post-metadata">

**Author:** ![Thomas\_Pedot](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thomas_pedot/32/11975_2.png) [@Thomas\_Pedot](https://community.n8n.io/u/Thomas_Pedot)\
**Post date:** [May 20, 2022, 10:03am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184/3 "2022-05-20T10:03:42Z")

</div>

Hello,  
I am not sure the wait function will work since I understand that the workflow is not executed in parallel ?

I consider reorganizing my workflow for now.

Without implementing something heavy, at least having kind of visual number on whennodes will be executed first in the UI would help without running the workflow.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [May 20, 2022, 10:13am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184/4 "2022-05-20T10:13:40Z")

</div>

So the wait node would sit there until both inputs have data so if it runs the top part first it would wait for the second one to finish as well before starting it does involve having to reshuffle things.

I find that using sub workflows was the best solution for me but it isn’t always ideal.

---

<div class="post-metadata">

**Author:** ![minhna](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/minhna/32/83754_2.png) [@minhna](https://community.n8n.io/u/minhna)\
**Post date:** [May 24, 2025, 7:46am UTC](https://community.n8n.io/t/node-execution-order-wait-for-both-inputs-before-node-execution/14184/5 "2025-05-24T07:46:47Z")

</div>

You can use Merge node then an Aggregate node to combine data.
