CallMeBot can be used in IFTTT as an Action ("THAT") to send WhatsApp Messages when something is triggered ("THIS") in IFTTT. 

The WhatsApp Service in IFTTT is not available as such (it is expensive to add it) but you can use IFTTT Webhooks to send WhatsApp messages through CallMeBot.

Setup:

You need to get the apikey form the bot before using the API:

1. Add the phone number +34 621 331 709 into your Phone Contacts. (Name it it as you wish)

  1. Send this message "I allow callmebot to send me messages" to the new Contact created (using WhatsApp of course)
  2. Wait until you receive the message "API Activated for your phone number. Your APIKEY is 123123" from the bot.
    Note: If you don't receive the ApiKey in 2 minutes, please try again after 24hs.
  3. The WhatsApp message from the bot will contain the apikey needed to send messages using the API.

You can send text messages using the API after receiving the confirmation.

Example:
58

5. Enjoy

5. Note, If you need any of the capabilities listed below, please check https://textmebot.com (low cost) or https://www.twilio.com/ (best official provider)
    - Send messages to others
    - Send messages to Groups
    - Send messages from your whatsapp number
    - Send Images
    - Send Buttons
    - Send documents
    - Receive the answers

How to send WhatsApp Messages in IFTTT using WebHooks

  1. Start creating your IFTTT Applet
  2. Set the trigger that you would like to use ("the THIS")
    For Example: "Any New SMS Receive" Trigger from the "Android SMS" Service
  3. Select the "Webhooks" as the service for the Action ("THAT")
  4. From the list of Webhooks Actions, select "Make a web request"
  5. Complete the Form as follow:
    1. URL: https://api.callmebot.com/whatsapp.php?phone=[phone_number]&text=[text]&apikey=[your_apikey]
    2. Method: GET
    3. Content Type: text/plain
    4. Body:   leave it empty
  6. Click Create Action

Where:

[phone_number]: Is your phone number asociated to your WhatsApp including the country code. (Ex: +34 123 123 123).
[text]: Message to send (urlencoded). You can use this online converter to encode the message. (i.e. %20 for space, %0A for new lines). WhatsApp formatting characters are allowed (i.e "*" for bold, etc.). Check here how to include emoticons in the message 👍.
[your_apikey]: The apikey that you received during the activation process (step 4-5 above). See "Setup" above

Examples of URL field in IFTTT

https://api.callmebot.com/whatsapp.php?phone=+33123123123&text=Test from IFTTT&apikey=1234

IFTTT Webhook to send whatsapp messages

How to use IFTTT ingredients in the Webhook web requests

You can use "ingredients" to send dynamic content through the webhook request. For example, you can use the text of the SMS received to send it over to WhatsApp.

When creation the IFTTT action (THAT), Click "Add ingredient" in the position where you want to add the ingredient within the "text" URL parameter. Then, select the ingredient that you want to add. This action will add {{ingredient}} into the URL field that will be replaced dynamically later based on the trigger information.

For Example of adding the SMS Text into the WhatsApp Text Message:
IFTTT SMS Ingredient example

Problems?

If you have problems, like not receiving the Call on Telegram, or not receiving the WhatsApp messages,  try to test the CallMeBot API using your Web Browser:

  • Telegram Phone Calls using Web Browser: here
  • Telegram Text Messages using Web Browsers: here
  • WhatsApp Text Messages using Web Browser: here

You might get some errors on the screen that will help you to identify the problem. (Ex: Calls disabled in the Telegram Security Settings, WhatsApp not activated, etc.)

If you still have problems using the API, don’t hesitate to contact me in Telegram @callmebot_com or by email at [email protected]. Remember to Follow me on Twitter to get news about coming features, changes, invitations, etc.