You can now send WhatsApp notifications from HA

You need to create multiple APIkeys. One per phone number.
And then create multiple notify rest components and call one after the other in the Automation.

notify:
  - name: WhatsApp1
    platform: rest
    resource: https://api.callmebot.com/whatsapp.php
    data:
      source: HA
      phone: +49123123123
      apikey: 123456
  - name: WhatsApp2
    platform: rest
    resource: https://api.callmebot.com/whatsapp.php
    data:
      source: HA
      phone: +49456456456
      apikey: 456789

Not very efficient but it is working fine.

1 Like

I was wondering if it is possible to send attached images?

1 Like

That would be great indeed!

Many thanks for this, works perfectly and means I can send messages for those that don’t have Telegram (yet!!).

this is so cool, thanks for setting this up!
Any progression on being able to send images?

Did some tinkering and managed to get Whatsapp to send a weblink to an internal image that I wanted to share. Only issue though is you need a static IP (or functional Dynamic DNS name) and appropriate FW rules. But it works! :slight_smile:

2 Likes

Can someone guide please how to send whatsapp mesaage to multiple numbers. I have got 2 api keys and struggling with yaml code. I tried following but its invalid.

Something like this

notify:
  - name: Phone1
    platform: rest
    resource: https://api.callmebot.com/whatsapp.php
    data:
      source: HA
      phone: +987654
      apikey: 689899
  - name: Phone2
    platform: rest
    resource: https://api.callmebot.com/whatsapp.php
    data:
      source: HA
      phone: +123456
      apikey: 123987 
1 Like

Hi there,
yes, you have this option to send to HA notifications to whatsapp groups:

Enjoy it!

2 Likes

Thanks, tried this and it does not work. I can send was messages to myself through that Api but it simply will not set up a group. The bot will create the group just fine as per the API instructions and add me as the admin, but when I send the “group-id” command to get the group id so I can actually send messages to the group the bot will just not respond back with the group ID as per the API description.

The group-id should be working now, it was a bug that is already solved.

1 Like

Thank you, I can confirm that this is indeed working now, thank you!

The callmebot website must be collecting a lot of interesting information… How can this be secure?

3 Likes

Hi, just checking if anyone else had this issue.
I have setup using the callme method, and it sends notifications…only if I trigger it once it will continue sending the same message over and over every couple seconds. I’ve tried adding a helper toggle and having it send a message when the toggle is of to try see if it’s maybe a command being repeated from HA but no use. Ended up blocking the bot just to have some peace and quiet.

I have this code

id: '1688280487861'
alias: whatsapp_Koelkast
description: als de koelkast 8 minuten open staat, krijgen we een whatsapp bericht
trigger:
  - type: opened
    platform: device
    device_id: ae02cd49848f14204d6c787934c239ba
    entity_id: binary_sensor.deursensor_koelkast_contact
    domain: binary_sensor
    for:
      hours: 0
      minutes: 8
      seconds: 0
condition: []
action:
  - service: whatsapp.send_message
    data:
      clientId: default
      to: [email protected]
      body:
        text: De koelkast in de keuken staat open !
mode: single

What is wrong with it ?

Does someone know if you can send images to WhatsApp?

Just follow the link at the OP and you’ll get the answer :wink:

HI. You can display you configuration.yaml and our automation for callmebot api ?

Yes, you may:

You can send Images via WhatsApp using the following URL (GET method):

http://api.textmebot.com/send.php?recipient=[phone number]&apikey=[your premium apikey]&text=[text to send]&file=[url of image]

You can send Images via WhatsApp using the following URL (GET method):

http://api.textmebot.com/send.php?recipient=[phone number]&apikey=[your premium apikey]&text=[text to send]&file=[url of image]