# Webhook

Webhooks are user-defined HTTP callbacks. Webhooks allow you to build or set up integrations. They are usually triggered by some event, when that event occurs, the source app makes an HTTP request to the URI configured for the webhook.

![Webhook Setting - webHookReply](/files/3C4dhL12agUhQDLFz2Q4)

A detailed description of the webhook setting can be seen in the table below:

| Field Name          | Description                                                          |
| ------------------- | -------------------------------------------------------------------- |
| Name                | The node id of workflow component.                                   |
| Webhook Path        | Path of the webhook                                                  |
| White List          | IP or hostname can access to the webhook (e.g 10.1\*\*\*domain.com). |
| URL                 | This field will be filled automatically.                             |
| Response Expression | To simulate the results of the body.                                 |
| Add                 | Button to add node id in workflow process.                           |

### **Setting Webhook URLs**

The URL on this webhook is the default and will be filled automatically when you create a workflow process and add webhook components.

![](/files/zFvPQmQ1tCM1qSKbyFBV)

**Description of URLs:**

* {URL}: Used to pass information to the destination.
* {Path}: Location of data on the server
* {workflow\_id} : ID that is automatically created when creating a workflow process.
* WF : Code from workflow process (default)
* {node\_id} : ID obtained from the field name.&#x20;
* {webhook\_path} : The keywords entered in the webhook path field (e.g whAddGitlabIssue).

{% hint style="info" %}
{node\_id} and {webhook\_path} will automatically be created when adding a node in the workflow process. When a node has not been added, {node\_id} and {webhook\_path} are {empty}.
{% endhint %}

### **Using Dynamic Variable in Response Expression**

In the *WebHookReply Workflow*, we take the example of the 'webHookReply' process. This process is to provide a feedback response to requests sent, this response is in the form of an 'output' object whose value is ${mvelReply.response}. This ${mvelReply.response} variable is to contain the response id of the 'webHookReply' process.

![Webhook Setting - webHookReply](/files/3C4dhL12agUhQDLFz2Q4)

To display the response of dialog, you can use the value of success using ${wf.success} variable. ${wf.success} variable serves to define workflow process is true or false. For example, if we set the value of success using $ {wf.success}, when the workflow process starts and in the middle of the process an error occurs, the value success will automatically define that the process is false.

A detailed description of the response expression can be seen in the table below:

| Field Name | Description                                                                                                                                                                                                                                               |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Value      | The value of output                                                                                                                                                                                                                                       |
| Output     | Response output from MVEL function                                                                                                                                                                                                                        |
| Success    | <p>To display the response of dialog.</p><ul><li>If success : true, will display a success response.</li><li>If success : false, will display a fail response.</li><li>If success : ${wf.success}, to define workflow process is true or false.</li></ul> |
| Agent      | <ul><li>If Agent : True. A dialog will direct to agent,</li><li>if Agent : False. A dialog will direct to Bot.</li></ul>                                                                                                                                  |
| Next       | <ul><li>If Next : True. will direct to next entity.</li><li>If Next : false. will not direct to next entity.</li></ul>                                                                                                                                    |
| Repeat     | To repeat of dialog.                                                                                                                                                                                                                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.3dolphins.ai/bot-settings/process-flow/component-of-workflow/webhook.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
