Service requests don’t always arrive in English. When a Spanish or French ticket lands in the queue, someone has to notice it before the right agent picks it up.
In this tutorial, we’ll detect text in Dataverse using AI Builder: a Power Automate flow reads each row’s description, finds its language, and writes the code back to the row.
The SPGuides help desk asked for exactly that. Megan Bowen wanted a Detected Language column she could filter on, filled in automatically, so French tickets go to Alex Wilber and Spanish ones to Adele Vance.
Here’s what we’re building: a flow that loops through the Service Request rows and returns a language code for each description. In the run below, the French ticket came back as fr.

Before You Start
You need access to Power Automate in an environment with Dataverse and AI Builder credits. New to the platform? Start with what Microsoft Dataverse is. AI Builder is the set of ready-made AI models inside Power Platform; we use its prebuilt language detection model.
I built this on the Service Request table in my Power Platform developer environment. I added one new column, Detected Language. If you’ve never added a column, follow how to create a table in Dataverse first.
| Column | Type | Notes |
|---|---|---|
| Subject | Text (primary column) | Short title of the request |
| Description | Multiple lines of text | The text we send to AI Builder |
| Detected Language | Single line of text (max 20) | New column; the flow writes es, fr, en here |
On 10/23/2026 I added three test rows, each with Priority Medium and Status Open:
| Subject | Description |
|---|---|
| Impresora sin tóner | La impresora del segundo piso no tiene tóner y no imprime los reportes de ventas. |
| Écran noir au démarrage | L’ordinateur portable de la réception affiche un écran noir au démarrage depuis ce matin. |
| VPN keeps disconnecting | The VPN drops every 10 minutes when I work from home, so I lose my Teams calls. |
Step 1: Create the Flow and List the Rows
First, we’ll get the rows that need a language.
- In Power Automate, select My flows > New flow > Instant cloud flow.
- Name it Service Requests – Detect Language (AI Builder), pick Manually trigger a flow, and select Create.
- Add the Dataverse List rows action and set Table name to Service Requests.
- Set Select columns to
cr85a_subject,cr85a_description,cr85a_detectedlanguage. - Set Filter rows to the query below.
cr85a_description ne null and createdon ge 2026-10-23
The filter skips empty descriptions and keeps only today’s test rows. Our Power Automate OData filter query guide covers more patterns.
Checkpoint: a test run of List rows returns 3 rows in its body.
Step 2: Add the AI Builder Detect Language Action
Next, we’ll send each description to the model.
- Add an Apply to each over the value output of List rows.
- Inside it, add a Compose action, rename it Description, and set its input to
items('Apply_to_each')?['cr85a_description']. - Select + > Add an action and search detect the language.

The AI Builder group lists Detect language; Microsoft Learn calls it Detect the language being used in text. Microsoft Translator V2 and Content Moderator offer their own detect actions too, but we used AI Builder.
- Select Detect language under AI Builder.
- In the only required parameter, Text, pick Outputs of the Description Compose.

Notice the action says it’s connected to Microsoft Dataverse. That’s why the old version of this post called it a Dataverse action. It’s an AI Builder model that runs on your Dataverse connection. Here’s its code view:
{
"type": "OpenApiConnection",
"inputs": {
"host": {
"operationId": "aibuilderpredict_languagedetection",
"apiId": "/providers/Microsoft.ProcessSimple/operationGroups/aibuilder"
},
"parameters": {
"item/requestv2/text": "@outputs('Description')"
}
}
}

Checkpoint: the action shows one Text input mapped to the Description output.
Step 3: Read the Language Code from the Output
The model returns a results list. Each item holds a language code and a score from 0 to 1, where values near 1 mean higher confidence. We take the first result.
- Add a Compose named Detected_language with the expression below.
- Add another Compose named Confidence_score that reads
scorethe same way.
outputs('Detect_language')?['body/responsev2/predictionOutput/results']?[0]?['language']

