Custom Modules help

Hi, I’m evaluating Botpress solution to use it in a project, so he is new to me. And I have a question that I didn’t find the answer yet, so I’m here to find it.

I’m aiming to use webchat embedded at my website and I need to customize the look&feel, but I can’t assume that all users understand how css works. So I was thinking about building a custom module at the Admin Panel so any non-developer user can set the look&feel without any line of code.

So my question is: is that possible? Or the custom modules don’t work that way and I have to build some external app to edit the custom css file outside Botpress? Or I’m missing something here and this is already an option available?

That’s possible yes, and would be a very good contribution to the core project as well.

Your module would have the following pieces:

  1. A GUI to modify the colors etc (see how other modules work to create a GUI)
  2. The GUI would save the values to a file inside your <data_dir>/bots/webchat_styling.json or something like that
  3. It would also generate a CSS file inside the <data_dir>/assets folder (like <data_dir>/assets/webchat_styling/<botId>.css
  4. Your module would override the webchat Shortlink to include the CSS file, like here:

To create a module, please refer to this thread: Creating a new module

Does that make sense?

1 Like

Yeah! Thanks for the answer, I’ll try that for sure

1 Like