How to Detect Text in Dataverse Using AI Builder

In this Microsoft Dataverse tutorial, We will discuss how to detect text in Dataverse using AI Builder in Power Automate.

Additionally, while using Power Automate AI Builder, we’ll look at how to fix the problem of an invalid connection. Finally, we’ll demonstrate how to update a Dataverse row using Power Automate.

Throwback I was working on a Dataverse project where I had to identify the language from a text and then update the base language in the Dataverse table. I was utilizing Power Automate AI Builder for this.

Requirement:

The screenshot below shows a Dataverse table called Language Translator that has two columns, Standard Text, and Base Language.

When a user enters any value into the Standard Text field, the flow is started and the Base Language field is automatically updated. The base language field determines what kind of language the user has entered.

For example, the flow began when I typed Bienvenue in the Standard Text field and it identified as a French (fr) language that had updated automatically in the Base Language field.

AI Builder detect Dataverse text
AI Builder detect Dataverse text

Follow the instructions below to know more details.

Also, Read: How to Update a Row in Dataverse Using Power Automate

Detect Text in Dataverse Using AI Builder

Here we will see how to detect text in Dataverse using AI builder step by step.

Step – 1:

Translate Text in Dataverse Using AI Builder
Translate Text in Dataverse Using AI Builder

Step – 2:

Open the Dataverse solution (Dataverse Translator). Create a new dataverse table inside the solution.

  • Expand + New on the top bar -> Select Table -> Click on the Table option as below.
How to translate Text in Dataverse Using AI Builder
How to translate Text in Dataverse Using AI Builder

Step – 3:

In the New table pane, there are two tabs i.e. Properties and Primary column.

  • Go to the Properties tab and enter the below field value:
    • Display name = Provide a name to the table.
    • Plural name = Once you provide any name here, then the name will also auto-reflect in the second field with a plural value.
  • Go to the Primary column tab and enter the below field value:
    • Display name = Provide a unique primary column name.

Click on Save. Now the new table is ready to use.

Translate Text in Dataverse table Using AI Builder
Translate Text in Dataverse table Using AI Builder

Step – 4:

Next, we will create a new column inside the Language Translator table.

  • Expand the + New option -> Select Column under the Schema category.
How to translate a text in Dataverse Using AI Builder
How to translate a text in Dataverse Using AI Builder
  • In the New column pane, enter the below field values:
    • Display name = Provide a unique column name.
    • Description = It is optional. Provide the description of the column.
    • Data type = Select a Single line of text data type.
  • Click on Save to create this column.
Detect Text in Dataverse Using Power Automate
Detect Text in Dataverse Using Power Automate

Step – 5:

Once the column is created, we can also put that field in the Dataverse form.

  • Go to Forms under the Data experiences section.
Translate Text in Dataverse Using Flow
Translate Text in Dataverse Using Flow
  • Select Information Main type as like the image below.
How to translate Text in Dataverse Using Flow
How to translate Text in Dataverse Using Flow

Step – 6:

  • The below screenshot represents the Information Main form where you can add the new column (Base Language) that you recently created.
  • Go to the Column tab (from left nav) -> Drag the Base Language column -> Drop the column below the Primary column (Standard Text).
How to translate Text in Dataverse Using Power Automate
How to translate Text in Dataverse Using Power Automate
  • After dragging the column into the dataverse main form, it will look like the figure below.
  • Just Save and Publish the Dataverse main form.
Recognize language in Dataverse using AI Builder
Recognize language in Dataverse using AI Builder

Step – 7:

We will now design a flow that will assist in identifying the user’s language and updating the Dataverse table accordingly.

How to translate text in Dataverse using AI Builder
How to translate text in Dataverse using AI Builder

Step – 8:

It will then prompt you to select a flow trigger. However, you must first select a connector from the Connector section.

  • Select Microsoft Dataverse under the Choose a connector section.
  • Choose a trigger When a row is added, modified, or deleted.
  • Click on Next.
Translate text in dataverse table using flow
Translate text in dataverse table using flow

Step – 9:

After that, you will redirect to the next page where you need to choose an action. Select the action that happens after your flow is triggered.

  • Search AI Builder in the search bar and then select it under the All category.
  • Select Detect the language being used in text under the Choose an action section.
  • Click on Next.
