Skip to content

Google Cloud Dialogflow ES

The Google Cloud Dialogflow modules enable you to monitor and respond to fulfillments, or create, update, retrieve, and delete agents, contexts, entities, and intents in your Google Cloud Dialogflow.

Getting Started with Google Cloud Dialogflow

Prerequisites

In order to use Google Cloud Dialogflow with Ibexa Connect, it is necessary to have a Google account. If you do not have one, you can create a Google account at dialogflow.cloud.google.com.

Note

The module dialog fields that are displayed in bold (in the Ibexa Connect scenario, not in this documentation article) are mandatory!

Connecting Google Cloud Dialogflow to Ibexa Connect

To connect your Google Cloud Dialogflow account to Ibexa Connect you need to obtain the project's Client ID and Client Secret in the Google API Console.

  1. Sign in to the Google API console using your Google credentials.

  2. Click CREATE PROJECT.

    61f26eb70202e.png

  3. Enter the desired project name, and click the CREATE button.

    61f26eb82369d.gif

  4. Go to APIs & Services > Dashboard. Click on the +ENABLE APIS AND SERVICES.

    61f26ebb069ff.gif

  5. Type "Dialogflow API" in the Search for APIs & Services field.

  6. The desired service option should display as you type. Click on the API/service you want to connect to Ibexa Connect.

    61f26ebe0164d.gif

  7. Click the ENABLE button to enable the selected API.

    61f26ec04ee57.png

  8. Go to Credentials, and click CONFIGURE CONSENT SCREEN.

    61f26ec167162.gif

  9. Choose the External option, and click the CREATE button.

    Note

  10. Fill in the required fields as follows, and then click the Save button:

Application name

Enter the name of the app asking for consent.

For example Ibexa Connect.

Scopes for Google APIs

Click the Add scope button to open the Add scope dialog.

Add Dialogflow API scopes.

61f26ec5d7bf9.gif

SERVICE/API REQUIRED SCOPES
Dialogflow API https://www.googleapis.com/auth/cloud-platform

https://www.googleapis.com/auth/dialogflow

Authorized domains

make.com

integromat.com

Note

You don't need to submit your consent screen and application for verification by Google. Just click the Save button after you fill in the required fields on this page.

  1. Go to Credentials. Click on the +CREATE CREDENTIALS, and select the OAuth Client ID option.

    61f26ec9da517.gif

  2. Fill in the required fields as follows, and then click the CREATE button to create the application:

    Application type Web application
    Name e.g. Ibexa Connect
    Authorized redirect URIs https://www.integromat.com/oauth/cb/google-custom
  3. A dialog containing the app's Client ID and Client Secret is displayed. Save them to a safe place for later use.

    61f26ecc35284.png

  4. Go to Ibexa Connect, open the Create a connection dialog of the desired Google Cloud Dialogflow module, enter the Client ID and Client Secret from step 13 above to the respective fields, and click Continue.

    61f26ecd39e3a.png

  5. Sign in with your Google account.

  6. The This app isn't verified window may appear.

    Note

  7. Click on the Advanced link, and then on the Go to Ibexa Connect (unsafe) link to allow access using your custom OAuth client.

    61f26ece7e34a.gif

  8. Click Allow (2x) to grant Ibexa Connect permissions.

    61f26ed0b60f3.gif

  9. Click the Allow button to confirm your choices.

    61f26ed24667f.png

    The connection to your Google Cloud Dialogflow account has been established.

  10. Create an agent in your Dialogflow ES account, and select the project you are using to connect to Ibexa Connect.

    61f26edb73d9e.gif

Fulfillment

Watch for Fulfillments

Triggers when an intent action is performed.

The webhook URL needs to be generated in Ibexa Connect and then added to Google Cloud Dialogflow ES's Fulfillment settings.

  1. Add the Watch for Fulfillment module to your Ibexa Connect scenario.

  2. Generate and copy the webhook URL.

    61f26ed6e5f0f.gif

  3. Log in to your Google Cloud Dialogflow ES account.

  4. Go to Fulfillment and enable webhooks.

    61f26ed918b53.gif

  5. Enter the webhook URL you have copied in step two to the URL field, and click Save.

    61f26edb73d9e.gif

  6. Enable webhooks for the desired intent.

    61f26eddc378d.gif

    Now, every time an intent with fulfillment enabled is matched, the Watch for Fulfillment module in your Ibexa Connect scenario is triggered.

Response to Fulfillment

