Monitor SQL Dataset And Notify When New Rows Added
Description
Every 5 Minutes, checks if new rows are added to a specific SQL data set.
If there are new rows added - sends an email with all the new values in one of the columns from the new rows (The user can specify from which column the email text will be prepared)
Setup:
1. In the "SQL Connections" App, a SQL Connection bot needs to be created named "My Database1"
2. After installing the solution in Easybots Studio, press "Validate & Create Missing Bots.." to automatically create the other missing bots used in the solution.
3. Enter the missing inputs in the solution:
- 3.1 SQL SELECT statement
- 3.2 Column Name from which the email text to be prepared with the newly added rows
- 3.3 email address of the recipient
Example SQL SELECT statement, to get newly registered users in ASP MVC web app:
SELECT [Id], [Email] FROM [dbo].[AspNetUsers]
The SQL Select statement should have DISTINCT row values in order for the comparison to work correctly (Due to the spec in the 'DataTables Utilities.Compare' action)
If there can be duplicate rows, but you still want to get notified about the new duplicate rows added, then add:
'ROW_NUMBER() OVER (ORDER BY CAST(GETDATE() AS TIMESTAMP))' to your SQL SELECT statement.
For Example:
SELECT ROW_NUMBER() OVER (ORDER BY CAST(GETDATE() AS TIMESTAMP)), [Email] FROM [dbo].[AspNetUsers]
Essential app for development and testing Easybots' solutions.
It contains buttons, text boxes, image boxes, etc, very handy to test your new bots and solutions.
The Trigger bot enables you to control when a trigger will be fired from the Easybots solution.
Each bot has a trigger, and an Action to fire that trigger 'FireTrigger'. Whenever the Action 'FireTrigger' is called, the Trigger will be fired to start execution of another sequence.
Use it together with the 'Data Tables' app to loop through the rows in a table..
SQL Connection bots to connect to your databases. Use this bots to execute SQL statements and retrieve data from the SQL databases.
Combine with the bots from the 'Data Tables' app to iterate to data you retrieve from your databases.
Get notification when a Easybots' variable has changed, or control your variables from the Easybots' solutions - this app exposes the easybots' variables as bots so that you can use them with other bots and change variable values from your solutions.