1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Detecting human presence in a WhatsApp chat to pause a chatbot (Python)

Discussão em 'Python' iniciado por Stack, Novembro 21, 2025.

  1. Stack

    Stack Membro Participativo

    I'm developing a WhatsApp chatbot in Python and want to implement a human handover feature. The goal is to temporarily pause the bot's automated responses when a human administrator opens the chat to read it (either on their phone or WhatsApp Web).

    My intended logic would be:


    1. A user is interacting with the bot.


    2. A human admin opens that specific chat to read the conversation. This event should pause the bot.


    3. If the admin sends a message, the bot remains inactive, signaling a full handover.


    4. However, if the admin simply reads the chat and closes it without sending a message, the bot should automatically resume its activity.

    I have reviewed the official WhatsApp Business API documentation but could not find a specific webhook event or flag that indicates when a user (the admin) has opened a chat for reading.

    Is there a known strategy or a reliable third-party API capable of detecting this kind of "presence" or "chat open" state? Any guidance or alternative approaches would be greatly appreciated.

    Continue reading...

Compartilhe esta Página