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.
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:
- Sign in to Power Apps.
- Go to Solutions (from the left navigation) and create a new dataverse solution on the solution page. Here, I have created a solution named Dataverse Translator as shown below.
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.
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.
Step – 4:
Next, we will create a new column inside the Language Translator table.
- Expand the + New option -> Select Column under the Schema category.
- 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.
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.
- Select Information Main type as like the image below.
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).
- After dragging the column into the dataverse main form, it will look like the figure below.
- Just Save and Publish the Dataverse main form.
Step – 7:
We will now design a flow that will assist in identifying the user’s language and updating the Dataverse table accordingly.
- Sign in to Microsoft Power Automate.
- Go to My flows -> Expand + New flow -> Select Build your own.
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.
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.
- As soon as the flow is created, the screen below will show up.
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.
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.
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)
- Invalid connection. Please choose a connection
- 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
- Once the issue has been resolved, now you can again rename and save the flow.
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.
- On the Test Flow window, click on Manually. Click Test.
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.
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.
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:
- Table name = Select and provide the specific Dataverse table name (Language Translators).
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).
3. Standard Text = Select the Dataverse primary column name (Standard Text) under the Dynamic content tab.
4. Base Language = Under the Dynamic content, Select Language under the Detect the language being used in text section.
Step – 17:
- Finally, save and test the flow again. Click on Test.
- 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.
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.
This is how to detect text or language in Dataverse using AI Builder.
Additionally, you may like some more Dataverse tutorials:
- How to Enable TDS in Power Platform Admin Center
- How to get Collection Column Names in Power Apps [From 3 Different Datasources]
- How To Remove Commas From Dataverse Number Field
- How To Get Row by ID From Dataverse Table
- How To Get Dataverse List Rows Count Using Power Automate
- How to get data from Dataverse in Power Apps
- How to Create Dataverse View
- Dataverse Power BI
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.
I am Bijay a Microsoft MVP (10 times – My MVP Profile) in SharePoint and have more than 17 years of expertise in SharePoint Online Office 365, SharePoint subscription edition, and SharePoint 2019/2016/2013. Currently working in my own venture TSInfo Technologies a SharePoint development, consulting, and training company. I also run the popular SharePoint website EnjoySharePoint.com