WhatsApp Messenger is a free, cross-platform instant messaging and voice-over-IP service owned by Meta Platforms. It enables users to send messages using an internet connection, avoiding SMS fees. WhatsApp is available for Android and iOS and can be installed on smartphones.
To send messages to your WhatsApp account using Node-RED, you can use the CallMeBot service, a free API that acts as a gateway for sending alert messages from Node-RED. Learn more at CallMeBot. Detailed API usage instructions are available on their official website.
To use the CallMeBot WhatsApp API, you need an API key. Follow these steps:
Add the phone number +34 621 331 709 to your phone contacts (name it as you wish). Verify the number on the CallMeBot website as it may change.
Send the message "I allow callmebot to send me messages" to the contact via WhatsApp.
Wait for a response from the bot: "API Activated for your phone number. Your APIKEY is XXXXXX". The API key will be included in this message.
Note: If you don’t receive the API key within 2 minutes, try again after 24 hours.
To simplify sending messages to WhatsApp, install the node-red-contrib-whatsapp-cmb nodes:
In Node-RED, go to Menu > Manage Palette > Install.
Search for node-red-contrib-whatsapp-cmb and install it.
The WhatsApp node will appear in your Node-RED palette.
Here’s how to create a basic flow to send messages to WhatsApp using the installed node:
Drag a Send Message WhatsApp node, an inject node, and a debug node into your flow.
Wire them as follows: inject → Send Message WhatsApp → debug.
According to the WhatsApp node documentation, set the message content in msg.text (must be a string) in the inject node.
Configure the inject node:
Double-click the node.
Set the msg.text property to your desired message (e.g., "Hello from Node-RED!").

Configure the Send Message WhatsApp node:
Double-click the node.
Click the pencil icon to add a new WhatsApp account.
Enter a name, your phone number (in international format), and the API key from CallMeBot.
Click Update.
Set the Message field to msg.text.
Click Done.
Deploy your Node-RED application.
Click the square button on the inject node to trigger the Send Message WhatsApp node.
After a few seconds, you should receive the message in your WhatsApp account from the bot with the content set in the node.
Using Node-RED to send WhatsApp alerts combines the ease of use, flexibility, and powerful integration capabilities of Node-RED with the extensive reach and rich functionality of WhatsApp. This provides businesses and individuals with an efficient, cost-effective, and easy-to-maintain alert notification solution, particularly suitable for scenarios such as the Internet of Things, industrial automation, and system monitoring.