Building a Microsoft SQL database triggered HTML email alert

This example task runs based on a change in data in a business system, it queries the database of a business system, formats the information returned as an html email message and sends this to users derived from the information in the business system.

Database-triggered-html-email-alert-task

This task is made up of 4 steps.

Step NamedToolWhat it does
Change in data detectionMicrosoft SQL Server TriggerDetects a specific change in data in a business systems database. This step outputs key pieces of information about the change and outputs them as variables.

Setting up a Microsoft SQL Server Trigger Step

Get more informationDatabase Query (ODBC)Reads the database of the business system to find additional details to include in the alert. This step consumes the variables from the previous step and outputs a recordset of data.A recordset is like a table of data.

Querying a database

Format as HTMLFormat as HTMLTakes the recordset results from the previous step and presents them for use in the email. The output from this step is a document set.Each row in the recordset creates a document.

Formatting as HTML

Send EmailSend Email (SMTP)Sends an email containing the formatted information. Each document in the document set is sent to a different email address.The email address originates in the recordset.

Sending an email

To read about designing other tasks see

Task Design

Related Articles

Learn about: Formatting as HTML

The Format as HTML Tool can be used to format information as one or more HTML documents in TaskCentre. The tool is dragged onto the task planner from the task browser. On the general tab of the tool the step is given a recognisable…

Read More
BPA-8203

Setting up a Microsoft SQL Server Trigger Step

The Microsoft SQL Server Trigger Tool can be used to start a task in TaskCentre. In the trigger step a set of conditions are specified which, when met, trigger the start of a task. How does this work? Before the Microsoft SQL Trigger Tool…

Read More
BPA-8205