Build AI Chatbots with Dialogflow

🕒 Estimated Reading Time: 2 Minutes

In this article

1. Connect Dialogflow agent to Elegant Bots

  • 2. How to refer to user name on Dialogflow
  • 3. How to send flows from Dialogflow
  • 4. Use actions from Dialogflow
  • 5. Call Dialogflow intent from Elegant Bots with event

Dialogflow is a natural language processing (NLP) platform that can be used to build smart chatbots able to understand a natural conversation.

We advise you to use our built-in AI to automate FAQs in your chatbot since our AI will always provide 100% accurate responses to your customers and you can train your bot much faster because you will only need to provide one version of any FAQ (training phrase). You can learn how to train your bot HERE.

In all other cases you can use Dialogflow to understand users messages.

Connect Dialogflow agent to Elegant Bots.

Only our support can connect your Dialogflow agent to Elegant Bots. You will need to contact us and provide your Google Credentials. 

Once we have completed the connection for you, your bot will automatically communicate with your Dialogflow agent every time a user sends a message to your bot. It is important to mention that the user language is automatically sent to Dialogflow also.

If the parameter name on Dialogflow matches a custom field on Elegant Bots that value is automatically saved.

Elegant Bots AI will not work if your Dialogflow agent contains the default intent. You need to remove the default intent on your Dialogflow agent if you want our AI and Dialogflow to work simultaneously.

How to refer to user name on Dialogflow

{{{first_name}}} to refer to the user first name.

{{{last_name}}} to refer to the user last name.

How to send flows from Dialogflow 

To send a flow you will need to send a JSON RESPONSE from Dialogflow.

To get the flow ID, go to the list of flows, and try to edit the flow. After that you can get the flow id in the URL bar of your browser.

You can send multiple JSON response and even combine multiple TEXT RESPONSE and JSON RESPONSE. It is possible to add/remove tags, set/clear custom fields from Dialogflow agent.

Use actions from Dialogflow

You can use any actions that is supported by External Request. The flow field is optional.

Add Tag

{
    "messages": [],
    "actions": [
        {
            "action": "add_tag",
            "tag_name": "..."
        }
    ]
}

Remove Tag

{
    "messages": [],
    "actions": [
        {
            "action": "remove_tag",
            "tag_name": "..."
        }
    ]
}

Set Custom Field

{
    "messages": [],
    "actions": [
        {
            "action": "set_field_value",
            "field_name": "...",
            "value": ""
        }
    ]
}

Unset Custom Field

{
    "messages": [],
    "actions": [
        {
            "action": "unset_field_value",
            "field_name": "..."
        }
    ]
}

Call Dialogflow intent from Elegant Bots with event

You can use Dialogflow action on Elegant Bots to start any intent at any point during the conversation. For example, you can start an intent when a user clicks a button.

That’s it..enjoy!