Translate

The Translate action converts text from the original language into a different language. You can use this action along with the Detect Language action.

Note: The functionality of this action is text-related only.

The Translate action on a blank board

 

Available Variables

Available Variables are placeholders for information that are automatically determined based on the contents of your flow. For example, if your flow begins with an Inbound Call trigger, the caller’s phone number is stored as a $ANI variable. You can include sending a follow up SMS to the caller later in your flow by including the $ANI variable in the Send SMS action Inputs.

You can drag and drop the variables displayed in this section into the Inputs and Advanced fields.

Check out How to Use Variables in SmartFlows for more information.

 

Inputs

Input Name Description
Source Language The original language of the text.
Target Language The language to translate the text into. Click here to see the supported languages.
Text/Message The text to be translated. To detect the language of an incoming SMS, select the variable of the Inbound Text action and drag it into this field.

 

Variables

The Translate action creates the following variables to be used and evaluated in the rest of the flow:

Variable Name Description
$TRANSLATE_#.responsebody The entire response from the API
$TRANSLATE_#.statuscode The code indicates the status of the API response (200= success, 404 = not found, 403 = forbidden)
$TRANSLATE_#.response.languages[0].language The language returned by the Detect Language API

Check out How to Use Variables in SmartFlows for more information about using variables in your flow.

 

Action

Each Translate action includes two exit ports corresponding to the following outcomes:

  • On Success: The course of the flow if the text is successfully converted (port 1)

  • On Failure: The course of the flow if the text is not successfully converted (port 2)

An action should be connected to each of the exit ports to deploy your flow and the port order cannot be rearranged.