# Webhook

### Overview

The **Webhook Trigger Component** fires when an HTTP request is received on a dynamically generated webhook URL. It allows external services to send data to this webhook, which then triggers a workflow in response.

### Usage

#### Output Ports

| Port      | Description                                                                        |
| --------- | ---------------------------------------------------------------------------------- |
| `request` | Fires when an HTTP request is received. Contains method, data, query, and headers. |

#### Properties

| Property            | Type      | Description                                                                                                                   |
| ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `url`               | `string`  | The dynamically generated webhook URL.                                                                                        |
| `generateInspector` | `boolean` | If `true`, generates an inspector for configuration.                                                                          |
| `immediateResponse` | `boolean` | If `true`, sends an immediate response with received data. If `false`, use the **Response** component to customize responses. |

### Instructions

1. **Retrieve Webhook URL**
   * When the component is initialized, it generates a webhook URL.
   * Use this URL to receive HTTP requests from external sources.
2. **Configure Immediate Response**
   * Enable `immediateResponse` to automatically return the received data.
   * Disable `immediateResponse` to define a custom response later in the flow using the **Response** component.
3. **Process Incoming Requests**
   * When a request is received, it is sent to the `request` output port.
   * The data includes HTTP method, body, headers, and query parameters.

### Notes

* **Custom Responses:** If `immediateResponse` is `false`, ensure a **Response** component is added to handle replies.
* **Supports Any HTTP Method:** Webhooks can receive `GET`, `POST`, `PUT`, `DELETE`, or any other HTTP method.
* **Dynamic URL Generation:** Each instance generates a unique webhook URL.


---

# 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.appmixer.com/connector-configuration/utils/http/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.
