Example – Localise reference data
The following procedure describes how to build automated flows in Power Automate to translate reference data used in communications templates and on the applicant portal.
Use Power Automate to build flows to translate the text used for the Offer text to Welsh.
How it works
The example requires two flows. The flow Retrieve text retrieves and translates the offer text. Then, the flow Add translated text adds the translated offer text to Admissions. The flows work as follows:
- The flow Retrieve text is started manually.
- The flow retrieves up to 99 values from the reference data Offer library.
- The values and translated values are added to the Excel file OfferLibrayText, which has the columns Source text and Translated text.
- The flow Add translated text is started manually.
- The flow retrieves the translated text from the Excel file OfferLibrayText and adds the text to Admissions.
Build the example
Build the flows Retrieve text and Add translated text that translate the text used for the Offer text to Welsh as follows:
Build the flow to retrieve text
The image Retrieve text shows the flow to retrieve text in Power Automate, where:
-
Cloud flow with a manual trigger.
-
Action read entity collection set to the entity collection to Tribal - Read entity collection and retrieve the offer text from up 99 offer libraries.
-
Control action that for each offer text retrieved, translates the text into Welsh. Then adds the source text and translated text as a row in the defined Excel file.
Build the flow as follows:
-
Create the Excel file Offer library with the table columns Source text and Translated text. Then, save to a location on OneDrive.
-
On Power Automate, create new cloud flow with a manual trigger.
-
Add an action to read an entity collection. Go to search connectors and triggers and add Tribal - Read entity collection and define the service and entity as follows:
- Set the Service to Admissions.
-
Set the Entity to Offer library.
-
Set the Records to take to 99.
-
Add a control action. On the flow builder, select + New step and then search for the Control action and then select Apply to each. Define the collection as the output from the previous step.
-
Add the action to translate the values. On the flow builder, select + New step and then search for the Translate text into another language action. Then, select Welsh.
-
Add the action to output the translations to Excel. On the flow builder, select + New step and then search for the Excel - Add a row into a table action. Then, define the following:
-
Enter the Location, Document library, File, and Table details for the Excel file created in step 1.
-
Select mainDecisionOfferText for the Source text.
-
Select Translated text for the Translated text.
-
-
Test the flow. Manually trigger the flow and check that the Excel file has values for the source text and translated text.
Build the flow to add the translated offer text to Admissions
The image Add translated text shows the flow to retrieve text in Power Automate, where:
-
Cloud flow with a manual trigger.
-
Action to read the translations in the Excel file.
-
Control action that for each offer text retrieved, posts the translated text to the reference data service to add the translated text to Admissions.
-
On Power Automate, create a new cloud flow with a manual trigger.
-
Add an action to read the translations in the Excel file. On the flow builder, select + New step and then search for the Excel -List rows present in a table action. Then define the Location, Document library, File, and Table details for the Excel file created in the Retrieve offer text flow.
-
Add a control action. On the flow builder, select + New step and then search for the Control action and then select Apply to each. Define the output from the previous step, that is value.
-
Add the action to add the translations to Admissions. On the flow builder, select + New step and then search for the Tribal - HTTP request action. Then define the following:
-
Service is Reference data
-
Verb is POST
-
Relative URL is
/localisation/cy-gb/
For the Body, define the code used in the request and select the Source text and Translated text from the Excel file as shown in the image Body content.
Body content -
-
Test the flow. Manually trigger the flow and check that the translated text shows where appropriate in Admissions.
Demonstration
The video Offer text localisation shows the flows being used to retrieve and translate offer text and then add the translated offer text to Admissions.