---
id: guides-send-vercel-webhooks-to-tinybird
title: Send Sentry Webhooks to Tinybird
meta:
    description: Learn how to send Sentry events to Tinybird using webhooks and the Events API.
---

# Send Sentry events to Tinybird

[Sentry](https://sentry.io) is a platform for monitoring and alerting on errors in your applications. By integrating Sentry with Tinybird, you can analyze your Sentry events in real time and enrich it with other data sources.

Some common use cases for sending Sentry events to Tinybird include:

1. Analyze errors from your applications.
2. Detect patterns in your error data.
3. Build an alert system based on error patterns.
4. Build custom analytical dashboards.

Read on to learn how to send logs from Sentry to Tinybird.

## Before you start

Before you connect Sentry to Tinybird, ensure:

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

## Connect Sentry to Tinybird

1. In Sentry, go to  **Settings** > **Developer Settings** > **Custom Integrations**.
   
2. Select **Create New Integration**.

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

```tb {% title = 'Data Source schema for Sentry webhooks %}
SCHEMA >
  `event_time` DateTime `json:$.tinybirdIngestTime` DEFAULT now(),
  `event_type` String `json:$.action` 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 Sentry 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 Sentry, paste the Events API URL in your Custom Integration. Use the query parameter `name` to match the name of the data source you created in Tinybird.

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

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

6. Select **Alert Rule Action**.

7. In the **Permissions** box **Issue and Event** > **Read**.

8. Check all webhooks and **Save Changes**.

9. If you also want to send alerts to Tinybird, select **Alerts** from the left menu, click on an alert and select **Edit Rule**. You can select **Send Notifications via** your previously created Custom Integration.

10. You can then select **Send Test Notification** to check the connection.

11. You're done. Any of the Sentry events you selected are automatically sent to Tinybird through the [Events API](../events-api).

Check the status of the integration from the **Log** tab in the Tinybird `sentry` data source. 
    
## See also

* [Sentry Webhooks](https://docs.sentry.io/organization/integrations/integration-platform/webhooks/)
