Looping workflow to listen for webhook

Hi all,

My expectation was that this would be a rather common question, but can’t seem to find much information on it.

What I want to achieve:

  • When I add an item to a specific project in Todoist, create an email and send to two people

How I have (currently) set about it:

  • Setup Todoist app, to send webhook requests
  • Use n8n webhook node to receive incoming request
  • Use n8n Gmail node to send email

All this work just fine, and I’m amazed at the UI/UX the app provides.

The challenge:

  • How do I make sure that the webhook is continuously accessible?

In essence, I’m thinking about it in two ways:

  • I’m missing something obvious to allow workflows to be restarted at the end of each execution
  • I will need to create a loop around the flow, but I can’t see how I “start” the webhook node
  • Periodically load all items from the Todoist project into a database, and loop through the items to see if new items have been added

What’s the “correct” way of doing it - and am I missing something obvious to make this work?
Thanks in advance for any help :pray:

Hi @thesnowman, welcome to the community :tada:

How do I make sure that the webhook is continuously accessible?

This can be achieved by enabling the workflow in upper right corner:

Whenever the workflow is in active state, the production URL is active and will cause the workflow to run in the background:

You can send as many webhooks to the production URL as you want so this is probably what you’re looking for. No need for a loop :slight_smile:

The test URL on the other hand can only be used when you execute the node/workflow manually and will show the incoming data sent to the test URL in real time. You can also read about this here in our webhook node documentation.

Thanks @MutedJam !
This was exactly what I was looking for - now I feel a bit silly.

I could have sworn I had tried to make several requests to the same endpoint, and getting a 404 and the “not registered” error message, but now that I test it, you are absolutely right, it triggers whenever I call the webhook.

Anyway, thanks for taking the time, despite this being a bit of a user-error kind of questions :wink:

Ah, no need to feel silly - this still happens to me frequently :smiley:

Luckily it’s usually very easy to fix, double-checking the URL, HTTP method or other settings usually does the trick. I’m glad to hear my input helped, thanks a lot for confirming!