Member-only story

Create a WhatsApp personal account bot using Node-RED and link node

Chelaru Adrian
5 min readMar 10, 2023

--

I’ll show you how easily you can create a highly customizable bot for your personal WhatsApp account 😉.

Initial Node-RED setup

Let’s bring the Node-RED alive if you didn’t already by using the “Install NodeJS, NPM, and Node-RED on Raspberry Pi OS Lite 64-bit” then you can install it fast and easily by using Docker.

You can also deploy Node-RED on IBM Cloud, Horeku, Fly.io, or whatever is capable of hosting web apps, Docker containers, and Linux servers.

Install the plugins

This is the fastest way you can create a personal WhatsApp is by using Node-RED and the “node-red-contrib-whatsapp-link” node.

This extension is still in beta development by the creator and might crash Node-RED. Use RedBot with a WhatsApp Business account if you want something more stable, but harder to set up and not personal use friendly.

You can do this from the 🟩 pallete manager inside the Node-RED:

Install the WhatsApp link extension in Node-RED

Let’s test it

Create a simple flow containing 🟨 Whatsapp type nodes of “admin”, “chat — in”, and “chat — out” and two function nodes 🟧 “change” and “template”.

Simple WhatsApp bot flow inside Node-RED

Now let’s configure the WhatsApp nodes as bellow.

Double click each node and for:

  • “WA Admin”: 🟦 create a new “whatsappLink” of type Whatsapp Lite;
  • “Chats in”: 🟫 select the created link as “Client”, “message.upsertas “Socket Event” and “message” as “Web Event”;
  • “Chats Out”: 🟫 the same as above for “Client”;

--

--

Chelaru Adrian
Chelaru Adrian

Written by Chelaru Adrian

💻 Hey, I'm here to share my passion for tech! 🚩 Follow me on Medium for exciting new ideas and innovative solutions.

Responses (1)

Write a response