# Dialogflow: Creating a Chatbot

{% hint style="info" %}
**Tip:** For more advanced and easier to use automated replies to conversations, consider using [Workflows](/ismessenger/modules/workflow.md).
{% endhint %}

IS-Messenger has extensive integrations with Dialogflow that cater to various use cases, including creating chatbots.

<figure><img src="/files/F03KpRmYpkfCgiQMVU3z" alt="screenshot showing how respond.io integrates with Dialogflow"><figcaption></figcaption></figure>

The following image shows an example of how Dialogflow can be used to automate specific responses.

<figure><img src="https://files.helpdocs.io/9e3syfbzn8/articles/0og7ct98mv/1665045623496/dialogflow-creating-a-chatbot-2.gif" alt="gif showing an example of a Dialogflow automated conversation"><figcaption></figcaption></figure>

{% hint style="info" %}
**Tip:** To better understand the integration between Dialogflow and IS Messenger, read the following blog posts:\
[How To Build a Chatbot with Dialogflow](/ismessenger/workspace-setting/integrations/dialogflow.md)\
[How To Use IS Messenger As a Dialogflow CRM](/ismessenger/workspace-setting/integrations/dialogflow/dialogflow-connecting-to-dialogflow.md)
{% endhint %}

{% hint style="warning" %}
Dialogflow's chatbot is [not supported for email channels](/ismessenger/messaging-channels/email.md) on IS-Messenger due to Dialogflow's intent text input limit. Consider using [Workflows](/ismessenger/modules/workflow.md).
{% endhint %}

### Connecting to Dialogflow <a href="#connecting_to_dialogflow" id="connecting_to_dialogflow"></a>

Follow the guide below to connect to Dialogflow

{% content-ref url="/pages/nDvkAbJqJg8iKPmE9GDc" %}
[Dialogflow: Connecting to Dialogflow](/ismessenger/workspace-setting/integrations/dialogflow/dialogflow-connecting-to-dialogflow.md)
{% endcontent-ref %}

### Creating a Basic Intent <a href="#creating_a_basic_intent" id="creating_a_basic_intent"></a>

For this guide, we will create a basic intent that enables the chatbot to answer inquiries regarding operating hours.

**Step 1: Create Intent**

Navigate to the [Dialogflow](https://dialogflow.cloud.google.com/) console and click **Intents** on the side navigation menu. Press the ➕

or **CREATE INTENT** from the top of the module.

<figure><img src="https://files.helpdocs.io/9e3syfbzn8/articles/0og7ct98mv/1675304850654/dialogflow-chatbot-1.jpeg" alt="screenshot showing how to create intent in Dialogflow"><figcaption></figcaption></figure>

**Step 2: Name Your Intent**

Enter a name for your intent. Your intent name should represent the end-user expressions it recognizes. For example, `operating_hours_enquiry`.

**Step 3: Include Training Phrases**

The template phrases will be deprecated and ignored during training. Learn more [here](https://cloud.google.com/dialogflow/es/docs/intents-training-phrases#example_and_template_modes).

{% hint style="warning" %}
Training phrases are the phrases that will trigger the specific intent and the expected behavior.
{% endhint %}

You can compile the most commonly asked questions in regards to operating hours and include the list as training phrases.

For example,

> *What are your operating hours?*

> *What time do you close?*

> *Are you open on Sundays?*

> *Which day do you close?*

> *Are you open on the weekends?*

> *What time do you open?*

> *What time do you close?*

<figure><img src="https://files.helpdocs.io/9e3syfbzn8/articles/0og7ct98mv/1675305083559/dialogflow-chatbot-2.jpeg" alt="screenshot showing how to set training phrases in Dialogflow"><figcaption></figcaption></figure>

**Step 4: Build Intent Response**

Scroll down to the **Responses** section and add a **Text Response**.

{% hint style="info" %}
**Tips:**\
You can send multiple responses.\
You may add a few response variants and a response will be chosen by randomized selection for the Contact.
{% endhint %}

The response we will build for this intent is:

> Our operating hours are Monday to Saturday, 10am to 10pm. We are closed on Sundays and Public Holidays. Let us know if you require further assistance.

**Step 5: Test It Out**

You can test it with the testing panel located at the right side of Dialogflow or test it with the connected Channels.

<figure><img src="https://files.helpdocs.io/9e3syfbzn8/articles/0og7ct98mv/1675305173759/dialogflow-3.jpeg" alt="screenshot of dialogflow chatbot sample response"><figcaption></figcaption></figure>

#### What's Next? <a href="#what_s_next" id="what_s_next"></a>

Now that you know how to create an intent, enhance it with more use cases specific to your company.

{% content-ref url="/pages/aDeNohON6Y2xALSQ1m2s" %}
[Dialogflow : Managing Intents](/ismessenger/workspace-setting/integrations/dialogflow/dialogflow-managing-intents.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.is-messenger.com/ismessenger/workspace-setting/integrations/dialogflow/dialogflow-creating-a-chatbot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
