Webhook at end of workflow firing 20+ times per second

Hello

I have a workflow that ends in a http request that calls back to a web hook at the beginning to start it again. I thought doing it this way would work because the workflow itself takes a variable time to run (up to a couple hours)

The issue I’m facing is it seems like that http request at the end is going off like 20+ times per second rather than just a single time. This causes a bunch of instances of the workflow to be ran rather than just the intended start the workflow over again.

I’ve tried doing timeouts, different responses, get/post, etc. Responses seem fine get 200s, but I don’t understand why that http request is going off more than once

edit: the Postgres is set up to only return one row at a time with various filters.

Information on your n8n setup

  • n8n version:. 1.81.4
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via Docker:
  • Linux:

I have a strong assumption.

In a workflow, each node is executed once for every item. For example, if the Postgres node returns 20 items, the following node will run 20 times (usually in parallel).
If the next node in the chain is an HTTP node, it will send out 20 requests simultaneously.
This could explain the observed behavior.

If you would like to avoid this, you can either combine the data using the Aggregate node or adjust the settings for the node to Execute Once.

I should have called out that I have the Postgres set up to only return one row at a time.

As for this execute only once option, will it actually only execute once and then I need to manually reset the toggle? Or when the workflow gets looped through again does it reset?

Another option is to use a setup with multiple worker instances.

Could you share the workflow with us so we can take a closer look?

It’s possible that with the Postgres node for scrapemega, multiple items might be returned if article_url is not unique. In that case, the flow would proceed with multiple items.

To ensure the process runs smoothly, I would definitely set the Execute only once option on the last HTTP Request2 node.

1 Like

Ok, I’ll give it a try and will report back. Thanks

the execute once did fix it, thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.