loading...

. . . . . .

Let’s make something together

KAISPE has been providing solutions and services to customers using Microsoft Dynamics, Azure, Power platform, Oracle NetSuite, mobile and web app development.

    • US OFFICE
    • +1 315 791 4472
    • KAISPE LLC
      590 Madison Avenue 21st Floor Manhattan, NY 10022 USA.

 

  • PAKISTAN OFFICE
  • +92 213 432 6085
  • M/S KAISPE
    Suite#213 Sumya Business Avenue MACHS Karachi, Pakistan.

Developing Custom Connector in MS Power Automate using Azure ML Services

  • April 28, 2020
  • 1327 Views

Recently we had a chance to work on developing a custom connector in Microsoft Power Automate. We had to consume Microsoft Azure Machine Learning Services model using REST API and perform prediction. For this purpose, we used KAISPE Student Churn Prediction model and the business scenario we completed was to predict student churn when a set of input data is uploaded on Microsoft OneDrive folder in CSV form.

We started with a blank connector (Create from blank). After providing the REST API URL, we used “API Key” as the authentication mechanism with “Authorization” as the only header parameter.

Next in the connector Definition, we added an action. By definition, “Actions determine the operations that users can perform. Actions can be used to read, create, update or delete resources in the underlying connector.” Then we provided the Request operation “POST” along with URL and body as shown below:

The default response was also provided. In our case, the Response JSON looks like this. If you are using Postman, it would be a lot easier for you to get these JSONs and test your API connection.

{
“Results”:     {
“WebServiceOutput0”:     [
{
“Scored Labels”: “string”,
“Scored Probabilities”: 0.0
}
]
}
}

In the last step, we tested the custom connector functionality by providing the REST API key of our Azure machine learning model. An important point to note here is since our API was expecting the following in header:

Authorization: Bearer <API Key>

So we had to use Bearer UEEF(#(#NDNDJD in the Connection value. Then we provided the sample input in JSON to test the connector operation to receive the response successfully as shown below:

We are now ready to use this connector in any flow. An example is shown below:

We hope you have found it useful. For any queries, please contact [email protected]