Implementing a new communication channel such as telegram without affecting the logic of your project is very simple. Below you can find the starting point to implement the new telegram provider.


    pnpm install @builderbot-plugins/telegram
import { createBot, MemoryDB, createProvider, addKeyword, createFlow } from '@builderbot/bot'
import { TelegramProvider } from '@builderbot-plugins/telegram'

const welcomeFlow = addKeyword(['hi'])
    .addAnswer('Ey! welcome')
    .addAnswer('Your name is?', { capture: true }, async (ctx, { flowDynamic }) => {
        await flowDynamic([`nice! ${ctx.body}`,'I will send you a funny image'])
    .addAction(async(_ , {flowDynamic}) => {
        const dataApi = await fetch(``)
        const [imageUrl] = await dataApi.json()
        await flowDynamic([{body:'😜', media: imageUrl}])

const main = async () => {
    const adapterDB = new MemoryDB()
    const adapterFlow = createFlow([welcomeFlow])
    const adapterProvider = createProvider(TelegramProvider, {

    await createBot({
        flow: adapterFlow,
        provider: adapterProvider,
        database: adapterDB,


In this way we have already implemented a new provider for Telegram keeping the same logic.


My first chatbot

Learn how build your first chatbot in few minutes

Read more


Understand the essential concepts for building bots

Read more

Add Functions

The key to learning how to write flows is add-functions.

Read more


Unlimitate and start implementing the community plugins.

Read more



Learn how to modularise flows so that you can have a more maintainable bot.

Send Message

How to send a message via HTTP to start conversations, you can send multimedia as well.


A good practice is to dockerise your bots to make them more maintainable and effective.


Learning about events will make us more fluent when creating chatbots.