When the Watch for Fulfillment module is triggered, the Response to Fulfillment module responds to Dialogflow with information on how to proceed.

The Watch for Fulfillment module must be added to the scenario before the Response to Fulfillment module.

61f26ee117163.png

Fulfillment Messages

Add response messages. Select the messages to be presented to the user.

Text

Specify the text response message.

Image

Specify the image response message.

Quick Replies

Specify the title and quick replies of the response message.

Card

Specify the card response message.

Payload

Specify a custom platform-specific response.

Simple Responses

Specify the voice and text-only responses for Actions on Google.

Basic Card

Specify the basic card response for Actions on Google.

Suggestions

Specify the suggestion chips for Actions on Google.

Link Out Suggestion

Specify the link out suggestion chip for Actions on Google.

List Select

Specify the list card response for Actions on Google.

Carousel Select

Specify the carousel card response for Actions on Google.

Browse Carousel Card

Specify the browse carousel card for Actions on Google.

Table Card

Specify the table card for Actions on Google.

Media Content

Specify the media content card for Actions on Google.

Source

Enter a custom field used to identify the webhook source.

Payload

Enter the custom payload data as key-value pairs.

Output Contexts

When an intent is matched, any configured output contexts for that intent become active. Multiple output contexts can be applied to an intent.

Name

Enter the path to the context.

Example projects/zinc-involution-290910/agent/sessions/4380a89f-6461-ad33-7f89-652af5233856/contexts/test_context

Lifespan Count

Defines the number of conversational turns for which the context remains active. The default lifespan is five conversational turns for normal intents and two conversational turns for follow-up intents. You can override the default lifespan for any contexts. In addition, all contexts expire after 20 minutes of becoming active. When an intent is matched with an output context that is already active, the lifespan and expiration timer are reset.

Parameters

Define parameters. For more details, please refer to the Dialogflow Documentation.

Followup Event Input

When the Followup Event Input is set, Dialogflow ignores the Fulfillment Text, Fulfillment Messages, and Payload fields. When Dialogflow receives a webhook response that includes an event, it immediately triggers the corresponding intent in which it was defined.

Session Entity Types

Name

Enter the unique identifier of this session entity type.

Entity Override Mode

Indicates whether the additional data should override or supplement the custom entity type definition.

Select the type of modifications for a session entity type.

Entities

Add entities associated with this session entity type.

Agent

Create an Agent

Creates an agent in the specified project.

Project ID Select the project you want to assign the new agent to.
Default Language Code Select the default language of the agent.
Display Name Enter the name of the agent.
Time Zone Select the time zone of this agent.
Supported Language Codes Select all languages supported by the agent (except for the Default Language Code).
Description Enter the description of this agent. The maximum length is 500 characters.
Avatar URI Enter the URI of the agent's avatar.
Enable Logging Select whether this agent should log conversation queries.
Match Mode Determines how intents are detected from user queries.
Classification Threshold To set the score value to filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a fallback intent will be triggered, or, if there are no fallback intents defined, no intent will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used.
Tier Select the agent tier. Default is Standard tier.

Get an Agent

Retrieves the details of an agent in the specified project.

Project ID Select or map the project you want to retrieve details for.

Update an Agent

Updates an existing agent.

Project ID Select the project of the agent you want to update.
Display Name Enter the display name of the agent you want to update.

Please find the descriptions of the fields in the Create an Agent section above.

Delete an Agent

Deletes an agent from the project.

Project ID Select the project of the agent you want to delete.

Context

Create a Context

Creates a new context in the specified session.

Project ID Select the project for which you want to create a context.
Session ID Enter (map) the session ID for which you want to create a context.
Context ID Enter the unique identifier of the context. The Context ID is always converted to lowercase, may only contain characters a-z, A-Z, 0-9, _-%, and may be at most 250 bytes long.
Lifespan Count Enter the number of conversational query requests after which the context expires. The default is 0. If set to 0, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
Parameters Set the Parameter Reference and the Parameter Value to be associated with this context.

Get a Context

Retrieve context details.

Project ID Select the project you want to retrieve a context for.
Session ID Enter (map) the session ID you want to retrieve a context for.
Context ID Enter the unique identifier of the context you want to retrieve details for. The Context ID is always converted to lowercase, may only contain characters a-z, A-Z, 0-9, _-%, and may be at most 250 bytes long.

List Contexts

Retrieves all contexts for the specified session.

