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

# How to Create a Slack Incoming Webhook

> Get a Slack incoming webhook URL so StarTree can post table-health alerts and Query Analyzer digests to a Slack channel.

In this recipe we'll create a Slack [incoming webhook](https://api.slack.com/messaging/webhooks): a URL that lets StarTree post messages to one Slack channel. You need one wherever the Data Portal asks for an **Incoming webhook URL**:

* [Table health alerts](https://docs.startree.ai/corecapabilities/observability/table-health-and-alerting.md#add-a-channel), when you add a Slack channel on the **Notifications** tab.
* [Query Analyzer's Proactive Analyzer](https://docs.startree.ai/corecapabilities/ai/query-analyzer/proactive-analyzer/overview.md), when you turn on Slack delivery.

## Prerequisites

You need permission to install apps in your Slack workspace. If you don't have it, ask a Slack workspace admin to follow these steps and send you the URL.

## Create the webhook

**1. Create or open a Slack app**

Go to [api.slack.com/apps](https://api.slack.com/apps) and open an existing app, or click **Create New App** → **From scratch**. Give it a name, such as "StarTree Alerts", and pick your workspace.

**2. Turn on incoming webhooks**

In the app's sidebar, open **Incoming Webhooks** and turn on **Activate Incoming Webhooks**.

**3. Add a webhook for the channel**

Click **Add New Webhook to Workspace**, choose the Slack channel, and click **Allow**. A private channel appears in the list only if you're a member of it.

**4. Copy the URL**

Copy the webhook URL, which looks like `https://hooks.slack.com/services/T…/B…/…`, and paste it into the **Incoming webhook URL** field in the Data Portal.

> [!WARNING]
>
> Treat the webhook URL like a password: anyone who has it can post to that Slack channel. After you save it, the Data Portal shows only a masked version. To stop a webhook from working, remove it from the app's **Incoming Webhooks** page in Slack.

One app can hold webhooks for several Slack channels. Each webhook posts to exactly one channel, so add one webhook per channel you want messages in.

## Check that it works

Before saving, send a test message: click **Test** next to the field in a table-health channel, or **Send test** in Query Analyzer's settings. A test message should appear in the Slack channel within a few seconds. If it doesn't, check that you copied the whole URL and that the webhook is still listed on the app's **Incoming Webhooks** page.


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