{"id":26748,"date":"2019-04-24T07:30:40","date_gmt":"2019-04-24T11:30:40","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=26748"},"modified":"2023-08-18T13:08:45","modified_gmt":"2023-08-18T17:08:45","slug":"interact-with-machine-learning-using-powerapps-and-flow","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/interact-with-machine-learning-using-powerapps-and-flow\/","title":{"rendered":"Interact with Machine Learning Using PowerApps and Flow"},"content":{"rendered":"
Recently, Centric Consulting hosted a Hackathon to get our consultants a bit more exposure to Machine Learning<\/a>. It was a day and a half of different teams putting together something that could demonstrate what Machine Learning is and how it can be connected to Microsoft Flow and PowerApps.<\/p>\n In the case of my team, we used some data to try and predict how long an employee might stay at a certain organization.<\/p>\n This was my first foray into Machine learning, so it was not a complex model by any means. I used the Azure Machine Learning<\/a> studio to build the model, and one of the things I noticed was it could also set up a Predictive Web Service to interact with the model. By default, you can use Excel to input data into the model and get a prediction as an output, but that was way too bland and boring for me!<\/p>\n I\u2019m going to use PowerApps<\/a> and Flow<\/a> for this. We need to have something ready in a day and a half, so I am absolutely firing up these two to get something out there fast. But, with connecting to an ML web Service, there are some caveats:<\/p>\n Now, since I only needed this to work for a short amount of time, I was able to use a P1 trial, but be aware of the above if you want to work with Custom Connectors.<\/p>\n Let\u2019s Start with Flow<\/p>\n I wanted Flow to handle the input\/output of the data for a few reasons. Flow is much more flexible with sending and receiving JSON data, and it\u2019s much easier to troubleshoot when connecting to a web service.<\/strong> So, we\u2019re going to need to create a custom connector to bridge the gap between the model and Flow.<\/p>\n We need to go to Flow, expand the Data menu, and click on \u201cCustom Connectors.\u201d On this screen, we can now \u201cCreate a Custom Connector.\u201d When you click this button, you receive a few options on how to get the endpoint details. The Azure ML endpoint uses Swagger to define the endpoint. In my testing, I found that \u201cImport an OpenAPI\u201d from URL just errors out, so I used \u201cImport a Postman Collection.<\/p>\n <\/p>\n But, this also means we now need to create a Postman Collection.<\/p>\nGetting Prepared<\/h2>\n
\n
Please Mr. Postman<\/h2>\n