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

# Connect any service

> Connect an assistant to Make, Zapier, Lovable or any HTTPS URL with a Klatt webhook, to read data during a conversation or to be notified when it ends.

A Klatt [webhook](https://docs.klatt.ai/voice-agent/webhooks.md) calls a URL of another tool. How you use it depends on what the tool can answer:

* **During the conversation**: the assistant asks the tool for data, for example the status of an order. The tool must answer with the data in the same request.
* **At the end**: Klatt tells the tool that the conversation ended, with its summary. Klatt only needs a `2xx` status back.

| Tool | During the conversation | At the end |
| - | - | - |
| [Make](#make) | Yes, with a **Webhook response** module | Yes |
| [Zapier](#zapier) | No: the answer cannot be customized | Yes |
| [Lovable](#lovable) | Yes, with a backend function | Yes |
| [Any HTTPS URL](#any-https-url) | Yes, if it answers with JSON | Yes |

## How the key works

The key is a secret that proves the request comes from Klatt. It has two sides:

1. **Klatt** sends it. In the webhook, under **Authentication**, choose **Custom header**, give the header a name and select **Generate key**. Copy the key: it is shown once.
2. **The other tool** checks it. Paste the same key there, and reject any request that does not carry it.

Never put the key in the URL or in a plain header. If you use an AI assistant, never give it the key.

## With your AI assistant

You can ask an assistant connected to [Klatt's MCP](https://docs.klatt.ai/api-reference/mcp.md) to create the webhook for you. For example:

> Connect my Make scenario at `<webhook URL>` to my Klatt assistant `<assistant>`, to look up an order by its number, with a custom header credential and no key.

The assistant creates the webhook without the key, and gives you a link to the console.

1. Open the link, select **Generate key** in **Authentication**, and copy the key.
2. Paste the key in the other tool, as described in its section below.
3. Select **Activate** on the webhook. A webhook created by an assistant that sends a request no activated webhook of your organization sends yet stays on hold until you activate it, so a text the assistant read cannot send your data somewhere new. See [MCP](https://docs.klatt.ai/api-reference/mcp.md).

Never give the key to the assistant, in the chat or anywhere else.

## Make

Make calls the incoming request a custom webhook. The steps follow [Make's Webhooks app documentation](https://apps.make.com/gateway).

1. In Make, create a scenario and add the **Webhooks > Custom webhook** module. Next to **Webhook**, select **Add**, enter a name and select **Save**. Make shows the webhook's URL: copy it.
2. In the webhook's settings, add an **API key**. Make reads the key from the `x-make-apikey` header. Paste there the key that Klatt generated.
3. In Klatt, add the webhook with **URL** set to Make's URL. Under **Authentication**, choose **Custom header**, set the header name to `x-make-apikey` and generate the key.
4. Select **Test request** in Klatt, then check in Make that the module received the data.

### During the conversation

Without more, Make answers every request with `Accepted` and the assistant gets no data. To answer with data, end the scenario with a **Webhook response** module:

* **Status**: `200`.
* **Body**: a small JSON object with only the fields the assistant needs, for example `{"status": "shipped"}`.
* **Custom headers**: `Content-Type` with the value `application/json`.

Make waits up to 180 seconds to send a response, and sends `200 Accepted` if none is ready. Klatt waits at most 30 seconds, so keep the scenario short. The scenario must run as soon as the data arrives: a scheduled scenario does not send the custom response.

In Klatt, set **When it runs** to **During the conversation**, put what the assistant asks for in the URL query as `{{name}}`, and describe when the assistant should use it. See [Webhooks](https://docs.klatt.ai/voice-agent/webhooks.md#during-the-conversation).

### At the end

Add the webhook in Klatt with **When it runs** set to **At the end** and the default `POST` body. Make's default `Accepted` answer is what Klatt needs. Use the `Idempotency-Key` header to skip a delivery you already processed, because delivery is at least once.

## Zapier

Zapier receives requests with **Webhooks by Zapier**. The steps follow [Zapier's guide](https://help.zapier.com/hc/en-us/articles/8496288690317-Trigger-Zaps-from-webhooks).

1. In Zapier, create a Zap. As the trigger, choose **Webhooks by Zapier** and, as the event, **Catch Hook**. Select **Continue**.
2. On the **Test** tab, copy the webhook URL.
3. In Klatt, add a webhook with **When it runs** set to **At the end**, **Method** `POST`, and the Zapier URL.
4. Select **Test request** in Klatt, then find the request in Zapier's test. Build the rest of the Zap with the fields it received.

Things to know:

* **A paid plan is needed**: Zapier's guide shows webhooks as unavailable on the Free plan.
* **Zapier is for notifications**: a Catch Hook answers `200`, and Zapier says this response cannot be customized. The assistant cannot read data from a Zap during the conversation, so use [Make](#make), [Lovable](#lovable) or another URL for lookups.
* **No key check**: Zapier's guide does not describe checking a key on incoming requests, so Klatt's key cannot be verified in the Zap. Keep the URL private, and send only the fields the Zap needs: the summary and the number are personal data.

## Lovable

Lovable's built-in backend includes edge functions, which Lovable describes as server-side code for things such as webhooks. See [Lovable's backend documentation](https://docs.lovable.dev/features/cloud). A function that answers Klatt is therefore an edge function, and the Klatt side is the same as for Supabase.

* **During the conversation**: follow [Connect Supabase](https://docs.klatt.ai/integrations/supabase.md#function-mode-with-lovable). It explains how to get the function's address, how to generate the key and how to tell Lovable to check it, and has a message that creates the function.
* **At the end**: use the receiver prompt in [Webhooks](https://docs.klatt.ai/voice-agent/webhooks.md#receiving-the-request). It asks Lovable to build an endpoint that checks a bearer token and stores each conversation. Then choose **Bearer token** in Klatt's **Authentication** and paste the same secret.

Lovable asks for secret values in a secure field and stores them as secrets. Paste the key there, never in the chat message.

## Any HTTPS URL

Any server can answer a Klatt webhook if it:

* Uses an address that starts with `https://`, on port 443 and public. Klatt does not follow redirects.
* Reads JSON, and for lookups answers with a JSON object that has only the fields the assistant needs. Klatt reads up to 512 KB of the response, and the assistant about the first 16,000 characters.
* Answers within the **Maximum wait**: up to 30 seconds (5 at the start).
* Checks the key. Klatt sends it in the header you chose under **Custom header**, or as a bearer token, API key or username and password. Reject any request whose key is missing or different, comparing it in constant time.
* For webhooks at the end, answers `2xx` quickly and uses `Idempotency-Key` to process each delivery once.

To test it, select **Test request** in Klatt. The result shows the status and the data your server returned, and the request carries `X-Klatt-Test: 1`. If it fails, see the messages in [Test the request](https://docs.klatt.ai/voice-agent/webhooks.md#test-the-request).

A request that changes data during a call needs caller verification. See [Safety](https://docs.klatt.ai/voice-agent/webhooks.md#safety).


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