google_dialogflow_cx_webhook

Webhooks host the developer's business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow's natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.

To get more information about Webhook, see:

Open in Cloud Shell

Example Usage - Dialogflowcx Webhook Full

resource "google_dialogflow_cx_agent" "agent" {
  display_name = "dialogflowcx-agent"
  location = "global"
  default_language_code = "en"
  supported_language_codes = ["it","de","es"]
  time_zone = "America/New_York"
  description = "Example description."
  avatar_uri = "https://cloud.google.com/_static/images/cloud/icons/favicons/onecloud/super_cloud.png"
  enable_stackdriver_logging = true
  enable_spell_correction    = true
  speech_to_text_settings {
    enable_speech_adaptation = true
  }
}


resource "google_dialogflow_cx_webhook" "basic_webhook" {
  parent       = google_dialogflow_cx_agent.agent.id
  display_name = "MyFlow"
  generic_web_service {
        uri = "https://example.com"
    }
}

Argument Reference

The following arguments are supported:


The generic_web_service block supports:

The service_directory block supports:

The generic_web_service block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Webhook can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Webhook using one of the formats above. For example:

import {
  id = "{{parent}}/webhooks/{{name}}"
  to = google_dialogflow_cx_webhook.default
}

When using the terraform import command, Webhook can be imported using one of the formats above. For example:

$ terraform import google_dialogflow_cx_webhook.default {{parent}}/webhooks/{{name}}
$ terraform import google_dialogflow_cx_webhook.default {{parent}}/{{name}}