Question / Feature Request: Auto-open n8n Chat widget when embedded

Question / Feature Request: Auto-open n8n Chat widget when embedded

Package / Area
@n8n/chat (embeddable chat widget) – version 0.27.1
n8n core version: 1.32.x
Deployment: self-hosted (Docker)


The problem

When the widget is embedded in window mode it shows only the toggle button.
I would like the chat window to open automatically on page load (or at least provide a configuration option to do so).

I already checked the README options and tried:

createChat({
  webhookUrl: 'https://my-instance/webhook/...',
  showWelcomeScreen: true,      // works but still needs a click
  mode: 'window',               // I need the floating window style
})

You could force the widget to open programmatically from your own code, waiting for the widget to load. For example:

<script>
  const widget = createChat({
    webhookUrl: 'https://my-instance/webhook/...',
    showWelcomeScreen: true,
    mode: 'window',
  });

  // Esperar a que esté montado y luego hacer clic al botón del toggle
  setTimeout(() => {
    const toggleButton = document.querySelector('.n8n-chat-widget__toggle');
    if (toggleButton) {
      toggleButton.click(); // Simula la apertura del widget
    }
  }, 1000); // Espera 1 segundo, ajusta según sea necesario
</script>