Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Chatbot issues

Alessa
Mega Guru

Hello dear community, I need help:

 

I am conducting various tests to see if I can integrate a Botpress chatbot into the ServiceNow portal page.

For this, I have created a chatbot (with Botpress) and then I created a widget, but for some reason, it is not working. I will place the widget here so you can see what I did:

Alessa_0-1707416499648.png

 

Body HTML template:

 

<div class="chatbot-container">
  <iframe src="https://mediafiles.botpress.cloud/c8f96e9a-e2b0-4da4-a2b4-87d8f5f52f3e/webchat/bot.html" frameborder="0" width="100%" height="500px"></iframe>
</div>

 

CSS:

 

.chatbot-container {
  max-width: 600px;
  margin: auto;
}

 

Server script:

 

(function() {
  // Lógica específica del servidor si es necesaria, sin usar `document`
})();

 

Client controller:

 

api.controller=function() {
  var c = this;
  
  function loadScript(src, callback) {
    var script = document.createElement('script');
    script.src=src;
    script.onload = callback;
    document.head.appendChild(script);
  }

  c.onInit = function() {
    console.log("Intentando cargar el chatbot de Botpress...");
    loadScript("https://cdn.botpress.cloud/webchat/v1/inject.js", function() {
      console.log("Script de Botpress cargado.");
      loadScript("https://mediafiles.botpress.cloud/c8f96e9a-e2b0-4da4-a2b4-87d8f5f52f3e/webchat/config.js", function() {
        console.log("Configuración de Botpress cargada.");
      });
    });
  };
};

 

 
However, when integrating the widget I made into the portal, this happens:
Alessa_3-1707417212096.png

 


The chatbot opens in another window and not in the same ServiceNow portal. Can someone help me solve this? Is it possible to integrate a Botpress chatbot into the ServiceNow portal? Does anyone have experience with this who can help me find a solution?

 

Thanks in advance

 
CHATBOT BOTPRESS:
 
Alessa_1-1707416719390.png

 

 

 

 

1 REPLY 1

Simon Hendery
Giga Patron
Giga Patron

Hi @Alessa - I'm curious to know if there is a reason for not using Virtual Agent in this scenario?