# Wait node in workflow \[GOT CREATED\]

**URL:** <https://community.n8n.io/t/wait-node-in-workflow-got-created/73>\
**Category:** Feature Requests (done)\
**Created:** [October 5, 2019, 4:22pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73 "2019-10-05T16:22:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mooghermez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mooghermez/32/26_2.png) [@mooghermez](https://community.n8n.io/u/mooghermez)\
**Post date:** [October 5, 2019, 4:22pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/1 "2019-10-05T16:22:25Z")

</div>

I think some flows need wait node.  
For example if after some minutes doesn’t occur any(or special) event execute another flow or some specific nodes.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [October 5, 2019, 5:14pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/2 "2019-10-05T17:14:06Z")

</div>

Totally agree! A wait-node would be very important for many use cases. Implementing that properly is sadly not trivial and would take some time. For a short wait time (a few seconds) it would be OK (and best) to simply leave the process running.

That can also be done with a Function-Node already like this:

For everything longer, it gets more complicated. Then it should save the data of the current workflow to the database, set up some kind of timer in the main process (which also has to handle when the main process gets restarted or is turned off for a longer time) and once the timer fires it has to load the data again from the database and then start the workflow from where it left off.

Because if somebody would, for example, automate some kind of signup flow where it first directly sends a welcome email and then another one a week later it would cause big problems. If such a wait is not implemented correctly there would be a lot of waiting processes that would over time eat up all the RAM and at some point crash the system.

It is definitely nothing impossible but sadly something which has to be thought about properly and done correctly.

---

<div class="post-metadata">

**Author:** ![mooghermez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mooghermez/32/26_2.png) [@mooghermez](https://community.n8n.io/u/mooghermez)\
**Post date:** [October 5, 2019, 8:07pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/3 "2019-10-05T20:07:19Z")

</div>

I think little you tell more.  
You are the best my friend.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [October 5, 2019, 8:21pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/4 "2019-10-05T20:21:57Z")

</div>

Thanks a lot!

Hope I will be able to create a proper solution for that soon!

---

<div class="post-metadata">

**Author:** ![mooghermez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mooghermez/32/26_2.png) [@mooghermez](https://community.n8n.io/u/mooghermez)\
**Post date:** [October 5, 2019, 8:23pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/5 "2019-10-05T20:23:26Z")

</div>

Thank you.  
I will so.

---

<div class="post-metadata">

**Author:** ![luanmuniz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/luanmuniz/32/65_2.png) [@luanmuniz](https://community.n8n.io/u/luanmuniz)\
**Post date:** [October 8, 2019, 5:10pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/6 "2019-10-08T17:10:02Z")

</div>

This is a good thing for me as well. I think a easy way to implement this is to have something in memory or in some storage like:

- Run task
- Stop task as status WAITING
- throw in memory that a task exist and it’s in waiting
- Check storage to see if there is anything in the queue
- If there is, run
- If there is not, wait for the “checker” to be called again
- fun checker every 30s or so and to that as the smallest timeframe (You can configure the timeframe as well)
- If it checked more than 5 times (configurable in the screen), just say it didn’t work

I don’t know if something like this is possible, but that’s how i did something like that for a client once

---

<div class="post-metadata">

**Author:** ![luanmuniz](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/luanmuniz/32/65_2.png) [@luanmuniz](https://community.n8n.io/u/luanmuniz)\
**Post date:** [October 8, 2019, 5:11pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/7 "2019-10-08T17:11:35Z")

</div>

This can be a good solution for a trigger that i want. Everytime a new line is introduced to google sheets, call the task. Today i will do that in lambda e call n8n via webhook. But this loop thing can be a good way to implement the new line in Google sheets.

---

<div class="post-metadata">

**Author:** ![Ranjan\_Mishra](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ranjan_mishra/32/219_2.png) [@Ranjan\_Mishra](https://community.n8n.io/u/Ranjan_Mishra)\
**Post date:** [October 31, 2019, 11:19am UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/8 "2019-10-31T11:19:19Z")

</div>

How did you add the trigger for google sheet when a new row is inserted in google sheets.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [October 31, 2019, 11:50am UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/9 "2019-10-31T11:50:02Z")

</div>

What do you mean exactly? How you would program one or how to do it currently? Because no such functionality exists yet.

---

<div class="post-metadata">

**Author:** ![Ranjan\_Mishra](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ranjan_mishra/32/219_2.png) [@Ranjan\_Mishra](https://community.n8n.io/u/Ranjan_Mishra)\
**Post date:** [October 31, 2019, 12:01pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/10 "2019-10-31T12:01:51Z")

</div>

I meant to say that , i want to listen for google sheet insertion event . Is there any way to do that ?

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [October 31, 2019, 12:03pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/11 "2019-10-31T12:03:06Z")

</div>

No currently no such trigger exists yet.

---

<div class="post-metadata">

**Author:** ![Ranjan\_Mishra](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/ranjan_mishra/32/219_2.png) [@Ranjan\_Mishra](https://community.n8n.io/u/Ranjan_Mishra)\
**Post date:** [October 31, 2019, 12:05pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/12 "2019-10-31T12:05:01Z")

</div>

So how can i program it manually , do i need to write a custom backend service(that will be an webhook api) so that i can use that as a webhook trigger ?

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [October 31, 2019, 12:13pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/13 "2019-10-31T12:13:06Z")

</div>

Did not have time yet to try if it works but I think that one could work:

> **[Changes: watch  |  Drive API  |  Google Developers](https://developers.google.com/drive/api/v3/reference/changes/watch)**

I had planned to use that one for a Trigger-Node if it does, at least as soon I find some time. For you to test, you can simply create a Webhook-Node, get its URL, and then add it as watch to Google manually. The workflow should then normally execute whenever you make a change.

It would be great if you could inform me if you tried it and if it worked.

---

<div class="post-metadata">

**Author:** ![mooghermez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mooghermez/32/26_2.png) [@mooghermez](https://community.n8n.io/u/mooghermez)\
**Post date:** [December 23, 2019, 11:59am UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/14 "2019-12-23T11:59:40Z")

</div>

I don’t know why recently it doesn’t work.  
Could we have something like timer (waiting for some minute) node probably?

Best regards.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [December 23, 2019, 12:56pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/15 "2019-12-23T12:56:08Z")

</div>

Sorry, I do not understand. What does not work exactly anymore?

No matter how the node is called, if timer or wait. It would sadly have exactly the same implications.

---

<div class="post-metadata">

**Author:** ![mooghermez](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mooghermez/32/26_2.png) [@mooghermez](https://community.n8n.io/u/mooghermez)\
**Post date:** [January 26, 2020, 1:39pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/16 "2020-01-26T13:39:37Z")

</div>

This is my error:

````
ERROR: No data got returned. Always return an Array of items!

```
Error: No data got returned. Always return an Array of items!
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Function.node.js:70:19)
    at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:370:47
```
````

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [January 26, 2020, 6:58pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/17 "2020-01-26T18:58:42Z")

</div>

Ah, you can fix it by simply making sure that items get returned. So this one will work fine:

---

<div class="post-metadata">

**Author:** ![svenjanssen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/svenjanssen/32/47634_2.png) [@svenjanssen](https://community.n8n.io/u/svenjanssen)\
**Post date:** [February 11, 2020, 8:17pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/18 "2020-02-11T20:17:06Z")

</div>

This is exactly the same as above, isn’t it? I got  
ERROR: No data got returned. Always return an Array of items!

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [February 11, 2020, 9:04pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/19 "2020-02-11T21:04:21Z")

</div>

No it is different as it returns the items and for that reason works fine.

---

<div class="post-metadata">

**Author:** ![svenjanssen](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/svenjanssen/32/47634_2.png) [@svenjanssen](https://community.n8n.io/u/svenjanssen)\
**Post date:** [February 13, 2020, 4:49pm UTC](https://community.n8n.io/t/wait-node-in-workflow-got-created/73/20 "2020-02-13T16:49:19Z")

</div>

My bad, works perfectly fine now 👍

[Next page](https://community.n8n.io/t/wait-node-in-workflow-got-created/73.md?page=2)
