Sentiment Action In Microsoft Text Analysis Cognitive Service With Desktop Flow Using Microsoft Power Automate

Microsoft Power Automate, is software by Microsoft for automation of recurring tasks. It is part of the Microsoft Power Platform line of products together with products such as Power Apps and Power BI. More Details here.

Microsoft cognitive services enable users to accelerate decision-making using artificial intelligence without requiring machine learning expertise.

Desktop flows are the existing robotic process automation (RPA) capabilities in Power Automate and enable to automate all repetitive desktop processes. It also provides a wide variety of Microsoft cognitive actions that allow you to integrate this functionality into your flows. Text analysis, computer vision, and spell checking are all tasks that Microsoft cognitive actions can perform. More Details here.

The Microsoft cognitive Text Analysis - Sentiment action is one of the features offered by Azure Cognitive Service for Language, a collection of machine learning and AI algorithms in the cloud for developing intelligent applications that involve written language. Sentiment analysis provides sentiment labels (such as "negative", "neutral" and "positive") based on the highest confidence score found by the service at a sentence and document-level. This feature also returns confidence scores between 0 and 1 for each document & sentences within it for positive, neutral and negative sentiment.

Reading this article, you can learn how to extract text with Microsoft cognitive Text Analysis - Sentiment action in Desktop flow using Microsoft Power Automate.

The following important tools are required for developing Microsoft Power Automate,

  1. 1. Windows 10/11 (Recommended)
  2. 2. Power Automate Desktop - Download the Power Automate installer
  3. 3. Microsoft Azure account - https://azure.microsoft.com/en-in/

Now we can discuss step-by-step App development.

Step 1

Open Microsoft Power Automate -> New Flow

Next, Give the Flow name as PADCogSentiment, Click the Create button,

After that, we are able to see the Desktop flow,

Step 2

For Testing Microsoft cognitive Text Analysis - Sentiment action,

First, Get the Azure cognitive service Subscription details - Refer the link for creating a Coginitive service in Microsoft Azure.

Next, Getting the Input Text, Add the Input Variable

Set the Variable Name Parameter as InputText, Data Type as Text and External Name as InputText and click Save,

Next, Add the Sentiment action, Set the Server location Parameter as West US 2, Subscription key Parameter as ************** and Text Parameter as InputText variable, Variable Produced Parameter as %JSONResponse% and Click Save Button

For Displaying Result, Add the Display message action and Set the Message box Title Parameter as Display Sentiment Result, Message to display Parameter as %JSONResponse% Click Save Button

Now, Save the PADCogSentiment Desktop Flow,

Step 3

Now we can run your PADCogSentiment Desktop Flow in Microsoft Power Automate,The output of the PADCogSentiment is,

Summary

Now you have successfully tested Microsoft cognitive Text Analysis - Sentiment action in Desktop flow - PADCogSentiment in Microsoft Power Automate.