Project ID Select the project that contains the session you want to retrieve contexts for.
Session ID Enter (map) the session ID you want to retrieve contexts for.
Limit Set the maximum number of contexts Ibexa Connect will return during one execution cycle.

Update a Context

Updates an existing context.

Project ID Select the project you want to update a context for.
Session ID Enter (map) the session ID you want to update a context for.
Context ID Enter the unique identifier of the context you want to update. The Context ID is always converted to lowercase, may only contain characters a-z, A-Z, 0-9, _-%, and may be at most 250 bytes long.

Please find the descriptions of the fields in the Create a Context section above.

Delete a Context

Deletes a context.

Project ID Select the project you want to delete a context from.
Session ID Enter (map) the session ID you want to delete a context from.
Context ID Enter the unique identifier of the context you want to delete. The Context ID is always converted to lowercase, may only contain characters a-z,A-Z, 0-9, _-%, and may be at most 250 bytes long.

Entity

Create Entities

Project ID Select or map the project you want to create an entity for.
Entity Type ID Select or map the entity type you want to add.
Entities Add entities (value and synonym).
Language Code Select the language you want to use for the entity.

List Entities

Retrieves all entities of the specified entity type.

Project ID Select or map the project that contains the entity type you want to list entities for.
Entity Type ID Select or map the entity type you want to list entities for.
Language Code Select the language you want to filter returned entities by.
Limit Set the maximum number of entities Ibexa Connect will return during one execution cycle.

Delete Entities

Deletes specified entities from the entity type.

Project ID Select or map the project that contains the entity type you want to delete entities from.
Entity Type ID Select or map the entity type you want to delete entities from.
Entity Values Add entity values you want to delete.
Language Code Select the language you want to use to filter entities you want to delete.

Entity Type

Create an Entity Type

Creates a new entity type in the specified project.

Project ID

Select or map the project you want to create the entity type for.

Display Name

Enter the name for the new entity type. The Display Name should start with a letter and can contain only the following: A-Z, a-z, 0-9, _ (underscore), - (dash)

Kind

Select the kind of entity type.

Entities

Specify the entity based on the kind selected above.

Auto Expansion Mode

Indicates whether the entity type can be automatically expanded.

Unspecified

Auto expansion disabled for the entity.

Default

Allows an agent to recognize values that have not been explicitly listed in the entity.

Enable Fuzzy Extraction

Select the Yes option to enable fuzzy entity extraction during classification.

Language Code

Select the language you want to use for the new entity type.

Get an Entity Type

Retrieves entity type details.

Project ID Select or map the project that contains the entity type you want to retrieve details for.
Entity Type ID Select or map the entity type you want to retrieve details for.
Language Code Select the language you want to filter entity types by.

List Entity Types

Retrieves all entity types for the specified project.

Project ID Select or map the project that contains the entity type you want to retrieve details for.
Language Code Select the language you want to filter entity types by.
Limit Set the maximum number of entity types Ibexa Connect will return during one execution cycle.

Update an Entity Type

Updates an existing entity type.

Project ID Select or map the project that contains the entity type you want to update.
Entity Type ID Select or map the entity type you want to update.

Delete an Entity Type

Deletes an entity type.

Project ID Select or map the project that contains the entity type you want to delete.
Entity Type ID Select or map the entity type you want to delete.

Intent

Detect an Intent

Detects an intent request.

Project ID

Select or map the project that contains the session you want to detect an intent for.

Session ID

Enter (map) the session you want to detect an intent for. For the purpose of testing an agent, you can use anything. For example, "123456789" is frequently used by samples.

Input Type

Specify the input.

  • Audio ConfigurationAn audio config that instructs the speech recognizer on how to process the speech audio.

  • TextA conversational query in the form of text.

  • EventAn event that specifies which intent to trigger.

Query Input - Audio Configuration

Set the query to instruct the speech recognizer how to process the audio content. For a description of the fields, please refer to the Dialogflow documentation.

Query Input - Text

Specify the text to represent the natural language text to be processed. For a description of the fields, please refer to the Dialogflow documentation.

Query Input - Event

Specify the event to match intents by event name instead of the natural language input. For a description of the fields, please refer to the Dialogflow documentation.

Output Audio Configuration

Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.

Audio Encoding

Select the audio the encoding of the output audio format in Text-To-Speech.

Sample Rate Hertz

Enter the synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).

Synthesize Speech Config

Configure how speech should be synthesized. For a description of the fields, please refer to the Dialogflow documentation.

