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

# Slack

> Notify a Slack channel whenever a conversation touches a topic your team needs to know about

## Overview

The Slack action lets your AI agent post a message to a Slack channel you choose whenever a customer mentions a topic you want to be notified about. The notification includes a direct link to the conversation, so your team can open it straight from Slack.

> **Best for:**
>
> Alerting your team to issues worth a human's attention (late orders, churn risk, bug reports) without escalating the conversation itself.

**Common Use Cases:**

* Flagging a complaint or a late order to the support channel
* Notifying sales when a customer asks about enterprise pricing
* Telling your team about a reported bug as soon as it comes up

> [!NOTE]
>
> **Prerequisite:** Before using the Slack action, [connect Slack to Chatbase](https://chatbase.co/docs/user-guides/integrations/slack.md).

## How to create the action

**1. Navigate to Actions**

Go to your [Chatbase dashboard](https://www.chatbase.co/dashboard/) and select your AI agent. Click **Build > Actions** in the left sidebar.

**2. Create the Action**

Click **Create action**, select **Slack**, then click **Start customizing**.

**3. Choose your workspace**

Select the Slack workspace you want connected to this action.

![Selecting the Slack workspace for the action](https://mintcdn.com/chatbase/DIWSTyTSabxfVW3B/user-guides/chatbot/images/actions/actions-2.png?fit=max\&auto=format\&n=DIWSTyTSabxfVW3B\&q=85\&s=f3c0cdfc3186ecb5cc5e1bab5e4e1a27)

**4. Configure General Settings**

**When to use:** Provide a detailed description explaining when the AI agent should use this action, including the channel to post to and the topics that should trigger it. See [Examples](#examples) below.

To restrict the action to [procedure](https://chatbase.co/docs/user-guides/chatbot/procedures/procedures-overview.md) steps only, turn on [**Only use in procedures**](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md#only-use-in-procedures). When it's on, the **When to use** field is hidden, because the AI agent no longer decides when to call the action.

![The When to use field for the Slack action](https://mintcdn.com/chatbase/DIWSTyTSabxfVW3B/user-guides/chatbot/images/actions/actions-3.png?fit=max\&auto=format\&n=DIWSTyTSabxfVW3B\&q=85\&s=3fd9d1001247d0de1b613023b5bc0660)

**5. Choose Channels**

This action is compatible with every channel. Toggle it on or off for each configured channel, then click **Save**. See [Channels](https://chatbase.co/docs/user-guides/chatbot/actions/actions-overview.md#channels) for what configured, unconfigured, and incompatible mean.

**6. Enable and Test**

Click **Save**, then ensure the action is toggled to **Enabled** so the AI agent can post to your Slack channel.

![Enabling the Slack action](https://mintcdn.com/chatbase/DIWSTyTSabxfVW3B/user-guides/chatbot/images/actions/actions-4.png?fit=max\&auto=format\&n=DIWSTyTSabxfVW3B\&q=85\&s=99ea878ee3197bfd683ecd99cfc7856d)

> [!TIP]
>
> Test the action in the Action Preview before enabling it, to confirm the AI agent posts to your Slack channel when your instructions are met.

## Examples

A **When to use** description that names both the channel and the trigger topics:

```text theme={null}
Call this tool to send a message in slack to the channel named: ai-actions-slack
whenever the user mentions any of the following topics: late order
```

![The AI agent triggering a Slack notification in chat](https://mintcdn.com/chatbase/fuaTVXjARv0sH-Me/user-guides/chatbot/images/actions/slack-example.gif?s=2d0b04e374ca4ebf19fd0a871961d498)

Once the customer mentions an issue with a late order, a Slack notification is sent to the connected channel, with a direct link to that conversation:

![A Chatbase notification in a Slack channel, linking back to the conversation](https://mintcdn.com/chatbase/dnbnfsfDM4KPXR1z/user-guides/chatbot/images/actions/Slack/slack-channel-notifications.png?fit=max\&auto=format\&n=dnbnfsfDM4KPXR1z\&q=85\&s=df4ee124e4cbd7672bc5e736e4ec65a6)

## Best Practices

> **Name the Channel Explicitly**
>
> Include the destination channel in your **When to use** description so notifications land where the right people are watching.

> **List the Trigger Topics**
>
> Spell out the topics that should fire a notification. Vague instructions produce either noise or silence.

> **Notify, Don't Escalate**
>
> Slack tells your team something happened, but it doesn't hand over the conversation. For that, use [Escalations](https://chatbase.co/docs/user-guides/chatbot/actions/escalate-to-human.md) or [Chatbase live chat](https://chatbase.co/docs/user-guides/chatbot/actions/chatbase-live-chat.md).

> **Test Before Enabling**
>
> Send a test message from the Action Preview and confirm it arrives in the right channel before you turn the action on.


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