# Custom Web Hooks

To create a webhook, you need to provide various information to successfully send data to an external service.

There are various device values that can be specified within your webhook using a special variable syntax that will be replaced by actual values during execution of the webhook.\
These variables can be included in the Payload or Parameter values of the webhook.

| **Variable**         | **Description**                                                                                                                                          | **Pill** | **Fermentation Chamber** | **Temperature Controller** | **BrewZilla** |
| -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------ | -------------------------- | ------------- |
| @device\_id          | The unique identifier for the Rapt device                                                                                                                | Yes      | Yes                      | Yes                        | Yes           |
| @device\_type        | <p>A string representing the type of device:</p><ul><li>Hydrometer</li><li>FermentationChamber</li><li>TemperatureController</li><li>BrewZilla</li></ul> | Yes      | Yes                      | Yes                        | Yes           |
| @device\_name        | The user specified name of the device                                                                                                                    | Yes      | Yes                      | Yes                        | Yes           |
| @temperature         | The current temperature of the device in celcius                                                                                                         | Yes      | Yes                      | Yes                        | Yes           |
| @target\_temperature | The target temperature of the device in celcius                                                                                                          | No       | Yes                      | Yes                        | Yes           |
| @gravity             | The current actual gravity of the device in Standard Gravity                                                                                             | Yes      | No                       | No                         | No            |
| @battery             | The current battery percentage                                                                                                                           | Yes      | No                       | No                         | No            |
| @rssi                | The signal strength of the device                                                                                                                        | Yes      | Yes                      | Yes                        | Yes           |
| @created\_date       | The time and date the telemetry record was created                                                                                                       | Yes      | Yes                      | Yes                        | Yes           |

**Name**\
You need to specify a name for your webhook so you can easily identify it.

**Url**\
This is the address to the external service you want to submit data to.  It should be a fully qualified url without the query string portion - e.g. <http://log.brewfather.net/stream>

**Method**\
The Http Method used to submit the data must be specified.  You can chose between POST & GET.

**Payload**\
If you are using the "POST" method, you need to provide a JSON payload that will be sent as part of the request body to the external service.

**Parameters**\
Parameters can be included in your webhook.  There are two types of parameters (Header & Query String).\
Each parameter has a key and value.

**Devices**\
The devices tab shows a list of your devices.  You can select which devices will utilise the webhook.  Different device types will require different payloads for submitting data so they should be split aross different webhooks.

**Logs**\
The Logs tab shows you a list of each attempt to execute the webhook.  If you are not receiving the data on your external service, you can find troubleshooting information from within the logs.


---

# 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.rapt.io/integrations/web-hooks/custom-web-hooks.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.
