Best practice for sending multiple mails?

Hello,

I work in an environment with 400+ employees. I’m trying to implement a way for HR to send multiple emails to my colleagues based on filtered selection on a webpage…

I have a mechanism that can trigger my webhook in n8n, however my current mechanism can’t manage batches or retries…

So if it’s an “all employees” email, there will be 400+ requests to the webhook in a short time. I did some tests; my current setup can survive this on .114, however it is tough.

I have seen this RabbitMQ -> SMS flow (https://n8n.io/workflows/845)

What I basically want to ask is how should I set this up?

change my mechanism to queue in rabbitMQ instead of calling my webhook and change my webhook trigger to rabbitMQ ?
set an interval trigger and check rabbitMQ on intervals?
really try to change my sending mechanism to send in batches of 100 emails per request and change my webhook accordingly?
or any other way that’s more suggested?

So if it’s an “all employees” email, there will be 400+ requests to the webhook in a short time. I did some tests; my current setup can survive this on .114, however it is tough.

What do you mean exactly with it’s tough? What is a short time?

change my mechanism to queue in rabbitMQ instead of calling my webhook and change my webhook trigger to rabbitMQ ?

In my opinion, rabbitMQ would be an overkill for this. Plus, it will add complexity since you now have to maintain a queue.

set an interval trigger and check rabbitMQ on intervals?

This is not needed. The RabbitMQ Trigger automatically fires the workflow when there is a new message is on the queue.

really try to change my sending mechanism to send in batches of 100 emails per request and change my webhook accordingly?

Yes, you can do it like this as well.

Hi @RicardoE105,

short time is around 2-3 seconds. Sorry, with “tough” I meant to say I tried it several times and sometimes the server got unresponsive or responded several minutes later with timeouts. not reliable in that sense.

What I’m wondering is if the sending of emails is at the same speed for webhook or MQ, which one would be easier for n8n to handle?
400 webhook requests per second or 400 rabbitmq triggers a second

We discussed this in the post below.

We discussed this in the post below.

I see, I didn’t realize this would be my main problem. Thanks, I’ll try it ASAP.

Thanks for the pointer

work done!