How to make the workflow execute only when the last execution ended

Hello, I created a sales automation workflow via webhook, and one of its main principles is to check whether the customer is already registered in the Notion database. In other words, if it is the first purchase, one automation runs, and from the second, another one runs.

It happens that sometimes customers buy more than 1 product at checkout, such as order bumps, and the sales platform triggers all webhooks at the same time, which ends up causing the automation to consider that the 5 purchases are from a new customer, as there is no time to create a new customer record in notion.

So, I wanted to know how to make the automations of this workflow happen in a queue, that is, one only starts when the last one finishes.

It turns out that I installed the environment already in queue mode with n8n-worker, n8n-principal and n8n-web.

Information on your n8n setup

  • n8n version: 1.66.0
  • Database (default: SQLite): Postgress/Redis
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Docker Queue
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker queue
  • Operating system: Linux Ubuntu 22.04

Hi @mcdonnel
You need a queue to use inside your workflows.
The queue mode of n8n is for n8n to controll multiple instances (workers).
I prefer to use RabbitMQ as it can easily be installed and used with the native nodes n8n has.
The trigger node has an option to set the nr parallel processes. If you set that to 1 it will do what you want. :slight_smile:

So, basically, n8n does not have a native solution for this?

No you can use whatever you want. :slight_smile:

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