Open Auto reply whatsapp group

Discussion in 'AutoNotification' started by André Barros, Jul 16, 2017.

  1. André Barros

    André Barros New Member

    Joined:
    Jul 13, 2017
    Messages:
    6
    Likes Received:
    0
    Hi, I created a bot that send reports to my coworkers through whatsapp when they send password to it.

    But to guarantee that I'll always receive a notification with just the message, I use auto reply to answer "wrong password" to anything that is not the real password.

    But to use the bot in groups is impossible to keep a conversation with the bot replying "wrong password" to everything. I turned off the reply to anything when the message is from a group and tried to work with the complete list os messages at the notification using "%antextsbig()", and I were successful in get the password in the middle of the text using regex and saving it in a varible to test.

    So, after this step I though that auto reply and just user an IF with ~R comparing the antextsbig() to the regex and it world work, but it's not.

    Any idea of how I could reply just some specific messages in whatsapp groups or to make this comparison work?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,462
    Likes Received:
    418
    Why is your solution not working exactly?
     
  3. André Barros

    André Barros New Member

    Joined:
    Jul 13, 2017
    Messages:
    6
    Likes Received:
    0
    I don't know for sure. I can save de text in a variable and because of that I know that the profile ia recognizing the password. But when I use it in an IF to activate the auto reply it just do nothing. Nothing is send as response to the notification.
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,462
    Likes Received:
    418
    Then the problem seems to be in the If and not AutoNotification?
     
  5. André Barros

    André Barros New Member

    Joined:
    Jul 13, 2017
    Messages:
    6
    Likes Received:
    0
    When I said IF, I was talking abou the IF clause of AutoNotification Reply
     
  6. André Barros

    André Barros New Member

    Joined:
    Jul 13, 2017
    Messages:
    6
    Likes Received:
    0
    Trying to simplify the problem. If I send a sequence os messages to a group, and set a variable as %antextbig(), this is what I'm getting:

    Testando robo,15:06,00:00,Andre:BarrosMesa: oi,Andre:BarrosMesa: teste,Andre:BarrosMesa: PASSWORD,Andre:BarrosMesa: okokoko,Andre:BarrosMesa: gagasg,Andre:BarrosMesa: aetaetaet,…,Resp.,6 novas mensagens

    I tried simple regex like .*(PASSWORD).* or more complex like [.|\n|\W|\w]*(?=Password)[.|\n|\W|\w]*

    But no matter what I use as rule at the IF clause or as an IF outside the AutoNotification Reply, neither work with ~R antextsbig()
     
  7. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,462
    Likes Received:
    418
    Can you create a test task where you set %testing to
    Code (Text):
    Testando robo,15:06,00:00,Andre:BarrosMesa: oi,Andre:BarrosMesa: teste,Andre:BarrosMesa: PASSWORD,Andre:BarrosMesa: okokoko,Andre:BarrosMesa: gagasg,Andre:BarrosMesa: aetaetaet,…,Resp.,6 novas mensagens
    and then test the If manually there with that test variable?
     
  8. gabrielt

    gabrielt New Member

    Joined:
    Aug 10, 2017
    Messages:
    1
    Likes Received:
    0
    I'm with the same problem...
    I can't intercept the whatsapp notifications since whatsapp updated to 2.16.4xx.
    After that, if there are 2 (or more) whatsapp notifications, the AutoNotifications just read the first one (and not the last how it supposed to be)

    Anybody know how to make AutoNotifications just intercept the last Whatsapp message?
     
  9. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    4,462
    Likes Received:
    418
    Use an AutoNotification Query and that'll return all the notifications ordered by date :)
     

Share This Page