Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Dialogflow CX webhook is an HTTPS backend that handles a conversational turn when an agent reaches a webhook-enabled fulfillment. Dialogflow sends it a JSON request; your service runs the required business logic and returns a response the agent can use for messages, session state, or a page or flow transition. To build one, connect a webhook resource to a fulfillment, handle the request contract you choose, and make the endpoint secure, fast, and safe to retry.

How a Dialogflow CX webhook works

During a conversation, the integration sends a detect-intent request. If the matched flow or page reaches a fulfillment configured to call a webhook, Dialogflow CX sends an HTTPS POST request to your service. The service can query a database or call another API, then returns a webhook response. Dialogflow incorporates that response into the detect-intent response delivered to the interface.

Google documents encryption in transit and ALTS for internal Google communications. Your webhook is still a service you operate: it must accept the configured authentication, validate and process requests, and return a response in the required time.

Choose standard or flexible webhooks

Option Contract Best fit Trade-off
Standard Dialogflow-defined request and response messages, with conversational context such as the active page, matched intent, session parameters, language, and fulfillment information. A handler that needs rich CX context or returns standard CX response features. Your service must handle the standard contract, even if it uses only some of the available context.
Flexible You define the HTTP method, URL parameter references, request JSON fields, and response field mappings in the webhook resource. A small, stable interface where limiting the exchanged data helps reduce implementation complexity or exposure. The narrower contract may not carry the full conversational context a standard webhook provides.

Choose based on what the backend actually needs. Standard is generally the more direct fit when behavior depends on page, intent, or session context. Flexible is useful when the backend should receive only a deliberately selected set of fields. Keep the chosen contract consistent between the webhook resource and handler.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Connect the webhook to a fulfillment

  1. Deploy an HTTPS endpoint. Use a runtime and hosting service that can accept the configured request and return JSON. Cloud Functions is Google’s documented quickstart path; Cloud Run is a managed option for containerized handlers and service-agent authentication.
  2. Create or configure the webhook resource. Set the service URL, select standard or flexible behavior, choose an appropriate timeout, and configure authentication. Use separate URLs and authentication settings for development and production.
  3. Configure fulfillment to call that resource. Attach the webhook to the relevant page or flow fulfillment and assign a meaningful tag. The tag is sent as fulfillmentInfo.tag and can be used to dispatch to the correct handler logic.
  4. Test the complete turn. Verify that the fulfillment invokes the expected URL, the handler receives the expected request contract, and Dialogflow uses the returned response as intended.

Read and dispatch the request

A standard WebhookRequest is JSON. Its documented fields use camel case and include fulfillmentInfo.tag, intentInfo, pageInfo, and sessionInfo. Use the tag to select the operation, and read conversational state from the documented session or page structures relevant to that operation. Validate fields before relying on them: a request may not contain a value your handler expects in every conversational path.

Google notes that undocumented internal fields can appear in requests. Ignore them rather than building behavior around fields that are not part of the supported contract.

A practical handler sequence

  1. Parse the JSON body and reject malformed input with a controlled failure.
  2. Read the fulfillment tag and route only recognized tag values to business logic.
  3. Validate the required parameters and their types before calling a backend.
  4. Call databases or external services with bounded timeouts so downstream work cannot consume the entire webhook budget.
  5. Build a response using the contract configured for the webhook and return JSON.

Keep business logic separate from HTTP parsing and response formatting. This makes it easier to test tag dispatch and backend behavior without depending on a live conversational turn.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Design the webhook response

A standard response can set sessionInfo.parameters, return messages in fulfillmentResponse.messages, provide pageInfo for parameter or page status, attach integration-specific payload data, or request a transition using targetPage or targetFlow. A response cannot set both a target page and a target flow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Google’s implementation guidance recommends setting session parameters so the agent’s fulfillment can consistently control dynamic responses. Use response messages when the webhook needs to return text or other supported fulfillment content directly; set session state when the agent should use returned values in its own logic.

For example, a minimal standard response expressed in the REST contract’s camel-case JSON uses this shape:

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
{
  "fulfillmentResponse": {
    "messages": [
      {
        "text": {
          "text": ["Your order is ready for pickup."]
        }
      }
    ]
  }
}

