Guía completa de integración para desarrolladores
El Novapsis Chat Widget es una solución de chat inteligente que se integra perfectamente con n8n para proporcionar respuestas automatizadas mediante IA. Desarrollado por Novapsis, especialistas en automatización B2B.
Conecta directamente con OpenAI y otros modelos de IA a través de n8n
Colores, tamaños, posición y mensajes completamente configurables
Funciona perfectamente en desktop, tablet y móvil
Optimizado para cargar en menos de 1 segundo
<script>
window.NovapisChatConfig = {
webhook: {
url: 'https://tu-n8n.com/webhook/TU-WEBHOOK-ID',
route: 'chat'
},
branding: {
logo: 'https://tu-sitio.com/logo.png',
name: 'Tu Empresa',
welcomeText: '¡Hola! ¿Cómo podemos ayudarte?',
responseTimeText: 'Respondemos en minutos'
},
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
position: 'right'
}
};
</script>
<script src="https://chat.novapsis.com/v1/novapsis-chat-init.js"></script>
<script>
window.NovapisChatConfig = {
// 🔗 Configuración del Webhook
webhook: {
url: 'https://tu-n8n.com/webhook/TU-WEBHOOK-ID',
route: 'chat'
},
// 🏷️ Configuración de Marca
branding: {
logo: 'https://tu-sitio.com/logo.png',
name: 'Tu Empresa',
welcomeText: '¡Hola! ¿Cómo podemos ayudarte?',
responseTimeText: 'Respondemos en minutos',
poweredBy: {
text: 'Powered by Tu Empresa',
link: 'https://tu-sitio.com'
}
},
// 🎨 Configuración de Estilo
style: {
// Colores
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
backgroundColor: '#ffffff',
fontColor: '#333333',
// Tamaño y Posición
width: '400px',
height: '650px',
position: 'right', // 'left' o 'right'
bottom: '20px',
right: '20px',
left: '20px', // solo si position es 'left'
// Apariencia
borderRadius: '16px',
buttonSize: '70px',
shadowIntensity: 'normal', // 'none', 'light', 'normal', 'strong'
// Tipografía
fontSize: '16px',
fontFamily: '"Arial", sans-serif',
// Comportamiento
autoOpen: false,
autoOpenDelay: 3000,
minimizeAnimation: true,
showTypingIndicator: true,
enableSounds: false
}
};
</script>
<script src="https://chat.novapsis.com/v1/novapsis-chat-init.js"></script>
| Opción | Tipo | Por Defecto | Descripción |
|---|---|---|---|
webhook.url |
String | '' | URL del webhook de n8n (requerido) |
branding.name |
String | 'Novapsis' | Nombre de tu empresa |
style.primaryColor |
String | '#2CBAFF' | Color principal del widget |
style.width |
String | '380px' | Ancho del widget |
style.position |
String | 'right' | Posición: 'left' o 'right' |
style.autoOpen |
Boolean | false | Abrir automáticamente |
<script>
window.NovapisChatConfig = {
webhook: {
url: 'TU_URL_DE_WEBHOOK_N8N_AQUI',
route: 'chat'
},
branding: {
logo: 'https://i.ibb.co/wNdRxBnz/20250524-1423-Logo-Sin-Fondo-remix-01jw13yj2gf9f8001jz7pbswe8.png',
name: 'Novapsis',
welcomeText: '¡Hola! ¿Cómo podemos ayudarte?',
responseTimeText: 'Aquí respondemos todas tus dudas',
poweredBy: {
text: 'Powered by Novapsis',
link: 'https://www.novapsis.com'
}
},
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
backgroundColor: '#ffffff',
fontColor: '#333333',
headerBackgroundColor: '#2CBAFF',
headerTextColor: '#ffffff',
width: '400px',
height: '650px',
position: 'left',
bottom: '20px',
right: '20px',
left: '20px',
borderRadius: '16px',
buttonSize: '70px',
shadowIntensity: 'normal',
autoOpen: false,
autoOpenDelay: 3000,
minimizeAnimation: true,
showTypingIndicator: true,
enableSounds: false
}
};
</script>
<script src="https://chat.novapsis.com/latest/novapsis-chat-init.js"></script>
<!-- Función para forzar estilos manualmente si es necesario -->
<script>
// Función de emergencia para forzar estilos
function forzarEstilosCabecera() {
const headers = document.querySelectorAll('.brand-header, [class*="brand-header"]');
headers.forEach(header => {
header.style.setProperty('background', '#2CBAFF', 'important');
header.style.setProperty('background-color', '#2CBAFF', 'important');
header.style.setProperty('color', '#ffffff', 'important');
const textElements = header.querySelectorAll('*');
textElements.forEach(el => {
el.style.setProperty('color', '#ffffff', 'important');
});
});
console.log('🎨 Estilos de cabecera forzados manualmente');
}
// Ejecutar después de que se cargue todo
setTimeout(forzarEstilosCabecera, 2000);
</script>
style: {
primaryColor: '#003366',
secondaryColor: '#0066cc',
backgroundColor: '#ffffff',
fontColor: '#333333',
borderRadius: '8px',
shadowIntensity: 'strong',
fontSize: '15px',
fontFamily: '"Roboto", sans-serif'
}
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
backgroundColor: '#ffffff',
borderRadius: '16px',
buttonSize: '70px',
shadowIntensity: 'normal',
minimizeAnimation: true
}
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
width: '350px',
height: '500px',
fontSize: '14px',
buttonSize: '60px',
position: 'right',
bottom: '10px',
right: '10px'
}
En el nodo Chat Trigger:
https://chat.novapsis.com, https://tu-dominio.com, *Chat Trigger → OpenAI → Response to Webhook
Soluciones:
Access to XMLHttpRequest blocked by CORS policy
Solución:
En n8n Chat Trigger: Allowed Origins (CORS): https://chat.novapsis.com, *
Solución: Usa un servidor local:
# Python python3 -m http.server 8000 # Node.js npx http-server # Luego accede a http://localhost:8000
Soluciones:
</body>NovapisChatConfig esté definido antes del scriptSoluciones:
<script>
window.NovapisChatConfig = {
webhook: {
url: 'https://inmobiliaria-n8n.com/webhook/abc123',
route: 'chat'
},
branding: {
logo: 'https://inmobiliaria.com/logo.png',
name: 'Inmobiliaria Premium',
welcomeText: '¡Hola! ¿Buscas tu hogar ideal?',
responseTimeText: 'Te ayudamos a encontrar la propiedad perfecta'
},
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
position: 'right'
}
};
</script>
<script src="https://chat.novapsis.com/v1/novapsis-chat-init.js"></script>
<script>
window.NovapisChatConfig = {
webhook: {
url: 'https://tienda-n8n.com/webhook/def456',
route: 'chat'
},
branding: {
logo: 'https://tienda.com/logo.png',
name: 'Tienda Online',
welcomeText: '¿Necesitas ayuda con tu compra?',
responseTimeText: 'Soporte 24/7 disponible'
},
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
autoOpen: true,
autoOpenDelay: 5000
}
};
</script>
<script src="https://chat.novapsis.com/v1/novapsis-chat-init.js"></script>
<script>
window.NovapisChatConfig = {
webhook: {
url: 'https://empresa-n8n.com/webhook/ghi789',
route: 'chat'
},
branding: {
logo: 'https://empresa.com/logo.png',
name: 'Consultoría Empresarial',
welcomeText: '¿Cómo podemos impulsar tu negocio?',
responseTimeText: 'Expertos en transformación digital'
},
style: {
primaryColor: '#2CBAFF',
secondaryColor: '#1E90FF',
width: '420px',
height: '700px',
shadowIntensity: 'strong'
}
};
</script>
<script src="https://chat.novapsis.com/v1/novapsis-chat-init.js"></script>
contacto@novapsis.com
Disponible en nuestro sitio web
+34 621 38 59 57