> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tuqui.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an app to the webhook

> What to set in an agent's webhook so an app can fire it: the secret, the signature header and what is signed.

An agent's webhook takes events from any app that signs its requests. Every request must prove the app holds the webhook's secret: if it doesn't, the agent doesn't run.

In the webhook's settings, under **Configure**, you set three things that come from the app's documentation:

* **Secret**: some apps generate it and don't let you choose it (Slack, Stripe); paste it in **The app's secret**. Others let you choose it (GitHub): click **Generate** and copy it into the app.
* **Signature header**: the header where the app sends the signature.
* **What is signed**: the text the app computes the signature from.

Then click **Save**: it saves the secret and both fields together.

In **What is signed**, `{body}` is the request body as it arrives, `{header:name}` is that header's value and `{hora:name}` is the time the app sends in that header. With `{hora:…}`, a request older than 5 minutes is refused. If the time comes inside another header, as in Stripe, write `{hora:name.t}`.

## Values for each app

| App | Signature header | What is signed | The secret |
| - | - | - | - |
| Standard Webhooks (default) | `webhook-signature` | `{header:webhook-id}.{hora:webhook-timestamp}.{body}` | Generated by Tuqui or by the app |
| Slack | `x-slack-signature` | `v0:{hora:x-slack-request-timestamp}:{body}` | The app's **Signing Secret**, in **Basic Information** |
| GitHub | `x-hub-signature-256` | `{body}` | Generate it in Tuqui and paste it in the webhook's **Secret** |
| Stripe | `stripe-signature` | `{hora:stripe-signature.t}.{body}` | The endpoint's **Signing secret** (`whsec_…`) |
| Shopify | `x-shopify-hmac-sha256` | `{body}` | The key Shopify signs its webhooks with |
| Telegram | `x-telegram-bot-api-secret-token` | empty | Generate it in Tuqui and pass it as `secret_token` when you create the webhook |

With **What is signed** empty, the app sends the secret itself in the header, a token. It proves who sends the request but doesn't protect the body: use it only with apps that don't sign.

## Test the setup

Send a test event from the app and click **Try with the last request**. Tuqui shows what arrived and what happened at each step: the header, the time and the signature. You can change the secret and both fields and try again before you save.

A request without the signature header gets an answer and doesn't fire the agent. That is how apps that test the URL before they sign accept it.

## What the agent does with the event

The agent gets the request body, up to 128 KB, as data and not as instructions. What it does with it is up to its instructions.

* If the app sends the same event again, Tuqui recognizes it by the body and the headers in **What is signed**, and doesn't run twice. With a token, or with **What is signed** set to `{body}` alone, two equal bodies within 24 hours run once.
* If the body carries nothing but `challenge`, `type` and `token`, as when Slack verifies the URL, Tuqui sends back the value of `challenge` and the agent doesn't run.
* Odoo doesn't come in through the webhook: it fires agents with the **Odoo action**. See [Agents](https://docs.tuqui.com/en/agents.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.