> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Dialogflow Engine

[Back to External NLU Integrations](https://koreai.mintlify.site/ai-for-service/integrations/overview.md#external-nlu)

The Dialogflow ES adapter uses NLP and machine learning to identify user intent and extract entities. This page covers how to create and train a Dialogflow agent, enable the Dialogflow API, and generate service account credentials for use in the Kore.ai External NLU adapter settings.

Once configured, you can [test the conversation behavior](https://koreai.mintlify.site/ai-for-service/automation/testing/test-and-debug-overview) of your AI Agent using your Dialogflow ES model.

***

## Train the Dialogflow Engine

**Prerequisites:** At least one agent created on [Dialogflow Essentials](https://dialogflow.cloud.google.com/). Intent and entity names in Dialogflow must match those defined in the Platform.

To configure the Dialogflow ES adapter, you need the **Project ID** and **Private Key** from your Google Cloud service account JSON file. See [Enable the Dialogflow API](#enable-the-dialogflow-api) and [Create Service Account Credentials](#create-service-account-credentials).

### Create and Train an Agent

1. Go to [Dialogflow Essentials](https://dialogflow.cloud.google.com/) and click **Create Agent**. In this example, the agent is named `Test_Dialogflow`.

   ![Create an agent](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img1.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=2af405fbdb0bf06fe72361853b533684)

2. Click **Create Intent** and name it to match the intent in your AI Agent.

   ![Create an intent with the same name as in your App](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img2.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=74dcbc71e7689c9252415ed77b999356)

3. In this example, the intent is named `Phone Number Verification` to match the corresponding intent in the AI Agent.

4. Under **Action and Parameters**, add the action name matching the entity, then fill in **Parameter Name**, **Entity**, **Value**, and **Prompt**.

   ![Add action, parameter, entity, value, prompt](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img3.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=9eba901423a1af85a1f725b8de359cd1)

5. Under **Responses > Default**, add the **Text Response** to display to the user.

   ![Add text response](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img4.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=d4ea343114192316a219fbf4e8a3d2b9)

6. Click **Save**.

7. Go to **Training** in the left menu and enter the intent name under **User Says**.

   ![Go to Training and enter Intent name](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img5.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=601b059f719cefd5d27ca2c5fd89e786)

8. In the **Try Now** panel (top right), enter the intent name to test the configuration.

9. The configured text response appears under **Default Response**.

   ![Configured text response displayed under Default Response](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img6.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=dc208e0a40d5a5974c911014effd7839)

   > [!NOTE]
   >
   > You can configure any intents, entities, or FAQ details you need to identify using the Dialogflow ES adapter.

***

## Enable the Dialogflow API

1. Click the **Gear** icon next to the agent name in the Dialogflow dashboard.

   ![Click the Gear icon next to the agent name](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img7.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=4e4ae4a1dd1fefe1dd25d41e9287c69a)

2. On the **General Settings** page, scroll down to find the **Project ID**.

   ![Note the project ID](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img8.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=191cf42b78e885709faf7021352f509a)

   > [!NOTE]
   >
   > The Project ID is required when configuring the Dialogflow ES adapter on the Platform.

3. Click the Project ID to open Google Cloud.

4. In the Google Cloud dashboard, go to **APIs & Services > Enabled APIs & Services**.

5. Click **+ Enable APIs and Services** and search for **Dialogflow API**.

   ![Click Enable APIs and Services](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img9.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=c3d5a7c560b89cb2f2b015ca56c79f78)

   ![Find Dialogflow API option](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img10.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=f98eabaf5e2e31642f9a8256119ebbc5)

6. After activating the Dialogflow API, click **Manage** to open the API management dashboard.

   ![Dialogflow API management dashboard](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img11.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=b82de0ded1454d11f57e055dd18b6b05)

***

## Create Service Account Credentials

### Create a Service Account

1. Click **Create Credentials** at the top of the Dialogflow API management dashboard.

   > [!NOTE]
   >
   > If you already have service accounts, access them from **Credentials** in the left navigation menu.

   ![Click 'Create Credentials'](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img12.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=e78799ac26fee0a0cf1aadd89f0679ef)

2. On the **Create Credentials** page, **Dialogflow API** is pre-selected in the **Select an API** dropdown.

   ![Dialogflow API is by default selected](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img13.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=fcd6e8a1e217b006c8e49de1f247bfd4)

3. For **What data will you be accessing?**, select **Application Data**. Click **Next**.

   ![Application Data selected](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img14.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=27fa5f55a509f5d9d5ac2e63ceb5acea)

4. Select **No, I'm not using them** and click **Next**.

   ![No, I'm not using them](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img15.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=fc2ebd41a2c6c5975d46c24c43782881)

5. Fill in the service account name, ID, and description.

   ![Service account details](https://mintcdn.com/koreai/gPfH5zsUPYZ8MZRE/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img16.png?fit=max\&auto=format\&n=gPfH5zsUPYZ8MZRE\&q=85\&s=a23feaf63da1befa3a402ea20dedac32)

6. Click **Create and Continue**.

7. Grant the required access permissions and user access on the subsequent pages.

   ![Grant permission to Service Account](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img17.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=a96f6411740a0e42dcf15d1e41db3de8)

   ![Grant permission to User](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img18.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=fd89fdc0037161a515c9345ff8c86d46)

### Generate a Private Key

1. Click the service account under **Service Accounts** in **APIs & Services**.

   ![Click on the Service account](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img19.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=f10756f64c516fba6caf9eda98350981)

2. Go to the **Keys** tab.

   ![Service account details - Keys tab](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img20.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=f691621f5ca07408ab03340baf3485dd)

3. In the **Add Key** dropdown, select **Create a new key**.

   ![Create a new private key](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img21.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=e3337e6a5c8e4e337311c4ddab17872c)

4. Select **JSON** and confirm.

   ![JSON option to create Private key](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img22.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=cb490215a45f212531f2db19549f0003)

   > [!NOTE]
   >
   > JSON is selected by default.

A JSON file is downloaded to your computer.

![JSON Private Key information downloaded](https://mintcdn.com/koreai/aWGmDC4TMVyNnT1F/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img23.png?fit=max\&auto=format\&n=aWGmDC4TMVyNnT1F\&q=85\&s=54ba79c369b4b44647081e16b7e907bd)

The file structure:

```json theme={null}
{
  "type": "***",
  "project_id": "***",
  "private_key_id": "***",
  "private_key": "***",
  "client_email": "***",
  "client_id": "***",
  "auth_uri": "***",
  "token_uri": "***",
  "auth_provider_x509_cert_url": "***",
  "client_x509_cert_url": "***"
}
```

> [!NOTE]
>
> Save this JSON file securely — you can't access it again. Copy the entire contents into the **Private Key** field in the Kore.ai External NLU adapter settings.

***

To validate the Dialogflow NLU configuration, see [Test and Debug](https://koreai.mintlify.site/ai-for-service/automation/testing/test-and-debug-overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.