outputs('Detect_language')?['body/responsev2/predictionOutput/results']?[0]?['score']
The ?[0] picks the first item without failing when the list is empty. Codes come back short, like en instead of en-US; text the model can’t place returns unknown.
Checkpoint: in a test run, Detected_language shows es, fr or en for each loop.
Step 4: Write the Language Back to the Row
Last, we’ll save the code in Detected Language with the Dataverse Update a row action.
- Add Update a row inside the loop and set Table name to Service Requests.
- Set Row ID to
items('Apply_to_each')?['cr85a_servicerequestid']. Unsure which column that is? See get the row ID of a Dataverse table. - Under advanced parameters, set Detected Language to the Outputs of Detected_language, then save.
"parameters": {
"entityName": "cr85a_servicerequests",
"recordId": "@items('Apply_to_each')?['cr85a_servicerequestid']",
"item/cr85a_detectedlanguage": "@outputs('Detected_language')"
}

Checkpoint: the loop now holds Description, Detect language, Detected_language, Confidence_score and Update a row.
Test the Flow
I ran it from Test > Manually at 7:49 AM on 10/23/2026. It succeeded in 4 seconds and wrote these values:
| Row | Detected Language |
|---|---|
| Impresora sin tóner | es |
| Écran noir au démarrage | fr |
| VPN keeps disconnecting | en |
The Spanish and French rows both came back with a confidence score of 1, the highest the model gives.
Each Detect language call reported costAsAiBuilderCredits of 2 in its output, so three rows cost 6 AI Builder credits. The first call took about 3 seconds; later ones took under a second.
Make It Production-Ready
- Swap the date filter for
cr85a_detectedlanguage eq nullso rows aren’t sent (and billed) twice. - Trigger on new rows with When a row is added, modified or deleted instead of a manual button.
- Keep descriptions under 5,120 characters, the model’s limit, and stay under 400 calls per environment per minute.
- Plan credits: new customers now buy Copilot Credits instead of the AI Builder add-on, and seeded license credits end November 1, 2026.
- Put the flow and the column in a Dataverse solution so they move together.
Troubleshooting
The action fails with QuotaExceeded or EntitlementNotAvailable. The environment has no AI Builder credits left. An admin checks Licensing > Capacity add-ons in the Power Platform admin center.
Detected Language stays blank. Check Row ID. It must be the servicerequestid GUID, not the Subject.
Short text gets the wrong code. One word like Bonjour gives the model little to work with. Check Confidence_score before routing on it.
Need to Read Text from an Image Instead?
If “detect text” means pulling words out of a scanned form or photo, you want a different prebuilt model: text recognition (OCR). We didn’t build it here, so these details come from Microsoft Learn.
Use the AI Builder action Recognize text in an image or a PDF document and pass the file to its Image input, for example from a Dataverse image or file column. Our Dataverse file column guide shows how to store one.
It reads printed and handwritten text from JPG, PNG, BMP and PDF files up to 20 MB, and returns each line plus Full text of the document, which you can save to a text column.
Where to Take It Next
- Route tickets by language with a Condition on Detected Language; our Power Automate IF expression guide helps.
- Add the requester’s name to the alert with get Dataverse Created By in Power Automate.
- Pull invoice fields instead of a language with AI Builder invoice extraction from SharePoint.
More flows like this one are on our Power Automate tutorials hub.
Working on more Dataverse flows? These are good next reads:
Frequently Asked Questions
Can AI Builder detect the language of text in Dataverse?
Yes. Use the AI Builder Detect language action in a Power Automate flow, pass it a text column, and write the language code back with Update a row.
What does the AI Builder language detection model return?
A results list with a language code such as en, fr or es and a confidence score from 0 to 1. Text it can’t place returns unknown. See the language detection model on Microsoft Learn.
How many AI Builder credits does Detect language use?
In our 10/23/2026 run, each call reported 2 AI Builder credits. Microsoft explains capacity and Copilot Credits in Licensing and AI Builder credits.
Does an AI Builder action make my Power Automate flow premium?
No. Microsoft says adding an AI Builder action doesn’t turn a flow into a premium flow, but the action still consumes credits. A Power App that uses it becomes premium.
How do I extract text from an image with AI Builder in Power Automate?
Use Recognize text in an image or a PDF document. It reads printed and handwritten text from JPG, PNG, BMP or PDF files up to 20 MB.

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.