Using AI Builder with PowerAutomate for Sentiment Analysis and Text Extraction

Like learning anything new, you look at it and you go – “huh, I wonder how that works” and then you dig in and see what it does. Such is the case where I was looking at the AI Builder in Power Automate the other day, started playing around with it, and then went deeper into what it can do.

The AI Builder is a Microsoft Connector with Power Automate that lets you easily integrate AI into your Power Automate Flows with very little code. For this post, I’m focusing on two areas – text extraction from images and sentiment analysis

Extracting Text from Images

I’ve had a number of requirements, being able to parse text from images and then do something with it. The AI Builder has some connectors for parsing invoices and receipts, but I wanted to throw a random image at it to see how it would do.

To do this, I used the “Get Words from Image” AI Action. This action takes the file contents as its input and then renders a response of the text it found. There are some prebuilt actions for Getting SharePoint and OneDrive content, but I wanted to get content from a random image.

To accomplish this task, you’ll want to use the HTTP Action and pass it the URL to your image.

And for context, here is the image that I wanted AI to parse – picked because of Transformers and because it is very busy –

When the HTTP request had finished executing, I was then able to pass the body of the GET into the “Recognize text in image or document” action.

When executed, I could see the following text extracted from the image.

You can see where it might have confused the circles with zeroes, but still, very impressive.

Sentiment Analysis

Everyone always wants to know what the “pulse” of things is, i.e., the general sentiment. In doing this, I put together a simple example where I updated all the descriptions on my accounts with some text as to the “potential thoughts” of an account manager.

The goal was to have the flow loop through all those customers, provide a sentiment analysis, and then update that back to the account (perhaps this would trigger on a dashboard). Here is an example of one customer’s data and the resulting sentiment.

For each sentiment realized, I then updated each account record with the corresponding sentiment so you can then see something like this.

Although pretty neat how this worked, I don’t think having users fill in the description of their thoughts on a customer would be valuable (and still time consuming) and instead, my next test will be focused on doing that 360 view of the customer where we look at how many cases they have, what new opportunities have we created, etc – that way we are deriving sentiment from work and not creating work to derive sentiment.

There is more to the AI Builder, but as a first start, pretty impressed with the simplicity of getting going with this feature.