Member-only story

Create a ChatBot for Telegram using Node-RED and RedBot

Chelaru Adrian
7 min readMay 17, 2022

--

If you want to automate part of the processes you do every day for your customers or maybe create a simple text interface for controlling your smart home then everything will be straightforward with Node-RED and RedBot extension.

RedBot also supports Facebook Messenger, Smooch, Slack, Alexa, Twilio, and Viber. You can also extend RedBot to support other platforms like Discord.

Install the RedBot plugin in the Node-RED

Connect to the Node-RED web interface by accessing your Raspberry IP and append :1880, e.g.: http://192.168.0.156:1880 or http://raspberrypi.local:1880/ like here.

Don’t have a Raspberry Pi? Setup everything using IBM Cloud for free or on Heroku, also for free.

Navigate to the 🟩 green box “Manage palette” then to the “Install” tab and press the 🟦 blue box “install” button at the right of “node-red-contrib-chatbot”:

Install RedBot — chatbot plugin for Node-RED

You should now see a list of new nodes dedicated for RedBot in the left side panel of Node-RED.

Set up the bot for Telegram

So, the next concrete step is to make a demo bot for the Telegram and we will start by arranging some nodes dedicated to Telegram in Node-RED:

1. Create a simple node network (flow) using 🟨 “Telegram In”, “Telegram Out”, “Text”, “Conversation” and 🟧 “debug” nodes:

A simple test flow for Node-RED Telegram RedBot

Update March 2023:

It seems that there’s a behavior change in the first two nodes. You might need to add a “change” type of node…

--

--

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