{"id":110898,"date":"2017-09-25T08:37:38","date_gmt":"2017-09-25T15:37:38","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/introducing-triggers-in-the-sql-connector\/"},"modified":"2017-09-25T08:37:38","modified_gmt":"2017-09-25T15:37:38","slug":"introducing-triggers-in-the-sql-connector","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/introducing-triggers-in-the-sql-connector\/","title":{"rendered":"Introducing triggers in the SQL Connector"},"content":{"rendered":"
The SQL Database Connector in Logic Apps and Flow is one of the most popular connectors, and we have just added a highly requested feature \u2013 triggers.\u00a0 Now, you can kick off your Flow or Logic Apps whenever a row is inserted or modified in a SQL Azure Database table.
\n<\/p>\n
Using the trigger is straightforward.\u00a0 Select the appropriate trigger.\u00a0 Create your connection (if you have not already) or select an existing connection.\u00a0 Then, select the table from the drop-down. [If you don\u2019t see your table, see the notes below.]\u00a0 You can also choose to further limit the rows returned by specifying a filter.
\n<\/p>\n
Once you configure the trigger, you can now use the output from the trigger in any action in your Flow or Logic App.\u00a0 The trigger will make available the columns of the selected tables.
\n<\/p>\n
You can now save the flow, and it will kick off whenever a row is added to (or modified in) the selected SQL Database table.
\n<\/p>\n
That\u2019s it.\u00a0 You now have a working flow that you can use to monitor and automate whenever rows are added or modified in your SQL table.<\/p>\n
\u00a0<\/p>\n
The triggers do have the following limitations:<\/p>\n
\u00a0<\/p>\n
Some of you might have noticed that this feature has been available for some time now as a limited preview feature of Logic Apps in the East US 2 region.\u00a0 Designing and implementing a trigger is more complex than adding actions.\u00a0 This is because, the trigger needs to monitor and track changes.\u00a0 In the case of SQL Databases, unfortunately, there is no mechanism of tracking changes that will work for all tables.\u00a0 Therefore, specific tables must have specific column types which are designed for change tracking.\u00a0 In order to track changes like addition or modification of rows in a table, the table must have a column whose value is unique and whose value increases (or decrease) monotonically each time such a change is made<\/strong><\/em>.\u00a0 This is satisfied by having an IDENTITY column for tracking creation, and ROWVERSION (a.k.a. TIMESTAMP) column for tracking modification .<\/p>\n So, what happens when there is no such column in a table?\u00a0 Those tables will not be listed when you try to use the trigger.\u00a0 And, it will not work if you do try to type the table name manually.\u00a0 The only workaround then is to externalize the state yourself and use the \u201cGet rows\u201d action to query for the changes.<\/p>\n \nWe would, of course, like to hear your feedback.<\/p>\n","protected":false},"excerpt":{"rendered":" The SQL Database Connector in Logic Apps and Flow is one of the most popular connector, and we have just added a highly requested feature \u2013 triggers. Now, you can kick off your Flow or Logic Apps whenever a row is inserted or modified in a SQL Azure Database table.<\/p>\n","protected":false},"author":149,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","power-automate-category":[2752],"power-automate-tag":[2513,2789],"coauthors":[2351],"class_list":["post-110898","power-automate","type-power-automate","status-publish","hentry","power-automate-category-product-updates","power-automate-tag-connector","power-automate-tag-sql-flow"],"yoast_head":"\n