Add a chatbot to your website


This guide will walk you through steps to add a web widget (to your website) for any chatbot created on the Gupshup platform. Widget publishing tool (as shown in the below image) allows you to customize the look and feel of the widget also, get you the widget script which can be embedded onto any website.

widget config page

Here's how you can do so:

  1. Create a bot using Gupshup's Bot Builder tools. If you aren't familiar with this, You may refer to A 'Hello world' bot guide for developers or Flow bot buider guide for non-developer.
  2. Once the bot is created, go to the 'Publish' section. Every bot in the 'My Bots' section has an corresponding 'Channels' button. Click it to go to the publish section.
    channels button click
  3. From the list of channels click web widget's 'Publish' button.

    You should see the Web Widget configuration page where you can customize the visual details of the web widget. Detailed explanation of the options for customization are given under Customization Options section below.
  4. Once done with Widget UI customization, click 'Save' button to save your settings. Thereafter, click on the 'Get Code' button to copy the script tag and paste it into the source HTML of your web page. That's it! you are done with adding widget for the bot on the website.

    Here's a sample HTML code as a reference:
    <HTML>
        <HEAD>
            <script id="gs-sdk" src='//www.buildquickbots.com/botwidget/v3/demo/static/js/sdk.js?v=3' key="2bxx79xx-0dxb-4xx4-ac71-x4a42xxxxxxx"></script>
        </HEAD>
        <BODY>
            <h2> hello world! </h2>
        </BODY>
    </HTML>
    

Customization options


Following are the options to customize the visual details of the widget:

Tab 1: Open Mode

Tab 2: Close Mode

Tab 3: Common

Tab 4: Content

Tab 5: Developer Options



A web widget on a sample HTML page is shown below:

widget