Communication between Module and Bot


Hello i am new to Botpress had a question about the communication between an module and Bot.

I have made an module that wil be used as an webhook. What i can’t figure out is how to get the data posted in my webhook to my Bot.

In my module i have an function that posts in my webhook :’/message’, (req, res, next) => {
//after data post send message to bot

Does anyone know the options i can use. Would be gratefull


Hello, please, can anybody help me? I am trying to send data that I receive via my Express router in a created module, to my main bot project, so I can display them. Do I need to use middleware for that or can I use some sort of events

Any help would be appreciated


@Soufyanbreda I’m not quite getting the question. Are you getting any errors or smth?


Thanks for the reply i now know i can use bp.middlewares.sendIncoming to send an message.