11-13-2022 04:09 AM - last edited 11-13-2022 04:32 AM
This is about using the following IBM cognitive Language translation actions using a Free plan.
Please note if you already have added this service earlier in your IBM account and are having the details like Instance Id, API key etc. handy with you, then you can skip the below steps and proceed directly on how to enter these details in the PAD action. (In Step No. 6 below)
1. On the top search box search for language translator and click on the search result.
Make sure you click the one in the Catalog Results and not the one in the Resource Results.
2. On the next page you will see a screen as below
Select your location, choose the Free Lite plan and click the Create button to create a Resource.
Refer the Lite plan details to see how many characters you can use as per this Free plan.
You will see the list of all the Resources you have added to your IBM account on the Resources page
Either use the URL https://cloud.ibm.com/resources
OR follow the below menu options
- Click the hamburger icon on the top left corner
- Then click on Resource list
3. The language translator resource or any other resource you may have added will be available in the below section.
Click on Language Translator.
4. We need to create a Credential to use this Resource. Click on Service Credentials on the left hand side
5. Create a new credential using the below button
- Give a meaningful name and click Add with all the default options.
6. Once created you will see a JSON created as below
7. Add the Translate action from the list of actions under IBM Cognitive in Power Automate Desktop.
- Add the No. 1 and No. 4 from the ones as shown below
- For the Location box in No 3. select the one that you chose while creating the Resource. Scroll up and you will find the screenshot as below. I selected eu-gb and hence I have selected UK in the PAD action (box no. 3).
- For the Version Date in No. 2 go to the API docs of the language translator
Scroll below on that page and pick the one that you see as below.
- For box No 5, either you can create your own Model and give a Model Id here (may require paid plan) OR
choose Source and Target as shown above.
- For boxes No. 6 and 7 -
Choose the Source and Target languages from the list of codes here
- In the Text field, add a hard coded text or a variable.
8. Below is the output after running the process from English to Hindi language.
- A status code of 200 indicates that it was a success. If error, double check API key, instance Id, and all of the above parameters thoroughly.
Also check if nothing is blocking these calls from PAD to the IBM APIs from your organizational access point of view.
- Read the JSONResponse variable to get the output.
The IBM Cognitive PAD.zip attachment is blank...was mandatory hence attached a dummy one.