Implementation samples may show runtime-specific representations with different field casing. Follow the contract for the runtime and API version you are using; do not copy a sample’s casing without checking that it matches the endpoint’s expected JSON.

Handle timeouts, retries, and side effects

The webhook response must arrive within the timeout configured on the webhook resource and must be 64 KiB or smaller. Dialogflow retries once after a timeout or transient failure. If the retry also times out, the documented timeout event is raised.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Choose a timeout that accounts for the slowest necessary dependency, while keeping backend calls individually bounded.
  • Make writes idempotent. A retried request should not create a duplicate payment, booking, or other side effect.
  • Where possible, use a request or transaction identifier to detect and deduplicate repeated work.
  • Return a controlled response for downstream failures rather than allowing an unhandled exception or an indefinite wait.
  • Keep responses compact and check their serialized size against the 64 KiB limit.

Secure the endpoint and its credentials

Dialogflow CX webhook resources support authorization headers, basic authentication, third-party OAuth client credentials, service accounts, service-agent ID tokens, and mutual TLS (mTLS). Use HTTPS and select the strongest option compatible with the deployment and integration.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Cloud Run and Cloud Functions access

For a Cloud Run service in the same Google Cloud project, Google documents using Service Agent Auth with an ID token. For a service in another project, grant the Dialogflow Service Agent the appropriate Cloud Run or Cloud Functions Invoker role. Apply least privilege: the service agent should receive only the access needed to invoke the endpoint and retrieve any required secret.

Secrets, identity tokens, and mTLS

Store static credentials in Secret Manager rather than embedding them in source code or logging them. Grant the Dialogflow Service Agent only the required secret-access role. When using identity tokens, verify the token and its audience at the endpoint. With mTLS, validate Dialogflow’s client certificate and the bearer service identity token; checking both helps authenticate requests from the intended agent.

Do not treat source IP ranges as the primary identity check. Google cautions that the machines making requests are not guaranteed to remain within fixed ranges.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose a hosting and deployment approach

Cloud Functions provides a simple documented quickstart for a handler that reads JSON, applies logic, and returns JSON. Cloud Run is a managed alternative for containerized services and supports secure service-agent authentication. Another HTTPS service can also work if it meets the contract, authentication, latency, and response-size requirements.

Evaluate an implementation on the dimensions that affect its reliability and exposure:

  • Contract: whether standard context or a deliberately narrow flexible request is needed.
  • Hosting: whether a function, containerized service, or another HTTPS backend best fits deployment and operations.
  • Latency: whether the complete handler, including downstream calls, can finish within the configured timeout.
  • Security: whether authentication, IAM permissions, token checks, and secret storage are appropriate.
  • Operations: whether environments are isolated and logs provide enough status and latency information to diagnose failures.
  • Retries: whether side effects remain safe when a transient failure causes Dialogflow to retry.

Troubleshoot a webhook that fails or times out

  • The wrong handler branch runs: Confirm the fulfillment uses the intended webhook and inspect fulfillmentInfo.tag in the request.
  • Dialogflow rejects or ignores the response: Check that the body is valid JSON, matches the configured contract and expected field casing, and contains the response fields the agent expects.
  • The call times out: Compare end-to-end latency with the webhook’s configured timeout. Check slow downstream dependencies and set bounded timeouts for them.
  • A response is too large: Measure the serialized response and keep it at or below 64 KiB.
  • An action happens twice: Account for the single automatic retry and make writes idempotent, using an identifier to deduplicate side effects where possible.
  • Authentication fails: Check Cloud Run or Cloud Functions invoker permissions, the Dialogflow Service Agent identity, Secret Manager access, and the identity token audience.
  • Development works but production does not: Check environment-specific URLs and authentication settings before changing the production configuration.
  • An unfamiliar request field appears: Ignore undocumented internal fields unless Google documents a supported use for them.

For diagnosis, log request status, latency, and a correlation identifier. Do not log secrets or personal data that is not needed to troubleshoot the integration.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.