---
id: guides-send-resend-webhooks-to-tinybird
title: Send Resend webhooks to Tinybird
meta:
    description: In this guide you'll learn how to send data from Resend to Tinybird.
---

# Send Resend webhooks to Tinybird

With [Resend](https://resend.com/) you can send and receive emails programmatically. By integrating Resend with Tinybird, you can analyze your email data in real time.

Some common use cases for sending Resend webhooks to Tinybird include:

1. Tracking email opens and clicks.
2. Monitoring delivery rates and bounces.
3. Analyzing user engagement patterns.
4. Creating custom dashboards for email performance.
5. Enriching other data sources with real-time email metrics.

Read on to learn how to send data from Resend to Tinybird.

## Before you start

Before you connect Resend to Tinybird, ensure:

* You have a Resend account.
* You have a Tinybird workspace.

## Connect Resend to Tinybird

1. Open the Resend UI and go to the Webhooks page.
   
2. Select **Add Webhook**.

3. In your Tinybird project, create a data source called `resend`. You can follow this [schema](https://github.com/tinybirdco/tinynest/blob/main/tinybird/datasources/resend.datasource):

```tb {% title = 'Data Source schema for Resend events %}
SCHEMA >
  `event_time` DateTime `json:$.tinybirdIngestTime` DEFAULT now(),
  `event_type` String `json:$.type` DEFAULT 'unknown',
  `event` JSON `json:$` DEFAULT '{}'

ENGINE "MergeTree"
ENGINE_PARTITION_KEY "toYYYYMM(event_time)"
ENGINE_SORTING_KEY "event_time"
```

Using the [JSON Data Type](/sql-reference/data-types/json) you can store the semi-structured data you receive from Resend in a single column. You can later retrieve various events and their metadata as needed in your pipes.

{% callout type="caution" %}
The `JSON` data type is in private beta. If you are interested in using this type, contact Tinybird at <support@tinybird.co> or in the [Community Slack](/community).
{% /callout %}

4. From Tinybird Cloud, copy a token with privileges to append to the data source you created. You can use the admin token or create one with the required scope.

5. Back in Resend, paste the Events API URL in your Webhook URL. Use the query parameter `name` to match the name of the data source you created in Tinybird. For example: 

```
{% user("apiHost") %}/v0/events?name=resend&token={% user("userToken") %}
```

{% snippet title="api-region-reminder" /%}

7. Select the checkboxes for the Resend events you want to send to Tinybird, and select **Add**.

8. You're done. Sending emails to Resend will now push events to Tinybird via the [Events API](../events-api).
   
    
## See also

* [Resend event types](https://resend.com/docs/dashboard/webhooks/event-types)