Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Integrate with a translation service provider

Integrate with a third-party translation provider of your choice for machine translation of user-generated text.

Before you begin

  • Create an account with your third-party translation service provider, and obtain the connection and credentials needed for integration.
  • Role required: admin

About this task

By default Dynamic Translation provides partially preconfigured translator records for several third party services. However, you can also create your own custom integration for a different service provider.

Custom integrations require you to create subflows for language detection and translation, including actions, in Workflow Studio.

Use default subflows as examples when you build your own subflows. For example:

  • Detect Language [detect_language_v4]
  • Translate Text [translate_text_v3]

For background information, see Workflow Studio and Migrate customized Translator Configurations to v4 flows.

Procedure

  1. Confirm your application scope, then navigate to All > Process Automation > Workflow Studio, and select New.

    To map error codes try using actions in subflows. For example, the Translate Text subflow has a Translate Text action. On that action, you can select Open in Action Designer. In the Action Outline section of the Action Designer, you can select Error Evaluation. You can overwrite the default error status that a step produces at runtime by entering new status code and status message values. See Action error evaluation.

    1. Map error codes from your machine translation provider to the error codes and standardized error messages supported by ServiceNow.

      Error codeError message
      40050Error code to populate error messages from the machine translation provider instead of standardized error messages.
      40051Unknown error occurred.
      40052Text ('text' field) has exceeded its maximum length.
      40053Source language is invalid.
      40054Target language is invalid.
      40055Request is not authorized because credentials are missing or invalid.
      40056Text cannot be translated to target languages.
    2. Ensure that the inputs and output fields are in the following format for subflows.

Field nameDescriptionType
Inputs
textsInput texts whose language should be detected.Version v3 supports bulk detection \(detection of multiple texts input in a single string\). With the Xanadu Patch 3 release, version v4 supports Exclusion Framework as well as bulk detection.Array.String
Outputs
detectionsInformation about the code and confidence of the languages detected by the translator and their respective alternatives, error codes, and error messages.- Code: Language code of the detected language as specified by the translation service provider. - Confidence: Value that indicates the confidence in the result. The value is between zero and one. A low value indicates a low confidence. For example, French text with confidence of 0.93
{ 'code' : 'fr',  'confidence' : '0.93'  }
For more information refer to the getDetectedLanguages section of DynamicTranslation - Scoped.
Array.Object. Each element of the Object is a String value.
statusStatus of the request.Choice
Field nameDescriptionType
Inputs
textsTexts to be translated.Version v3 and above support bulk translation \(translation of multiple texts input in a single string\).Array.String
target\_languagesArray of language codes to which the text needs to be translated.For example,
['fr','it']
Array String. Each element of the array is a String value.
source\_languageLanguage code of the source text.For example,
en
String
additional\_parametersArray of additional parameters. For example,
[{'parameter_name': 'textType', 'parameter_value': 'html'}]
Array.Object. Each element of the array is an Object with String values.
Outputs
translationsTranslated texts in the specified target languages. Each element of the array is an Object containing target language and the translated text.For example,
[ 
{'target_language':'fr', 'translated_text':'Bonjour'}, 
{'target_language':'it', 'translated_text':'ciao'} 
]
For more information refer to the getTranslations section of DynamicTranslation - Scoped.
Array.Object. Each element of the array is an Object with String values.
statusStatus of the request.Choice
    **Note:** Ensure that the **Run As** field is set to **User who initiates session** in the flow properties.
  1. Create a custom translator configuration for your service provider in the Translator Configurations table, and set the record to active.

    When you create the record in the Translator Configurations table, search for the subflows you created in the previous step..

  2. If your instance is on Xanadu Patch 3 or higher, and you intend to use Exclusion Framework, enter your translation provider's exclusion tags in the Exclusion Provider Pattern table.

    Refer to your provider's documentation to obtain these tags. For more information about entering the tags, see Add an Exclusion Provider Pattern.

  3. Create a language code mapping to associate your provider's language codes to ServiceNow language codes.

    For more information, see Create a language code mapping.

What to do next

For information about APIs, see DynamicTranslation API.

Parent Topic:Integration with other translation services