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
-
A Google account
-
A project created in the Google API console
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.
-
Sign in to the Google API console using your Google credentials.
-
Click CREATE PROJECT.
-
Enter the desired project name, and click the CREATE button.
-
Go to APIs & Services > Dashboard. Click on the +ENABLE APIS AND SERVICES.
-
Type "Dialogflow API" in the Search for APIs & Services field.
-
The desired service option should display as you type. Click on the API/service you want to connect to Ibexa Connect.
-
Click the ENABLE button to enable the selected API.
-
Go to Credentials, and click CONFIGURE CONSENT SCREEN.
-
Choose the External option, and click the CREATE button.
Note
-
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.
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.
-
Go to Credentials. Click on the +CREATE CREDENTIALS, and select the OAuth Client ID option.
-
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
-
A dialog containing the app's Client ID and Client Secret is displayed. Save them to a safe place for later use.
-
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.
-
Sign in with your Google account.
-
The This app isn't verified window may appear.
Note
-
Click on the Advanced link, and then on the Go to Ibexa Connect (unsafe) link to allow access using your custom OAuth client.
-
Click Allow (2x) to grant Ibexa Connect permissions.
-
Click the Allow button to confirm your choices.
The connection to your Google Cloud Dialogflow account has been established.
-
Create an agent in your Dialogflow ES account, and select the project you are using to connect to Ibexa Connect.
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.
-
Add the Watch for Fulfillment module to your Ibexa Connect scenario.
-
Generate and copy the webhook URL.
-
Log in to your Google Cloud Dialogflow ES account.
-
Go to Fulfillment and enable webhooks.
-
Enter the webhook URL you have copied in step two to the URL field, and click Save.
-
Enable webhooks for the desired intent.
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.
Fulfillment Messages |
Add response messages. Select the messages to be presented to the user.
|
||||||||||||||||||||||||||||
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.
|
||||||||||||||||||||||||||||
Followup Event Input |
When the |
||||||||||||||||||||||||||||
Session Entity Types |
|
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.
|
||||
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.
|
||||||||
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.
|
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.
|
||
Priority |
Set the priority of this intent. Higher numbers represent higher priorities.
|
||
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 |
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.
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.
|
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 | 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
The result can be found in the module's Output under Bundle > Body > entityTypes.
In our example, two entity types were returned: