Introduction
MS Azure Sentiment analysis helps to evaluate the user input. It returns a sentiment score in the range of 0 (negative) to 1 (positive). This helps in analyzing user feedback.
In this article, we will use a SharePoint list as a backend to collect user feedback. The feedback will be then sent to Azure Sentiment analysis using Power Automate and stored back the response in the SharePoint list.
Create Sentiment Analysis resource in MS Azure
Follow the below steps to set up Sentiment Analysis API.
Create a resource
- Login to Microsoft Azure Portal (https://portal.azure.com).
- Click Create a resource.
- Choose AI + Machine Learning
- Choose Text Analytics.
Create a Text Analytics
- Fill in the details to create the Text analytics API.
- The parameters are as follow:
- Name: The Unique name of Text analytics API.
- Subscription: Select Azure subscription to create Text analytics under it.
- Location: The location to host Text analytics API.
- Pricing tier: Select tier as per features you want to use. More details at https://azure.microsoft.com/en-us/pricing/details/cognitive-services/text-analytics/
- Resource group: Select an existing or create a new resource group.
- Click Create.
- Once the deployment finishes, the Text analytics resource will be available to use.
- Note down the API Key and endpoint to authenticate your applications and start sending calls to the service.
Set up Power Automate Flow
Test the Solution
In the SharePoint library, add a new item as user feedback. This will trigger a flow. A flow will call Sentiment analysis API for analyzing the feedback submitted to SharePoint.
The flow will then update the returned metadata to the SharePoint column inside the list with a sentiment score.
Summary
Azure Sentiment analysis API helps to analyze the text input submitted to SharePoint and evaluate the user input and returns the sentiment score in the range of 0 (negative) to 1 (positive).
References