Skip to main content

I have a problem: I’m using Coexistence mode, and when a human sends a message through WhatsApp Business, ManyChat receives it and forwards it to my AI Agent as if it were the client’s last message.

I analyzed the reception of 2 JSONs in n8n:

  • when a human sends through WhatsApp Business

  • when a customer sends a message normally

Both JSONs are identical; there’s no field I can use to identify that it was a human replying. How can I work around this?

I’m sending “Full Contact Data” to n8n via HTTP request, but I haven’t found a way to differentiate the JSON when it’s a human responding.

I’m saying this because my client doesn’t want to stop using WhatsApp Business in favor of ManyChat — he prefers to keep the conversation in the official WhatsApp app. But whenever a human responds via WhatsApp, ManyChat triggers an automation and the AI replies immediately afterward. 😅

Vi agora sua mensagem e estou passando pelo mesmo problema.
Enquanto não resolvem essa questão, que acredito que resolveria só implementando uma forma de apontar que foi uma mensagem enviada pelo humano no WhatsApp App Celular, acho que podemos criar uma lógica de verificação.

Eu uso um ‘custom field’ de nome ‘input_gpt’ para enviar a entrada do usuário para a IA via HTTP Request. Toda vez que envio, após enviar pra o Request eu limpo este campo ‘input_gpt’. Podemos criar um ‘custom field’ nomeado como ‘last_input_user’, parecido com o que existe no System, e armazenar como backup o último texto do usuário. Toda vez que o usuário enviar uma nova mensagem, e essa informação for para a IA via HTTP Request, armazena o texto em ‘last_input_gpt’ e limpa-se o campo ‘input_gpt’. Então toda vez que vier uma nova mensagem, primeira verifica com o bloco de Condição, se a mensagem que está chegando é igual ao ‘last_input_gpt’ ou não; se for igual, pode ser o caso de um humano ter enviado pelo Celular e ter vindo o mesmo texto da última vez; se não for, trata como nova interação do usuário realmente.

 

Seguindo esta mesma lógica, daria até pra implementar um “stop” caso o humano envie mensagem do Whats pelo celular, já que existe a possibilidade agora de inserir no bloco de “Ação” a opção de ‘Pausar automações’. Depois cabe decidir na sua solução se faz um ‘stop’ permanente pra esse usuário e depois retirar esta pausa manualmente pelo Manychat, no chat ao vivo, ou a inserir uma pausa com tempo estabelecido, voltando a automação normalmente após este tempo.

Testa aí e me diz se dá certo!
Espero que tenha ajudado! 😀


Hey, I just saw your message and I’m running into the exact same issue too.

Until they officially solve this — which honestly I think could be as simple as adding a way to flag when a message comes directly from the human using the WhatsApp Mobile App — here’s a workaround that might help:

I use a custom field called input_gpt to send the user input to the AI via HTTP Request. After sending it, I immediately clear that field. What we could do is create another custom field, something like last_input_user (similar to the built-in system fields), and use it to store the last text the user sent as a backup.

So every time the user sends a new message and it goes through the HTTP Request to the AI, we save that text in last_input_gpt and clear input_gpt. Then, when a new message comes in, you just check with a Condition block: is this incoming message equal to last_input_gpt?

  • If yes, it might actually be the human typing through the WhatsApp app (same text as last time).

  • If not, then you treat it as a real new user interaction.

With this same logic, you could even add a kind of “stop” when the human sends a message via the WhatsApp app. Since Manychat now allows “Pause automations” inside the Action block, you can decide if you want that stop to be permanent (then you’d manually remove the pause later in Live Chat), or temporary with a set duration, so automations resume automatically after the pause.

Give it a try and let me know if it works for you! Hope this helps! 😀