Query Parameters

Set the parameters of the conversational query. For a description of the fields, please refer to the Dialogflow documentation.

Create an Intent

Creates an intent in the specified project's agent.

Project ID

Select or map the project that contains the agent you want to create an intent for.

Display Name

Enter the name of the new intent.

Webhook State

Select one of the options to enable webhooks for the intent.

  • WEBHOOK_ STATE_ ENABLED

    Webhook is enabled in the agent and in the intent.

  • WEBHOOK_ STATE_ ENABLED_ FOR_ SLOT_ FILLING

    Webhook is enabled in the agent and in the intent. Also, each slot filling prompt is forwarded to the webhook.

Priority

Set the priority of this intent. Higher numbers represent higher priorities.

  • If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the Normal priority in the console.

  • If the supplied value is negative, the intent is ignored in runtime detect intent requests.

Is Fallback

Select the Yes option to set this intent as a fallback intent.

ML Disabled

Select the Yes option to disable Machine Learning for the intent.

Note: If ML Disabled setting is set to true, then this intent is not taken into account during inference in ML ONLY match mode. Also, auto-markup in the UI is turned off.

Input Context Names

Add context names required for this intent to be triggered. Format: projects/<Project ID>/agent/sessions/-/contexts/<Context ID>

Events

Add event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.

Training Phrases

Add examples that the agent is trained on. For a description of the fields, please refer to the Dialogflow documentation.

Action

Enter the name of the action associated with the intent.

Note

The action name must not contain whitespaces.

Output Context

Add contexts that are activated when the intent is matched.

Reset Contexts

Select the Yes option to delete all contexts in the current session when this intent is matched.

Parameters

Define parameters associated with the intent. For a description of the fields, please refer to the Dialogflow documentation.

Messages

Add messages corresponding to the Response field in the Dialogflow console. For a description of the fields, please refer to the Dialogflow documentation.

Default Response Platforms

Set the platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).

Language Code

Select the language of the intent. Languages must be enabled in the agent before they can be used.

61f26ee24b1f6.gif

Intent View

Select an option for views of an intent. An intent can be a sizable object. Therefore, we provide a resource view that does not return training phrases in the response by default.

  • INTENT_VIEW_UNSPECIFIED

    Training phrases field is not populated in the response.

  • INTENT_VIEW_FULL

    All fields are populated.

Get an Intent

Retrieves details of the specified intent.

Project ID

Map or select the project that contains the intent you want to retrieve details for.

Intent ID

Map or select the intent you want to retrieve details for.

Language Code

Enter or select the language code you want to retrieve intent details for.

Intent View

Select an option for views of an intent. An intent can be a sizable object. Therefore, we provide a resource view that does not return training phrases in the response by default.

  • Unspecified

    Training phrases field is not populated in the response.

  • Full

    All fields are populated.

List Intents

Retrieves all intents in the project's agent.

Project ID Map or select the project that contains the agent you want to retrieve intent for.
Language Code Enter or select the language code of intents you want to retrieve.
Limit Set the maximum number of intents Ibexa Connect will return during one execution cycle.

Update an Intent

Updates an intent in the specified project's agent.

Project ID Map or select the project that contains the intent you want to update.
Intent ID Map or select the intent you want to update.

Please find the descriptions of the fields in the Create an Intent section above.

Delete an Intent

Deletes an intent, including followup intents.

Project ID Map or select the project that contains the intent you want to delete.
Intent ID Map or select the intent you want to delete.

Other

Make an API Call

Allows you to perform a custom API call.

URL

Enter a path relative to https://dialogflow.googleapis.com. For example: /v2/projects/{project_id}/agent.

For the list of available endpoints, refer to the Dialogflow ES API Documentation.

Method

Select the HTTP method you want to use:

GET

to retrieve information for an entry.

POST

to create a new entry.

PUT

to update/replace an existing entry.

PATCH

to make a partial entry update.

DELETE

to delete an entry.

Headers

Enter the desired request headers. You don't have to add authorization headers; we have already done that for you.

Query String

Enter the request query string.

Body

Enter the body content for your API call.

Example of Use - List Entity Types

The following API call returns all entity types for the specified project in your Dialogflow ES account:

URL:

/v2/projects/{project_ID}/agent/entityTypes

Method:

GET

61f26ee587648.png

The result can be found in the module's Output under Bundle > Body > entityTypes.

In our example, two entity types were returned:

61f26ee69c4d5.png