{"id":110720,"date":"2016-05-11T10:26:27","date_gmt":"2016-05-11T17:26:27","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/connecting-flow-sql-twilio\/"},"modified":"2025-06-11T08:18:36","modified_gmt":"2025-06-11T15:18:36","slug":"connecting-flow-sql-twilio","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/connecting-flow-sql-twilio\/","title":{"rendered":"Connecting up Microsoft Flow, SQL and Twilio"},"content":{"rendered":"
Last week, at a customer location, we\u00a0attempted to solve an advanced user scenario of triggering a Flow without a built-in trigger. More than the final solution itself, I was particularly interested in how\u00a0<\/strong>the customer used the available triggers and actions\u00a0within Microsoft Flow to arrive at the solution.<\/p>\n It all boils down to this simple problem statement- When a record gets inserted into a SQL table, notify someone with a text message. It sounds like a simple Flow, but it’s a powerful capability for end-users. The crux of the problem is all about converting potent insights into immediate actions that will result in huge cost savings for the customer. There is this huge backend SQL system with lots of interesting real-time data that gets tucked away into oblivion, albeit after passing through the right analysis algorithms, but when the system provides the right signal, the relevant people are not notified, so they are unable to take the corrective action at the appropriate time.<\/p>\n Flow does not yet support a \u2018on new record\u2019 trigger on SQL connections. If we wanted a text message on a SharePoint list, it would have taken less than a minute to set up this flow. However, for SQL we have to hand-craft this \u2018on new record\u2019 trigger.<\/p>\n Microsoft Flow supports executing Stored Procedures on SQL backend. It turns out that the customer was\u00a0a SQL guru, who was able to spin up a stored procedure within minutes. The SPROC did the heavy lifting on the SQL side and dropped\u00a0a single record on a special SQL table. Here is how the problem was solved.<\/p>\n This is how the Flow looks like after it is setup:<\/p>\n It took us about two minutes on Twilio.com to sign up for a Twilio account, verify the phone number, set up a new incoming phone number and to pick up the API key\/ secret. Setup a Twilio account, then setup an incoming phone number from https:\/\/www.twilio.com\/console\/phone-numbers\/incoming<\/u><\/a>, then go to the console – https:\/\/www.twilio.com\/console\/<\/u><\/a> to get the account SID and auth token.<\/p>\nThe Scenario<\/h2>\n
The Problem<\/h2>\n
The Solution<\/h2>\n
\n
<\/p>\nThe Easy Part \u2013 Send a text message<\/h2>\n
<\/p>\nOther Solutions that could work<\/h2>\n
Custom API<\/h3>\n