TIP
💡 Learn more : Azure Logic Apps Documentation (opens new window).
# Use Azure Logic Apps to Detect when a new SQL record is inserted
I recently needed the ability to detect when a new SQL record was added and send an email. Since the customer didn't want the existing logic in their app to be modified, I relied on Azure Logic Apps and all their powerful connectors.
In the portal, create a new Azure Logic App and then select Start with a blank template. Under the trigger, choose New step > Add an action.
In the search box, enter "sql" as your filter. and pick When an item is created.
![](/AzureTipsAndTricks/files/logicsql1.png)
You'll be prompted for connection details, so do so now.
![](/AzureTipsAndTricks/files/logicsql2.png)
Now you'll need to select the Table Name and how often you want to check for item. We are going to go with every 5 seconds.
![](/AzureTipsAndTricks/files/logicsql3.png)
Now choose, New step > Choose an action.
In the search box, enter "email" as your filter. and pick Send an email.
![](/AzureTipsAndTricks/files/logicsql4.png)
Type the email address and select which fields to send. You can put custom text as shown below:
![](/AzureTipsAndTricks/files/logicsql5.png)
Now insert a record into your database and it should fire (as long as you have the Logic app running)
![](/AzureTipsAndTricks/files/logicsql6.png)
Easy enough!