Docs
Chat Widget Controls

Chat Widget Controls

Explore the available JavaScript APIs for extending and controlling your embedded chatbot widget.

This documentation provides a reference for all JavaScript APIs available to control and extend the functionality of your embedded chatbot widget.

Open Chatbot Window

Programmatically opens the chatbot window, making it visible to users.

window.Chatbot.open();

Try running this in your browser console where the chatbot is embedded to see it in action

Additional Instructions

  • Ensure the chatbot script is fully loaded before calling this function.
  • Note: The open() function only works with popup style widgets and is not supported for in-page embedded widgets.

Close Chatbot Window

Programmatically closes the chatbot window, hiding it from view.

window.Chatbot.close();

Try running this in your browser console where the chatbot is embedded to see it in action

Additional Instructions

  • Confirm the chatbot script is loaded before invoking this method.
  • Note: The close() function only works with popup style widgets and is not supported for in-page embedded widgets.

Summary

  • Each section documents a specific JavaScript API for interacting with your chatbot widget.
  • Use these APIs to build an interactive chatbot experience tailored to your website's needs.
  • Combine with other N8N Chat UI features for more powerful integrations like event callbacks