Whatsapp will send me tens of spam messages until I stop the workflow manually
I have no error message
META just blocks my api after a white sincer it is just producing spam.
META just blocks my api after a white sincer it is just producing spam.
I am also Facing the same problems with whatsapp message sending node. When I execute workflow without activating, it just send the message properly but when I activate my workflow and then trigger it by sending message it reply me with bunch of messages and continues replying on until I Deactivate it
If Someone Have the solutions Please Share
Your workflow is stuck in an infinite loop because it’s replying to its own messages. When your bot sends a message, the “Chat Received” trigger fires again for the message the bot just sent, creating a cycle that leads to spamming and getting blocked by META.[1][2]
Here are two crucial changes to stop the loop and make your workflow function correctly.
1. Make the Recipient Dynamic
Your “Send message” node is sending messages to a fixed, hardcoded phone number. You need to change this to dynamically use the phone number of the person who sent the original message.
In the “Send message” node, go to the Recipient Phone Number field.
Replace the hardcoded number with this expression:
{{ $('Chat Received').item.json.messages[0].from }}
This expression pulls the sender’s phone number from the trigger, ensuring the reply goes to the right person.[3]
2. Correctly Filter Out the Bot’s Own Messages
Your “Is from user?” IF node is essential to prevent the loop. It should check if the incoming message is from your bot’s own number and stop the workflow if it is.
Verify Your Bot’s WhatsApp ID: Double-check that the number in the rightValue of your IF node’s condition (15556675714) is the exact WhatsApp ID of your bot’s phone number.
Confirm the Expression: The expression {{$json[“contacts”][0][“wa_id”]}} is likely correct for getting the sender’s ID.[4] However, it’s a good practice to run a test, inspect the output of the “Chat Received” trigger, and confirm this is the correct path to the sender’s ID in the data.
Some webhook setups might include a boolean field like fromMe.[1] If your trigger data has such a field, you can simplify your IF node to check if fromMe is false.
By implementing these two fixes, your workflow will only reply to user messages, breaking the infinite loop and stopping the spam.
If my reply is helpful, kindly click like and mark it as an accepted solution.
Thanks!
I think you’ve got an infinite loop going on. Your bot’s responding to its own messages because the WhatsApp Trigger fires for every message, even the ones your bot sends.
try these:
Add a Code node right after the WhatsApp Trigger to filter out:
Messages from your bot number (892628727256985)
Duplicate message IDs
Non-text messages (like status updates or delivery receipts)
Either remove or update your current IF node—it’s not filtering your bot’s messages.
Add a 2-second delay between sends (rate limiting), just in case something goes wrong and to avoid spam.
this happens because whatsApp sends webhook events for all messages in the chat, even those sent by your bot. Without proper filtering, every reply triggers another execution, causing that infinite loop until Meta rate-limits you.
Hello! Im kind of stuck on writing the expression. I will provide the input from whatsapp and see if you have any recommendations for the filtering. I have no idea what code to write in this.
Hello! Thank you for your answer. Im very new to coding. I was wondering if you could help me with writing that formula. Im not entirely sure what variables to pick in this scenario. I will add a picture with the Whatsapp node output.
Just drag and drop the ‘display_phone_number’ into the expression field where you try to compare.(it will autopopulate the input.)
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.