How to use IBM App Connect with Google Translate

Google Translate is a translation tool that translates words, sentences, documents, and web pages.

Availability:
  • A connector in IBM App Connect Enterprise as a ServiceApp Connect Enterprise as a Service connector
  • A local connector in a Designer instance of IBM App Connect in containers (Continuous Delivery release)Local connector in containers (Continuous Delivery release) 12.0.8.0-r2 or later

Connecting to Google Translate

Complete the connection fields that you see in the App Connect Designer Catalog page or flow editor. If necessary, work with your Google Translate administrator to obtain these values.

Google Translate authorization types and connection fields:

Authorization type Connection fields Applicability
Use the application's website to sign in (OAUTH 2.0 AUTH CODE) Application client ID App Connect Enterprise as a Service
Application client secret
API URL
Provide credentials for App Connect to use (BASIC OAUTH) Application client ID App Connect Enterprise as a Service and App Connect in containers
Application client secret
Access token
Refresh token
API URL
The following table contains descriptions of the connection fields.
Tip: To generate the Application client ID, Application client secret, Access token, and Refresh token see Getting OAuth client ID, client secret, access token, and refresh token for Google applications.
Connection field Description
Application client ID The unique identifier that is generated from the Google API Console that maps to specific project requests.
Application client secret The application client secret for the unique application client ID created for a specific project.
Access token The access token that is generated from the application client ID and client secret.
Refresh token The refresh token that is generated from the application client ID and client secret.
API URL The Google service endpoint's REST resource URL. For example, https://translate.googleapis.com/v3/projects/<projectID>.
Tip: For more information about <projectID>, see Locate the project ID on the Google API Console Help page.

To connect to a Google Translate endpoint from the App Connect Designer Catalog page for the first time, expand Google Translate, then click Connect.

Tip:

Before you use the account that is created in App Connect in a flow, rename the account to something meaningful that helps you to identify it. To rename the account on the Catalog page, select the account, open its options menu (⋮), then click Rename Account.

General considerations

Before you use App Connect Designer with Google Translate, take note of the following considerations:

  • (General consideration) You can see lists of the trigger events and actions that are available on the Catalog page of the App Connect Designer.

    For some applications, the events and actions in the catalog depend on the environment and whether the connector supports configurable events and dynamic discovery of actions. If the application supports configurable events, you see a Show more configurable events link under the events list. If the application supports dynamic discovery of actions, you see a Show more link under the actions list.

  • (General consideration) If you are using multiple accounts for an application, the set of fields that is displayed when you select an action for that application can vary for different accounts. In the flow editor, some applications always provide a curated set of static fields for an action. Other applications use dynamic discovery to retrieve the set of fields that are configured on the instance that you are connected to. For example, if you have two accounts for two instances of an application, the first account might use settings that are ready for immediate use. However, the second account might be configured with extra custom fields.

Events and actions

Google Translate events

These events are for changes in this application that trigger a flow to start completing the actions in the flow.

Note: Events are not available for changes in this application. You can trigger a flow in other ways, such as at a scheduled interval or at specific dates and times.

Google Translate actions

Your flow completes these actions on this application.

Object Action Description
Locations Retrieve locations Lists information about the supported locations for this service.
Translate Detect language Detects the language of text within a request.
Translate document Translates documents in synchronous mode.
Translate text Translates input text and returns translated text.

Examples

Dashboard tile for a template that uses Google Translate
Dashboard tile for a template that uses Google Translate
Dashboard tile for a template that uses Google Translate

Use templates to quickly create flows for Google Translate

Learn how to use App Connect templates to quickly create flows that complete actions on Google Translate. For example, open the Templates gallery, and then search for Translate.

Google Translate flow in detailed view

Use IBM® App Connect to build flows that integrate with Google Translate.

Read the blog in the IBM Community to learn how to translate non-English content to English whenever a new Gmail message is received. Click Read the blog to go to the blog.