How to get sentiment for a text in Power Apps

Hello everyone and welcome to my blog. In today’s blog, I will show how you can get the sentiment of a text in Power Apps canvas apps.

You might have a requirement where you need to analyze the sentiment of a feedback provided by customer. To do that previously, you would need to pass the feedback to a Power Automate flow and get the sentiment back.

But no longer needed now. We have the new DataVerse AI functions introduced in Power Apps canvas apps using which we get the sentiment.

To use the DataVerse AI functions, you would need to use the Environment connector. Remember this a premium connector and consider your user licenses before you plan to implement it.

For this blog I am using a very simple example. I have a textbox for user feedback and a button to get the feedback sentiment.

In the On Select of Get Sentiment button, I used the below formula.

UpdateContext({sentiment: Environment.AISentiment({Text: TextInput1.Text}).AnalyzedSentiment})

The output of the AISentiment function is assigned to a local variable. You can now use the variable sentiment for all your purposes.

Hope this helped. You will also like the below posts.

Debajit Dutta


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading