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

# Dialogflow Engine

<Badge icon="arrow-left" color="gray">[Back to External NLU Integrations](/ai-for-service/integrations/overview#external-nlu)</Badge>

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](/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`.

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img1.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=6b35f39fa623ebd375a7c5464c74c948" alt="Create an agent" width="1398" height="644" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img1.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img2.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=448ae54477b4ae8b99411fe83a7803ef" alt="Create an intent with the same name as in your App" width="1285" height="868" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img2.png" />

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**.

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img3.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=f8203b97fd1789bafa597b9988c8b0e0" alt="Add action, parameter, entity, value, prompt" width="1920" height="1080" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img3.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img4.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=92a12519e86c7753b3a7aae3866b818b" alt="Add text response" width="1920" height="1080" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img4.png" />

6. Click **Save**.

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img5.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=02be1883c537d24d4253439e7f989ef0" alt="Go to Training and enter Intent name" width="1920" height="1080" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img5.png" />

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**.

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img6.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=3ed667ffa2051d38714c0c4a3f820ab0" alt="Configured text response displayed under Default Response" width="1920" height="1080" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img6.png" />

   <Note>You can configure any intents, entities, or FAQ details you need to identify using the Dialogflow ES adapter.</Note>

***

## Enable the Dialogflow API

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img7.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=cecceafb9219a06dd56a20ab3078d95f" alt="Click the Gear icon next to the agent name" width="933" height="461" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img7.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img8.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=0d0615ef3d47ec202a03ba2316201971" alt="Note the project ID" width="1375" height="757" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img8.png" />

   <Note>The Project ID is required when configuring the Dialogflow ES adapter on the Platform.</Note>

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**.

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img9.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=6c4fa9d79c198be06262eea1bf13ba51" alt="Click Enable APIs and Services" width="1295" height="277" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img9.png" />

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img10.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=3a7821dc355fa3a0560b777b9eb71a95" alt="Find Dialogflow API option" width="1459" height="520" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img10.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img11.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=62d66c73d71f23c364eb02af98dcc675" alt="Dialogflow API management dashboard" width="1025" height="556" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img11.png" />

***

## 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.</Note>

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img12.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=0bc53a32d15f5078ffad5cb234ef35cb" alt="Click 'Create Credentials'" width="1896" height="527" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img12.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img13.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=49549c3d49c58dfe4c95f7ff120eb166" alt="Dialogflow API is by default selected" width="810" height="600" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img13.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img14.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=a272bcb75c9afac9d453a2c2338fe54c" alt="Application Data selected" width="889" height="472" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img14.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img15.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=7607f59e35362e449591b43043af43ae" alt="No, I'm not using them" width="789" height="398" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img15.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img16.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=b395507e55a551efbdf0e712ff7394a9" alt="Service account details" width="825" height="535" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img16.png" />

6. Click **Create and Continue**.

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img17.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=55ec0862faf95f73558b8df1cbf3ed2f" alt="Grant permission to Service Account" width="797" height="508" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img17.png" />

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img18.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=47a6cf0d77f08a63a2c103b4512148e9" alt="Grant permission to User" width="850" height="492" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img18.png" />

### Generate a Private Key

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img19.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=43ff272df142bfc43f420567e1900c59" alt="Click on the Service account" width="1887" height="599" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img19.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img20.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=426fbd8018cbab82230fd62272a57948" alt="Service account details - Keys tab" width="1459" height="530" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img20.png" />

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

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img21.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=1662f8e65e6035c551543c8a5e8414d5" alt="Create a new private key" width="486" height="586" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img21.png" />

4. Select **JSON** and confirm.

   <img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img22.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=45f779d99754bfbaa3985cc20b9ac32b" alt="JSON option to create Private key" width="867" height="537" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img22.png" />

   <Note>JSON is selected by default.</Note>

A JSON file is downloaded to your computer.

<img src="https://mintcdn.com/koreai-agentplatform-dev/qz4pQi0D7Vdic1Bb/ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img23.png?fit=max&auto=format&n=qz4pQi0D7Vdic1Bb&q=85&s=56bcaaca430e0114eb7ec9ec8cf9c934" alt="JSON Private Key information downloaded" width="1266" height="396" data-path="ai-for-service/integrations/external-nlu/images/external-nlu-dialogflow-engine-img23.png" />

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.
</Note>

***

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