getDataTableHtml Step

Use this feature to execute a SQL query and convert the resulting data table into an HTML table.

Last published at: July 27th, 2026

Description:

The Convert Data Table to HTML step enables a FlowWright workflow to execute a SQL query against a configured database and convert the returned data into an HTML table.

Many business processes require database information to be presented in a readable format without requiring custom HTML development. This step automates generating an HTML table from SQL query results, making it easy to embed formatted data into email messages, dashboards, notifications, approval requests, reports, or generated documents.

The workflow specifies the database connection, optional database override, SQL statement, optional SQL parameters, and the workflow variable or global value that will store the generated HTML.

Typical uses include:

  • Sending database reports by email
  • Creating HTML approval summaries
  • Building workflow notification emails
  • Displaying query results in web pages
  • Generating management reports
  • Producing operational dashboards
  • Creating audit summaries
  • Preparing formatted business reports

This step helps organizations automate the presentation of database information while eliminating the need to manually construct HTML tables.

 

Inputs

  • Connection String – Specifies the configured database connection used to execute the SQL query.
  • Connect to Different Database - (Optional) Specifies an alternate database to connect to using the selected connection string.
  • SQL Statement – Specifies the SQL query that retrieves the data to be converted into an HTML table.
  • SQL Parameters - (Optional) Specifies parameter values supplied to the SQL statement to support parameterized queries.
  • Variable/Global to Store HTML Table – Specifies the workflow variable or global value where the generated HTML table will be stored for subsequent workflow activities.
 

 

Returns

  • True – The SQL query executed successfully and the generated HTML table was stored in the specified workflow variable or global value. Workflow execution continues through the success path.
  • False – The HTML table could not be generated because of a database connection failure, invalid SQL statement, SQL execution error, parameter validation issue, or another execution error. Workflow execution follows the alternate path.
 

 

Usage:

The Convert Data Table to HTML step is typically used after workflow variables have been initialized and before email notifications, report generation, dashboard updates, or custom document creation.

During execution:

  1. Connect to the configured database.
  2. Optionally switch to the specified database.
  3. Execute the configured SQL statement.
  4. Apply any configured SQL parameters.
  5. Retrieve the resulting data table.
  6. Convert the data table into an HTML table.
  7. Store the generated HTML in the specified workflow variable or global value.
  8. Continue workflow execution through either the True or False return path.

A typical workflow might look like this:

 

Typical workflow scenarios include:

  • Sending daily sales reports by email
  • Creating approval summaries for managers
  • Generating customer account summaries
  • Producing inventory status reports
  • Building executive dashboard notifications
  • Creating workflow audit reports
  • Sending scheduled operational reports

 

Example:

Let’s build and execute the “getDataTableHtmlDef” example.                             

  • Create a new process definition named “getDataTableHtmlDef” and open it in designer mode. 
  • Drag a “getDataTableHtml” step to the canvas.
  • Connect the dots between the “Start” step and “getDataTableHtml” steps, as shown above. 
  • Define a variable or a global to store the HTML result.
  • Click the "getDataTableHtml" step to configure its "Required" properties. Provide a name for the step. Select the connection string from the list. Enter the SQL SELECT statement. Specify a variable or global reference to store the HTML result. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description. 

 

  • Click the "getDataTableHtml" step to configure its "Optional" properties. A pop-up window appears for configuration. Click the SQL parameters button to configure. Another pop-up window appears for configuration. Click the Add Row (+) button to insert an empty row. Enter the SQL parameter name and value. Click the Save button. You may insert multiple SQL parameters by using the Add Row button. 

 

  • The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. The step should return the data table result set as an HTML table. 

 

  • To execute by parameters:  Click the "getDataTableHtml" step to configure its "Required" properties. Provide a name for the step. Select the connection string from the list. Enter the SQL SELECT statement as shown below, replacing the condition values with question marks. Provide a variable or global reference to store the HTML result. 

 

  • Click the "getDataTableHtml" step to configure its "Optional" properties. To connect to a different database, specify the database name using the exact connection string. Click the SQL parameters button to open the configuration window. Click the Add Row (+) button to insert an empty row. Enter the SQL parameter name and value. Click the Save button. You may add multiple SQL parameters by using the Add Row button. 

 

  • Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. As configured, the step should retrieve the data table result set as an HTML table from the other database. 

 

  • Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step. The step should execute the SQL query on the selected database server and return the result in the specified format, either JSON or XML.

 

  • To execute a stored procedure: Click the "getDataTableHtml" step to configure its "Required" properties. Provide a name for the step. Select the connection string from the list. Provide the stored procedure information as shown below, with question marks as parameters. Provide a variable or global reference to store the HTML result. 

 

  • Click the "getDataTableHtml" step to configure its "Optional" properties. To connect to a different database, specify the database name using the exact connection string. Click the SQL parameters button to open the configuration window. Click the Add Row (+) button to insert an empty row. Enter the SQL parameter name and value. Click the Save button. You may add multiple SQL parameters by using the Add Row button. 

 

  • Save the process definition, create a new instance, and execute it. Render the process instance. Click the process step to view its properties. The step should execute the stored procedure and return the result set as an HTML table.

 

