Restart Workflow Once Item Is Processed - v2

Describe the problem/error/question

I am trying to build myself a queue of sorts for a specific workflow as I have rate limitations on API and connection issues, so what I have done is followed the advice from this post (Restart workflow once item is processed).

However whenever I run the workflow it seems to get into a loop and process so many more instances than it should.

For example if i have two rows in my database with status Queued, and run the workflow, it has about 10 or more executions, and it should only have 2.

The way the workflow I have build works is that I am querying my DB to see which is the last row with status Queued, I then take the email value and run a number of different nodes with this and at the end i update the mysql database with the status Done, and my final node is a HTTP node that calls the webhook at the begining of the workflow.

Please share your workflow

Information on your n8n setup

  • **n8n version:0.224.4
  • **Database (default: SQLite):MySQL
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):default
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • **Operating system:ubuntu 20.04

After getting on call with @Surge.Media we figured it out.

The Mautic node was returning 50 items, all of which were being processed resulting in the workflow being run 50 times a few milliseconds apart. Adding in a If node to so that only the 1 item that actually needed processing was passed through solved the issue.

4 Likes

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