Webhook Actions

As described in the actions section, Bavard chatbots play one or more actions at each turn of a conversation. Webhook actions essentially allow developers to implement completely custom actions for their chatbots, including actions that integrate with other systems. Typical examples of webhook actions are actions for checking the weather, getting a stock quote, or looking up data in a private database.

  1. How it Works

    A webhook action is defined simply by a URL endpoint and a secret string value. When your bot plays the action, it will send an HTTP POST request to the URL  you provided along with a header containing the secret value include the entire conversation history and state. The endpoint server is expected to return one or more valid response actions. The webhook action itself is silent, meaning it is not shown to the end user, however the responses returned from the webhook endpoint are displayed.

  2. Creating a Webhook Action Server in Node.js

    You can find a demo of implementing a Bavard webhook action server in Node.js here.