SQL

Use SQL to import database table records from a SQL Server database or MySQL database into a data file. The data file is used in a botflow A file that stores the actions and variables designed to automate tasks. to access the imported records.

Before you start 

Create an SQL server connection

To create an SQL server connection:

  1. Click Add Item () on the Botflow Pane.
  2. Click SQL.
  3. The SQL window displays.

  4. Select a connection letter from the Letter drop-down list, or accept the default.
  5. Select the SQL type from the Type drop-down:
    • SQL - Select to use with a SQL database.
    • MySQL - Select to use with a MySQL database. Requires that MySQL be installed.
  6. In the Server field, do one of the following:
    • Enter the required server name.
    • Click the Expression Builder to build the server name using variable or other token values.
    • For SQL, click the down button to retrieve a list of available SQL Servers.
  7. Check the Port box to enter a port number or accept the default (1433).
  8. Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.
  9. For SQL, select the authenticate type from the Authentication drop-down:
    • Windows - Uses your Windows log in credentials.
    • SQL - Uses the credentials set for the SQL server connection.
      • Credential: Select the credential required for the SQL server connection.

      • Username: Displays the username stored in the credential that is required for the SQL server connection.
      • Password: Displays the password stored in the credential required for the SQL server connection.
      • Confirm: Re-enter the password, if required, for the SQL server connection.

    For MySQL: Uses the credentials set for the MySQL server connection.

    • Credential: Select the credential required for the MySQL server connection.
    • Username: Displays the username required for the MySQL server connection.
    • Password: Displays the password required for the MySQL server connection.
    • Confirm: Re-enter the password, if required, for the MySQL server connection.
  10. Click Connect to connect to the SQL database server or MySQL database server and retrieve a list of available databases.
  11. Select an available database from the Database drop-down list.
  12. Optionally, enter a Note describing the SQL connection.
  13. Click OK to save the SQL connection for use in the botflow.

SQL connection window field and button descriptions

Field or button Description
Letter
  • Select a connection letter from the Letter drop-down list, or accept the default.
  • Type
  • Select the SQL type from the Type drop-down:
    • SQL - Select to use with a SQL database.
    • MySQL - Select to use with a MySQL database. Requires that MySQL be installed.
    Server
  • In the Server field, do one of the following:
    • Enter the required server name.
    • Click the Expression Builder to build the server name using variable or other token values.
    • For SQL, click the down button to retrieve a list of available SQL Servers.
    Port
  • Check the Port box to enter a port number or accept the default (1433).
  • Timeout
  • Enter a timeout value in the Timeout field or use the up and down buttons to incrementally change the value by one second.
  • Authentication

    For SQL, select the authenticate type from the Authentication drop-down:

    • Windows- Uses your Windows log in credentials.
    • SQL - Uses the credentials set for the SQL server connection.

    For MySQL: Uses the credentials set for the MySQL server connection.

    Credential Select the credential required for the SQL or MySQL server connection.
    Username Enter the username associated with the selected SQL server or MySQL server.
    Password Enter the password associated with the selected SQL server or MySQL server.
    Confirm Confirm the password associated with the selected SQL server or MySQL server.
    Connect

    Click Connect to connect to the SQL database server or MySQL database server and retrieve a list of available databases.

    Database

    Select an available database from the Database drop-down list.

    Note

    Optionally, add a note to an action to document any special instructions or functionality.

    OK/Cancel Click OK to save the SQL connection or click Cancel to discard the SQL connection or any changes.