MSSQL SMS Integration Guide
Send SMS with Microsoft SQL
How to trigger SMS alerts resulting from events occurring in your MSSQL database is a popular query. This guide aims to show you how to allow SMS to be sent using SQL.
In order to use this guide and successfully send SMS from your MSSQL database, you will need the following:
- A premium Zapier account
- An SQL database
- An Esendex account
In this guide we will cover how to quickly and easily integrate Esendex’s SMS sending trigger on the addition of new rows in an order table in an example SQL database. To access our app via Zapier, just click here.
Send SQL SMS notifications
Configure your Zapier account to send SQL SMS triggers
The Zapier welcome interface offers plenty of opportunity to get started with creating your first ‘Zap’. The first step in creating your SQL SMS trigger is to click on any of these.
The next step is to define the type of Zap that you are trying to create, in this case it is SQL. Type SQL into the box and select the SQL Server application.
You then need to choose the trigger that will spark the action
In this case we want an SMS to be sent whenever a „New Row“ is added to the SQL document. So for the purposes of this example, select „New Row“ and then select save and continue.
The next step is to connect your SQL Server account with Zapier in order for the trigger actions to be completed.
As you want Esendex to send SMS via SQL you will to connect your SQL account. Select „Connect a new account.“
It is important that you enter your information correctly in the boxes exemplified above and double check, that when setting up the SQL login that the SQL server is reachable from the IP that Zapier defines in its instructions.
Once your account is linked you can click to „test“ and then select save and continue.
Creating the SQL send SMS trigger
The next step is describing to Zapier the SQL event you want to link into in detail. We chose to link to the order table and to search for unique order IDs when querying in reverse chronological order via “CreatedAt”. To do this we used the filtering options.
You will then need to test your trigger by fetching an existing row so ensure that there is one available in your SQL account to test with. Check the information then press save and continue.
You will then need to tell Zapier the specific action that you want it to perform from your trigger application. You will then need to select the action that you want Esendex to take, which in this case is sending an SMS. Select „Send SMS“ and then continue.
For the next step, you will then need to connect your Esendex account. Simply click „Connect a New Account“
You will then need to enter your account details from your Esendex account information. Select your Account reference from the dropdown menu and then enter the desired SMS recipient or recipients.
In either the recipient or the message field you can enter customer information, denoted as normal plain text, or you can inject fields available on your SQL table/view, these are highlighted in orange. We inserted a custom recipient, but for the message used a mix of inserted fields and customer text.
You will then need to name your Zap and switch it on.
Additional information for MS SQL SMS sending
If you wish to send text messages for more specific or customer queries with SQL then there are plenty of additional options available with additional support. You can send triggers from your database every five minutes. For more information on this please contact us for further information.