Request Demo
Request Demo

Database Queries

You can use QueryDB command within Chat flow to connect to any SQL database and perform a database query to inject within Dialogue text or other widgets available to you. Only MySQL database connection is supported for now, while we are working on other types of DB connections.

QueryDB{“name”: “mysql“, “config”: {“host”: “hostname_comes_here“, “user”: “Username_of_db“, “password”: “password_of_db“, “database”: “database_to_connect_to“}, “query”: “SQL query comes here“, “format”: “row_or_column“, “save_to_var”: “variable_to_save_response_to“}


  1. name: Name of database management system (DBMS) your chatbot needs to connect to.
    1. config: Helps you define the database connection details
      1. host: Database hostname comes here
      2. user: Database username
      3. password: Database password
      4. database: Database within the DB server to connect to
    2. query: You may type in the exact SQL query to be performed in this parameter. All the variables asked by the chatbot or global variables are available to you that can be used here.
    3. format: Specifies if the data needs to be read in row or column format. Generally, databases exist in row format, which is what you would be using most of the time.
    4. save_to_var: Name of the variable in which you wish to store the query response. Use these variables to call in any part of the chatbot conversation.

Here is a sample spreadsheet that Queries a MySQL Database for Chatbot.