Skip to content

Location Actions

Translate

Translates text from one language to another and returns the result to a variable.

Enter or select the From Language. If blank the language will be automatically detected (if possible).

Enter or select the To Language. This is required.

Enter the Text To Translate. This is limited to 10000 characters.

Enable Is HTML if the text will contain HTML tags. Passing the built-in variable %msg_html% would pass the entire HTML of the incoming message.

Enable Preserve Layout In Plaintext if you are passing none HTML (for example, the %msg_body% field contains the plain-text version of the incoming message). If this option is enabled then any carriage return/line feed characters and any white space will be preserved. Otherwise all control characters and white space is removed from the text before translation.

Select the variable you want the translated text assigned to from the Assign Translated Text To dropdown.

Translation requires a Translation account. This is configured in the Server Settings - Translation.

You can also use the Ask AI action to translate any text. Simply send a prompt such as:

Please translate the following to French:
%Msg_Body%

You can send any ThinkAutomation variable(s) with the prompt.


Detect Language

Detects the language for any text and returns the language code to a variable.

Enter the Text To Detect. This field is limited to 10000 characters.

Select the variable you want the language code assigned to from the Assign Language Code To Variable list.

Translation requires a Translation account. This is configured in the Server Settings - Translation.

You can also use the Ask AI action to detect the language of any text. Simply send a prompt such as:

What language is this?
%Msg_Body%

Just return the language ISO 2 letter code.

You can send any ThinkAutomation variable(s) with the prompt.


Speak Text

Returns a URL of a WAV or MP3 file containing spoken text in the desired language. This action is designed to translate and then speak text in a different language. If you simply want to convert text to speech, use the Text To Speech action - which performs the conversion locally and does not require a Translation account.

Enter the Text To Speak. This is limited to 2000 characters.

Enter or select the Speak In Language. This can be the same as the input language if you just want to speak the text as is.

Select the Sound File Format (WAV or MP3).

Select the variable you want the URL to be assigned to from the Assign Sound File URL To Variable list.

You can use the Download Action if you want to download the file to your system.

Translation requires a Translation account. This is configured in the Server Settings - Translation.


GeoIP Lookup

The GeoIP lookup automation action can be used to perform a geolocation (geo-ip) lookup for any IP address, domain name, email address or URL. The lookup returns the Country name, Country code, City, Region & Organization name for any IP address. The values returned can then be used further in your automation workflow.

In the Lookup field enter any text or %variable%. If the field contains an IP address then this will be used. If no IP address is found then the first email address will be used. If no email address then the first URL. If an email address/domain name is used then ThinkAutomation will first perform a reverse DNS lookup to find the IP address and then use that to do the Geo IP lookup.

You can then assign the Country, Country Code, Region, City & Organization to variables

The Organization will be the organization that controls the IP address. In most cases this will be an ISP. For larger organizations assigned their own IP range, it will be the actual organization name.

For API received messages the remote host (IP Address) is added to the Message Headers. You can access this using the built-in variable %Msg_FromIP%.

Geolocation Lookup Use Cases

  • Risk analysis - check that the Geo-IP country of a customer email address matches the country the customer specified on an order form.
  • Country analysis - lookup country information for each received email and record in a database for later analysis.
  • Localization - when returning auto-responses to emails, web forms or web chat you can return a different response depending on the location.
  • This Action is also useful when receiving messages via the API - from web forms, web chat, or web requests. It allows you to obtain Geo IP information for the user making the request. You can return a different response depending on the location. The originating IP address will be in the %Msg_FromIP% variable.

This Action uses ThinkAutomation's own GeoIP database installed locally. This is updated on a regular basis. Geolocation data is supplied by DB-IP.


Country Lookup

Finds country information by country name, country code (2 or 3 letter) or country telephone dial code.

In the Lookup field any text or %variable%. You can search by country name, country code (ISO 3166 2 or 3 letter), dial code or country name in French.

You can then assign the Country Name, Two Letter Code, Three Letter Code, Country Dial Code, Dial Prefix, Currency Code and French Name to variables.

If no country is found then the variables will be assigned blank values. However an error will be thrown if the search text is blank.

This action is useful for validating customer details - for example if you only have a telephone number with the country code you can find the country (eg: searching for '44' or '+44' will return 'United Kingdom') or for finding the currency code when you only have the country name/code etc.