Webhook Question

Hello.

I want to ask about the Webhook module that triggers a workflow.

Let’s say i create one and give the end user the url to call it.

It calls it the first time and the workflow starts executing.

If the user abuse and spams the URL continuously how does the Webhook module behaves?

It ignores the user’s calls and waits for the workflow to finish before it gets to run again?

Hi @Mulen, n8n would currently not have any rate limiting or throttling mechanisms built into the webhook node, so you would need to handle this manually.

@harshil1712 presented an approach to this using Redis recently and you can view the talk at Redis Monthly Live with Harshil Agrawal - YouTube. The workflow is available at https://n8n.io/workflows/1236

3 Likes

Thank you will look to it.

Basically for me it doesn’t matter the rate limit, just how n8n behaves.

For example i have a workflow that counts to 10 and store it to a file.

If the user calls the webhook and the workflow starts and reach 5

User clicks webhook

1, 2, 3, 4, 5

Users clicks again webhook

Will it finish counting to 10? Or it will start again from the beggining after 5?

Both requests will finish, so you would end up with two files having 10 in them in your example

Hey @Mulen,

For every click by the user, a new execution starts. So if a user clicks on the link, the execution will start. Now if the user clicks on the link again, another execution will start, without interfering with the previous execution. In other words, these will run in parallel.

I hope this answers your question :slight_smile:

Thank you very much now i get it.

1 Like