How to ban numbers in my WhatsApp chatbot

Hey folks,

I prepared a simple WhatsApp chatbot in n8n. Now I want to ban some number so so they don’t get a reply.

What I’d like to achieve is:

If a banned number sends a message, it should still trigger the WhatsApp node, but not be passed forward to the AI Agent (basically stop the workflow at that point).

Alternatively, is it possible to not even trigger the WhatsApp On Message trigger when the sender is in the ban list?

Either solution is appreciated. Thanks!

let me help you on that

1 Like

you can do something like this

you can hardcode your ban number inside the array in the code node

place this nodes after your whatsapp trigger and connect the false branch to your rest of your workflow

hope it helps!

2 Likes
2 Likes

Thank you for this

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