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 Integromat, 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.

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

Connecting Google Cloud Dialogflow to Integromat

To connect your Google Cloud Dialogflow account to Integromat 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.

explorer_FUq1bn6aKe.png

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

HG8JRfxSBy.gif

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

v5guGp4ArD.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 Integromat.

YNaTnwKqYe.gif

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

explorer_viF44jSUFf.png

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

RB70SY1bxu.gif

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

You will not be charged when selecting this option! For more details, please refer to Google's Exceptions to verification requirements.

DeMrvxUYqI.gif

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

Scopes for Google APIs

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

Add Dialogflow API scopes.

odgoY8ybtg.gif

The list of required scopes:

SERVICE/API

REQUIRED SCOPES

Dialogflow API
https://www.googleapis.com/auth/cloud-platform
https://www.googleapis.com/auth/dialogflow
Authorized domains integromat.com
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.

2020-07-16_09_52_55-Consent_screen_-_Google_OAuth_Client_-_Google_API_Console.png

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

Oop6Sakw7B.gif

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

Application type Web application
Name e.g. Integromat
Authorized redirect URIs

https://www.integromat.com/oauth/cb/google-custom

13. A dialog containing the app's Client ID and Client Secret is displayed. Save them to a safe place for later use.

explorer_tCReFOgixG.png

14. Go to Integromat, 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.

explorer_dMlWTTSZlx.png

15. Sign in with your Google account.

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

The app = your OAuth client you have created above.

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

ea6NlHi1Ix.gif

18. Click Allow (2x) to grant Integromat permissions.

CxZVG0ZqFZ.gif

19. Click the Allow button to confirm your choices.

explorer_T8fd8aO51X.png

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

20. Create an agent in your Dialogflow ES account, and select the project you are using to connect to Integromat.

Bb5yqZgHXD.gif

Fulfillment

Watch for Fulfillments

Triggers when an intent action is performed.

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

1. Add the Watch for Fulfillment module to your Integromat scenario.

2. Generate and copy the webhook URL.

PSBTw5sapq.gif

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

4. Go to Fulfillment and enable webhooks.

BWQEcEJT9O.gif

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

xSDBEaIHPt.gif

6. Enable webhooks for the desired intent.

iIG5hACp6V.gif

Now, every time an intent with fulfillment enabled is matched, the Watch for Fulfillment module in your Integromat 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.

chrome_P3dX8khHco.png

Connection Establish a connection to your Google Cloud Dialogflow ES.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
Project ID Select or map the project you want to retrieve details for.

Update an Agent

Updates an existing agent.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
Project ID Select the project of the agent you want to delete.

Context

Create a Context

Creates a new context in the specified session.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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 Integromat will return during one execution cycle.

Update a Context

Updates an existing context.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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 Integromat will return during one execution cycle.

Delete Entities

Deletes specified entities from the entity type.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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 Integromat will return during one execution cycle.

Update an Entity Type

Updates an existing entity type.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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 Configuration
    An audio config that instructs the speech recognizer on how to process the speech audio.
  • Text
    A conversational query in the form of text.
  • Event
    An 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.

Connection Establish a connection to your Dialogflow ES account.
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.

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

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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 Integromat will return during one execution cycle.

Update an Intent

Updates an intent in the specified project's agent.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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.

Connection Establish a connection to your Dialogflow ES account.
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

2020-09-30_21_59_47-Integration_Google_Cloud_Dialogflow___Integromat.png

The result can be found in the module's Output under Bundle > Body > entityTypes
In our example, two entity types were returned:

2020-09-30_22_00_42-Integration_Google_Cloud_Dialogflow___Integromat.png

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.