Translate text in dataverse table using Power Automate
Translate text in dataverse table using Power Automate
  • As soon as the flow is created, the screen below will show up.
Translate text in dataverse table
Translate text in dataverse table

Step – 10:

  • Now expand the flow trigger (When a row is added, modified, or deleted) and enter the below field values:
    • Change type = Select the change type as Added.
    • Table name = Provide the Dataverse table name (Language Translators) that you have created in the Dataverse solution.
    • Scope = Select the scope as Organization.
Power Automate Translate text in dataverse
Power Automate Translate text in dataverse

Step – 11:

  • Similarly, expand the action (Detect the language being used in text) under the trigger and provide the field value:
    • Text = Select the Dataverse Primary column name (Standard Text) under the Dynamic content tab.
How to translate Text in Dataverse using Power Automate
How to translate Text in Dataverse using Power Automate

Step – 12:

  • Now rename the flow and save it. When you are trying to save the flow, you may face some errors like (If you are not getting any errors like below, then you can skip this step and proceed with Step 13)
  1. Invalid connection. Please choose a connection
  2. Value can not be null. Parameter name: Key

To fix these types of AI Builder issues, you can refer to this article: Invalid Connection. Please Choose a Connection Power Automate

Invalid connection in Power Automate AI builder
Invalid connection in Power Automate AI builder
  • Once the issue has been resolved, now you can again rename and save the flow.
Power automate AI Builder Value cannot be null
Power automate AI Builder Value cannot be null

Step – 13:

  • The flow will save and it will notify you with a successful message i.e. “Your flow is ready to go. We recommend you test it“.
  • Click on the Test button to test it.
Power Automate translate a Text in Dataverse table
Power Automate translate a Text in Dataverse table
  • On the Test Flow window, click on Manually. Click Test.
Create flow to translate Text in Dataverse
Create flow to translate Text in Dataverse

Step – 14:

  • Go to the specific Dataverse table (Language Translator) and add a new item over there. Also, you can use the Dataverse form to create a new item in the table.
Create Power Automate to translate Text in Dataverse
Create Power Automate to translate Text in Dataverse

Step – 15:

  • Next, come to the flow page and you can see the flow has run successfully with a successful message.
  • Expand the second action (Detect the language being used in text) and scroll down to the OUTPUTS section. You can see that the language has been identified as “fr” which stands for French.
Power Automate to translate Text in Dataverse
Power Automate to translate Text in Dataverse

Step – 16:

  • Now to update this value or output in the Dataverse table, add a new action using the + icon.
  • Select the Update a row action under the Microsoft dataverse section.
  • Provide the field values under the Update a row action:
  1. Table name = Select and provide the specific Dataverse table name (Language Translators).
Power Automate detect text in Dataverse
Power Automate detect text in Dataverse

2. Row ID = Select the Dynamic content tab and click the Language Translator identifier under the Dataverse trigger (When a row is added, modified, or deleted).

Detect text in Dataverse using AI Builder
Detect text in Dataverse using AI Builder

3. Standard Text = Select the Dataverse primary column name (Standard Text) under the Dynamic content tab.

Detect language in Dataverse using AI Builder
Detect language in Dataverse using AI Builder

4. Base Language = Under the Dynamic content, Select Language under the Detect the language being used in text section.

How to detect language in Dataverse using AI Builder
How to detect language in Dataverse using AI Builder

Step – 17:

  • Finally, save and test the flow again. Click on Test.
Detect language in Dataverse using AI Builder Power Automate
Detect language in Dataverse using AI Builder Power Automate
  • On the Test Flow pane, select Automatically and then select With a recently used trigger option. Click on the Test button as below.
  • After a while, the flow test will success and you will get a successful notification.
AI Builder detect language from dataverse text
AI Builder detect language from dataverse text

Step – 18:

  • At last, go to the Dataverse table (Language Translator) and refresh it. Once the table is refreshed, you can see the value has been updated in the Base Language field to fr as shown below.
AI Builder detect Dataverse text
AI Builder detect Dataverse text

This is how to detect text or language in Dataverse using AI Builder.

Additionally, you may like some more Dataverse tutorials:

In this Microsoft Dataverse tutorial, We discussed how to detect text in Dataverse using AI Builder in Power Automate.

Moreover, We saw how to fix the problem of an invalid connection while using Power Automate AI Builder. Finally, we learned how to update a Dataverse row using Power Automate.

>