cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CRMSample
Frequent Visitor

MS Flow Trigger for onPremise SQl Server

Hi All,

 

Can we trigger MS flow on Insert/Update row in Onpremise SQL Server. I have read on some older blogs that trigger doesn't work for onPremise sql server but on latest Flow documentation it not mentioned anywhere .[https://docs.microsoft.com/en-gb/connectors/sql/#known-issues-and-limitations]

 

Actually i installed SQL Server on my local system and configured gateway. I can trigger MS flow on Insert/Update row for onpremise Sql server. Now Client  has shared a Sql Server connecction, i configured MS flow to trigger for this connection but its not triggering at all. After going through all the blogs i got confused whether trigger suppose to work or not for Onpremise sql server. Any help would be appriciated.  

12 REPLIES 12
CRMSample
Frequent Visitor

Hi all,

 

Can anyone please resond to the question. Is it possible to trigger MS flow for On premise SQL Server ? 

v-yuazh-msft
Community Support
Community Support

Hi @CRMSample,

 

We could trigger MS flow on Insert/Update row SQL Server if you use Local Onpremise data gateway。

 

And as we can see in the link you have provided, SQL native query is not supported for on-premises SQL server.

 

You could make a test on your side.

 

Best regards,

Alice

Thanks for the reply @v-yuazh-msft.

Actually before posting this qus, i tested it at my end using onpremise data gateway and it worked fine for me. But the issue i am facing is, third party vendors are managing onpremise database. They have configured the onpremise gateway and shared the connection with service account, using that service account i have configured the MS flow to trigger on insert/update of sql table. Now when we do a insert in sql table, MS flow doesn't trigger. Its not showing any failed or Error in run history. 

but I can see many "Skipped entry" in Checks(no new data) in run history section. Can you please help me on this issue.

After going through some blogs i was wondering whether trigger suppose to work or not for onpremise sql server.[https://flow.microsoft.com/en-us/blog/introducing-triggers-in-the-sql-connector/]

Since you have confirmed it, can you please advice me on some troubleshooting steps. Just to mention i am new to MS flow and trying to get all the helps to solve this issue. Many thanks !

  

It is my understanding that it is not currently possible to trigger flow from an on-premise SQL server. The documentation you refer to in your last link describes functionality which is available to an SQL Azure database.

 

It is something I'm absolutely waiting for, as I have clients who use on-premise SQL databases (often multiple) and this would allow me to do even more with Flow 

Hi A8Tony,

 

Actually Flow will trigger for On premise server as well but only for the latest version of sql server. I have tested it with the SQL version 2017. For earlier version it wont work (not sure about 2016)

 

Thanks for this CRM Sample, I'll give this a go next week 👍

Hi CRMSample,

 

I've tried a quick test this morning but have not successfully triggered a flow from a record being created.

 

Can you confirm that this is possible using the On Premise Data Gateway? And if so, did you have to make any specific settings on the SQL database configuration to allow this?

 

Thanks,

Tony

moutinhoabreu
Advocate IV
Advocate IV

I would also love to know if it's already working.

 


Anonymous
Not applicable

I have on prem triggers working here with SQL 2008, but it only works for add not modify, and only with a table that has an identity.

@Anonymous is correct. I can also confirm that Flow connecting to SQL OnPrem through data gateway works for the create or add record to a table.  Updates to a record does not work (as of June 2019) through the data gateway to SQL OnPrem.  

 

Example: If status = "Under Review" for a record and a flow is set to send an email when the status = "Under Review". 

Could a person use the flow to "ping" the database every 15 minutes and look for a change in a field within a record in a table?  Or would that send an email every 15 minutes that the field currently has a specific value being looked for?  

 

 

We work with a SQL on premises and I can also confirm we are able to trigger flow on a "new record" for every table inside the SQL.

Super easy and we've a 2016 version installed. In fact we do have several flows working with this trigger.

 

Regarding triggering on "update", we were never able to achieve it !!! looking at recent documentation there is no indication about on premises limitation. They do mention, you just need to assure the table has:

 

"A Primary Key is required for the following operations:

  • GetItem
  • UpdateItem
  • DeleteItem"

 The tables we wish to use, we know the primary key, but flow doesn't identify a Primary key.

 

So.. 

 

SarfrazKhan
New Member

Couple of different ways to trigger a flow from an on-premise CRM installation.

1. Create a background workflow that runs on the trigger event. e.g. Run on create of contact. In the flow, select the SQL trigger called "When and item is created V2" and select the AsyncOperationBase table as the triggering table. This table creates a record everytime a background workflow runs. Once you have this set, click on the ellipsis on the block and put in your triggering conditions like this:

@equals(triggerBody()?['Name'],'Name of Workflow')

@equals(triggerBody()?['MessageName'],'ExecuteWorkflow')

2. Create a flow that uses "When an HTTP Request is Received" trigger. Then download ZooY's Dynamics 365 Tools. Create a workflow on the triggering event and put the PostJSON workflow activity from his tools. Put in the address generated from the flow in the Service URL and the JSON body you want to send to the flow, e.g. { "mobilephone": "555-555-5555", "RecordUrl":"https://crm.contoso.com" }.

If you want to sent the record id this way, you can add the recordUrl with the body or use Damien Rasko's Workflow Tools to get the record id before making the flow call.

Tools:

https://github.com/ZooY/Dynamics365.Tools

https://github.com/demianrasko/Dynamics-365-Workflow-Tools

 

Helpful resources

Announcements

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!    

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Users online (5,685)