Tips:

  • Use parameterized SQL statements whenever possible to simplify query maintenance and support reusable workflows.
  • Store the generated HTML in a descriptive workflow variable name that clearly identifies its purpose.
  • Verify that the SQL query returns only the columns required by the business process.
  • Use the Connect to Different Database property when multiple databases share the same connection configuration.
  • Test SQL statements independently before deploying them into production workflows.
  • Route the False path to logging or notification activities to simplify troubleshooting.
  • Combine this step with Send Email, Create HTML Email, Generate PDF, Export Report, or Ask AI to build rich reporting and notification workflows.

 

Notes:

  • A valid database connection is required.
  • The SQL Statement property is required.
  • The Connect to Different Database property is optional.
  • SQL Parameters are optional and are used for parameterized queries.
  • The generated HTML is stored in the specified workflow variable or global value.
  • The stored HTML can be reused by subsequent workflow steps without regenerating it.
  • Both the True and False return paths should be implemented to provide complete workflow handling.
  • Execution details and database activities are recorded in the FlowWright workflow execution log.

 

Convert Data Table to HTML vs. clsOutputMSSQLDB:

Although both steps work with database-related data, they serve very different purposes within FlowWright.

Convert Data Table to HTML clsOutputMSSQLDB
Executes a SQL query and converts the returned result set into an HTML table. Writes transformed or processed ETL data into a Microsoft SQL Server database table.
Designed for workflow (Process) definitions. Designed for ETL definitions. (FlowWright Documentation)
Retrieves data for presentation and reporting. Persists data into a database after extraction and transformation. (FlowWright Documentation)
Requires a database connection, SQL statement, optional database override, optional SQL parameters, and a workflow variable/global to store the generated HTML. Requires a SQL connection, destination table, optional table creation, primary key selection, and a database operation (Insert, Update, Insert and Update, Delete, or Replace All). (FlowWright Documentation)
Produces HTML content stored in a workflow variable or global variable. Produces or updates records in a SQL Server table. (FlowWright Documentation)
Typically followed by Email, Report Generation, HTML rendering, or notification steps. Typically follows ETL input and transformation steps such as clsInputMSSQLDB and transformation components. (FlowWright Documentation)
Does not modify database data. Inserts, updates, deletes, or replaces database records. (FlowWright Documentation)
Intended for presenting query results in a readable HTML format. Intended for loading processed data into a destination database.

 

As a general guideline

Use Convert Data Table to HTML when a workflow needs to:

  • Display database query results in an email.
  • Generate HTML reports.
  • Build approval summaries.
  • Populate dashboards or web pages.
  • Store formatted HTML in a workflow variable for later use.

Use clsOutputMSSQLDB when an ETL process needs to:

  • Load transformed data into SQL Server.
  • Synchronize data between systems.
  • Insert new records.
  • Update existing records.
  • Delete records marked for removal.
  • Replace the contents of a destination table.
  • Complete the "Load" phase of an ETL pipeline. 

In summary, Convert Data Table to HTML is a reporting and presentation step that transforms database query results into HTML for downstream workflow activities, whereas clsOutputMSSQLDB is an ETL output step that persists processed data into Microsoft SQL Server as part of an extract-transform-load process.

 

Definition Sample:

You may download the sample workflow definition from the link provided and import it into your FlowWright environment.

Note: Verify and complete any missing configuration after importing the sample, including:

  • Database connection string
  • Optional database name
  • SQL statement
  • SQL parameters
  • Variable or global value for storing the generated HTML
  • Success and failure workflow branches
  • Appropriate database permissions

After verifying the configuration, save and publish the workflow before execution.

Click here to download the sample file.