Vonage AI Studio
  • Welcome to AI Studio!
  • ✨Platform Updates
  • AI Studio
    • Create a new agent
    • NLU AI Engine - Traditional vs Hybrid
    • Agent Building Features
    • Agent Templates
      • Take Message
      • Updating Details
      • Survey
      • FAQ
      • Package Tracking
      • Caller Identification
      • Customer Service
      • Hotels
      • Appointment Management
    • Tester
    • Editor Mode & Publish
    • Reports
    • Users
    • Knowledge AI
  • Properties
    • Entities
      • System Entities List
      • Best Practices
    • Intents
      • How do we analyze user input?
      • Generate Training Data
      • System Intents
      • Intent Annotation
    • Parameters
    • Contacts
    • Tags
    • Recordings
  • Voice
    • Get started
      • Create your first conversational flow!
      • Triggering Outbound Call API
      • Sending an Outbound Call Request via Postman
      • Integration via SIP for Telephony Agents
    • Nodes
      • Start node
      • Conversation
        • Classification
          • Intent Ambiguity
        • Collect Input
          • Entity Ambiguation
        • Speak
        • Conditions
        • Listen
        • Q&A Node
      • Advanced
        • Reset Counter
        • Counter
        • Set Parameter
        • Custom Code
        • NCCO Node
      • Actions
        • Send Email
        • Call Routing
        • End Call
        • Start Recording
        • Stop Recording
        • Send SMS
      • Integrations
        • Webhook
        • Legacy SalesForce Authentication Node
          • SalesForce Authentication
            • How to create a SalesForce Connected App
        • SalesForce Actions
        • Generative AI
          • Setting up Generative AI Node Integration
          • Migrating from the GenAI node to Knowledge AI
      • Flow Control
        • Context Switch
        • Flows
    • Events
  • WhatsApp
    • Get started
      • Create your first conversational flow!
      • Triggering an outbound WhatsApp virtual agent
    • Nodes
      • Start node
      • Conversation
        • Collect Input
          • Entity Ambiguation
        • Classification
          • Intent Ambiguity
        • Send Message
        • Conditions
      • Advanced
        • Reset Counter
        • Counter
        • Set Parameter
        • Custom Code
      • Actions
        • Send Email
        • End Conversation
        • Send SMS
        • Live Agent Routing
      • Integrations
        • Webhook
        • Legacy SalesForce Authentication Node
          • SalesForce Authentication
            • How to create a SalesForce Connected App
        • SalesForce Actions
        • Generative AI
          • Setting up Generative AI Node Integration
          • Endless FAQs on WhatsApp With Generative AI and AI Studio
      • Flow Control
        • Context Switch
        • Flows
    • Events
  • SMS
    • Get started
      • Create your first conversational flow!
      • Triggering an outbound SMS Virtual Agent
    • Nodes
      • Start node
      • Conversation
        • Classification
          • Intent Ambiguity
        • Conditions
        • Send Message
        • Collect Input
          • Entity Ambiguation
      • Advanced
        • Reset Counter
        • Counter
        • Set Parameter
        • Custom Code
      • Actions
        • Send Email
        • End Conversation
        • Send SMS
        • Live Agent Routing
      • Integrations
        • Webhook
        • Legacy SalesForce Authentication Node
          • SalesForce Authentication
            • How to create a SalesForce Connected App
        • SalesForce Actions
        • Generative AI
          • Setting up Generative AI Node Integration
          • Use Case Example: Gym Business
      • Flow Control
        • Context Switch
        • Flows
    • Events
  • HTTP
    • Get started
      • Create your first conversational flow!
    • Nodes
      • Start node
      • Conversation
        • Classification
          • Intent Ambiguity
        • Collect Input
          • Entity Ambiguation
        • Send Message
        • Conditions
      • Advanced
        • Reset Counter
        • Counter
        • Set Parameter
        • Custom Code
      • Action
        • Send Email
        • Send SMS
        • Live Agent Routing
          • Websockets connections for Live agent Routing
      • Integrations
        • Webhook
        • Legacy SalesForce Authentication Node
          • SalesForce Authentication
            • How to create a SalesForce Connected App
        • SalesForce Actions
        • Generative AI
          • Setting up Generative AI Node Integration
          • Use case Example : Online Shopping
      • Flow Control
        • Context Switch
        • Flows
    • Events
  • API Integration
    • Authentication
    • Insights
  • There's more
    • FAQs
    • Languages Available
Powered by GitBook
On this page
  • How to use the Webhook Node
  • Headers
  • Body
  • Query Parameters
  • Response Mapping
  • Asynchronous Requests
  • Managing Timeout
  • How to test the webhook node
  • Webhook Signing
  • Response Status Code

Was this helpful?

  1. Voice
  2. Nodes
  3. Integrations

Webhook

PreviousIntegrationsNextLegacy SalesForce Authentication Node

Last updated 4 months ago

Was this helpful?

This node enables you to seamlessly send and request data to and from third-party services.

