> For the complete documentation index, see [llms.txt](https://humanic.gitbook.io/humanic/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://humanic.gitbook.io/humanic/getting-started-with-humanic/connecting-your-data/connect-using-rudderstack.md).

# Connect using RudderStack

Stream RudderStack events into Humanic over a webhook.

RudderStack can forward identify / track / page events to Humanic. Humanic creates or updates contacts from traits and can trigger campaigns from the event name.

***

### Get your webhook URL

1. In Humanic, go to **Integrations → RudderStack**
2. Connect and copy the webhook URL

It looks like:

```
https://prod.humanic.ai/api/webhooks/rudderstack/[token]
```

Keep this URL private. Disconnecting in Humanic rotates the token and invalidates the old URL.

***

### Point RudderStack at Humanic

In RudderStack, add an **HTTP** (webhook) destination and paste the Humanic URL. Send `track`, `identify`, and `page` events that include an email.

Humanic’s default mapping:

| RudderStack field      | Used as                                               |
| ---------------------- | ----------------------------------------------------- |
| `userId`               | User id (anonymous ids are ignored)                   |
| `context.traits.email` | Contact email                                         |
| `context.traits.name`  | Contact name                                          |
| `context.traits`       | Contact data                                          |
| `event`                | Event name (`identify` / `page` for those call types) |
| `properties`           | Event data                                            |
| `messageId`            | Dedup id                                              |
| `timestamp`            | Event time                                            |

Email must be present on `context.traits.email` (or whatever path you map in Humanic). Without it, Humanic cannot send to that user.

***

### Test

Send a test event from RudderStack, then confirm it in **Integrations → RudderStack**. After that, set a campaign trigger to the same event name you send.
