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

# n8n

> Receive TIKT's leads in an n8n workflow.

## 1. Create the webhook in n8n

1. In a new n8n workflow, add a **Webhook** trigger node.
2. Set **HTTP Method** to `POST`.
3. Copy the **Production URL**. (The test URL only answers while you listen for a test event in the editor.)
4. Save and activate the workflow, so the production URL answers.

## 2. Add the destination in TIKT

1. In TIKT, **Settings › Integrations › Add destination › n8n**.
2. Paste the address. The events checked by default are `lead.created`, `lead.engaged_again` and `lead.rescored`.
3. Under **More options**, choose **Batches of up to 100 events** if your workflow handles a list; keep **One request per event** otherwise.
4. **Create destination**, copy the signing secret, then **Send test**.

## 3. Read the events

The Webhook node outputs the request. The event is in `body`:

| Format | Where the events are |
| - | - |
| One request per event | `{{ $json.body }}` — for example `{{ $json.body.data.lead.person.full_name }}` |
| Batches | `{{ $json.body.data.events }}`: add a **Split Out** node on `body.data.events` to get one item per event |

To act on some events only, add an **If** or **Switch** node on `{{ $json.body.type }}` (or on the header `{{ $json.headers["x-tikt-event"] }}`).

## 4. Check where requests come from

Two options:

* **A header of your own.** In TIKT, under **More options › Headers**, add for example `Authorization` with a long random value. In the Webhook node, set **Authentication** to **Header Auth** with the same name and value. Requests without it are refused.
* **The signature.** In a **Code** node, verify `webhook-signature` as described in [Verify signatures](/webhooks/signatures).

## Only some leads

To send only the leads that match your filters — a score of 4 or more, a role — create a [workflow](/webhooks/workflows) on the Leads page with a **Send webhook** action to this destination: n8n receives `lead.matched` events, once per lead.


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