You can click on the Webhook node and enter the name of the Webhook in the label field. This is not mandatory, but if you enter a label here, it should be something referring to the flow explaining what the API request is trying to achieve.

"Failed" - In case there's an issue with the API request you are trying to send, e.g. the request didn't go through or the agent is waiting for a response for longer than 5 seconds or you didn't receive the correct parameters, you can use the "Failed" tab for error tracking. Simply decide on the behaviour you'd like to happen in such a case.

How to use the Webhook Node

There are a few different ways to send an API request

  • GET - Retrieve some data from the external codebase

  • POST - Create some data for the external codebase

  • PUT - Update some data to the external codebase

  • DELETE - Delete data at the external codebase

  • PATCH - Apply partial modifications to data at an external codebase

Headers

Some third-party services might require you to add HTTP headers (HyperText Transfer Protocol) to the request. This is a data transmission standard that defines how servers and browsers send and interpret data. Additional information is transferred along with the HTTP request for purposes such as authorization and identification.

Use Asynchronous Requests if you want the execution of the code not to be blocked regardless of the response.

Body

Insert your JSON, HTML, text, X-WWW-FORM-URLENCODED, or XML file here if your request requires it. These code formats are commonly used to send information back and forth.

Not all API Requests will require a body. It is usually only relevant if you’d like to pass more parameters along, other than the query parameter in the Request Mapping.

Query Parameters

In the Query Parameters section, enter the parameters you would like to send in your query.

You can either keep the value empty and have the caller fill it during the conversation or you can add the value if you want to predefine it. Use $PARAM_NAME if you want to either take the value from the parameters that you pre-populated in the parameter section or if you want the user to fill the parameter during the conversation

Response Mapping

Response Mapping defines the way you receive the third party’s response.

Define the Object Path and the right parameter you’d like to store the value in. We support XML as well as JSON as part of the response mapping.

The studio supports two response mapping types, xml and json.

> Example of xml

<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>

To get for example, the Tove(note.to)value from the xml response, the value of the object path needs to be "note.to" or note['to']

> Example of json

{
  "data": {
   "userId":1,
   "id":2,
   "completed":false
  }
}

To get for example the 1 (data.userId) value from the json response, the value of the object path needs to be "data.userId" or data['userId']

> Arrays

[
  {
    "userId": 1,
    "completed": false
  },
  {
    "userId": 2,
    "completed": false
  }
]

To get 1, for example, the (first item userId property) value from the json response, the value of the object path needs to be "$[0].userId" or $[0]['userId']

Asynchronous Requests

Need your webhook to run in the background whilst the rest of your flow continues? Simple, toggle the asynchronous request within your webhook to allow the flow to proceed without depending on the node.

Managing Timeout

Now you have the ability to set the webhook time out to any amount of time between 10 to 25 seconds. As per default, the slider will be set to 10 seconds for each webhook node.

How to test the webhook node

Once you have added all your request information, you can test if the webhook node is being executed correctly, by clicking on Test Request on the top right of the node settings.

In case your service requires whitelisting of our IPs, please use the following:

For EU-based agents Frankfurt: 18.198.250.71 18.156.30.186 18.195.173.181

For US-based agents

Virginia: 54.90.42.141 54.88.7.65 52.44.45.61

Webhook Signing

Webhook signing is a feature that allows your integrated application to verify that the request has been sent from Vonage and has not been tampered with in transit.

Whilst receiving a request, the Webhook will include a JWT token in the authorization header which is signed with your signature secret (which can be found under signed Webhooks in the API settings on the Nexmo dashboard).

How to enable Webhook signing

Webhook signing is enabled by default for voice agents built after June 2022. If your agent was built before this time period, follow the process listed below:-

  • Log into your dashboard

  • Go to the application settings

  • Select the appropriate application

  • Select “Edit”

  • Scroll down to “Capabilities”

  • Under the Voice capability select “Show Advanced Features”

  • Select the “Use signed Webhooks” checkbox.

How does the Webhook signing work?

On the Vonage AI side, there is one part to the process - Validating the request to ensure that no tampering has occurred.

Validation of Requests

To verify the request, Webhook signing involves a JWT token in the authorization header. In order to identify which signature secret has been used to sign the request, check the API key which is included in the JWT claims.

Response Status Code

You can now decide to change the course of your conversation based on the status of your Webhook! You can specify individual codes or code classes (e.g. 3xx to refer to codes from 300 to 399) to decide the turn of the conversation in each scenario.

Here's how to go about it:

The Response status code section is available within the Webhook node drawer.

The default output takes into account all successful 2xx responses (status code 200 to 299).

You can specify either:-

  • Individual codes: E.g. 301, 500, 400, etc.

  • Code Classes: E.g. 4xx (which would mean all codes from 400 to 499), 5xx (all codes from 500 to 599), etc.

You can also save the resulting status code in a parameter for further use.

Please make sure to create a parameter with the sys.any or sys.number entity type to save the response code.

To learn more about decoding Webhook signing, please visit .

this page