Slack Integration

Connect your assistant to Slack for seamless message sending.

The Slack integration allows your Vapi assistant to send messages to a pre-configured Slack channel during phone calls. This enables your assistant to notify team members, send updates, or share information directly through Slack.

Prerequisites

Before you can use the Slack integration, you need to:

  1. Have a Slack workspace
  2. Have access to the Vapi Dashboard
  3. Have an assistant created in Vapi
  4. Have a Slack channel created where messages will be sent

Setup Steps

1. Connect Slack Account

First, you need to connect your Slack workspace to Vapi:

  1. Navigate to the Vapi Dashboard
  2. Go to Providers Keys > Tools Provider > Slack
  3. Click the Connect button
  4. A Slack authorization popup will appear
  5. Follow the prompts to authorize Vapi to access your Slack workspace

The authorization process will request access to send messages to your Slack workspace.

2. Create Slack Tool

After connecting your Slack workspace, create the tool:

  1. Go to Dashboard > Tools page
  2. Click the Create Tool button
  3. Select Slack from the available options
  4. Choose the Slack Send Message Tool
  5. Provide a name and description explaining when it should be invoked
  6. Configure the tool with the following required fields:
    • channel: The name of the Slack channel where messages will be sent (e.g., “#general” or “#notifications”)

The description field is crucial as it helps the AI model understand when and how to use the tool. Be specific about the scenarios and conditions when the tool should be invoked.

3. Add Tool to Assistant

Now, add the Slack tool to your assistant:

  1. Navigate to Dashboard > Assistants page
  2. Select your assistant
  3. Go to the Functions tab
  4. In the tools dropdown, select the Slack tool
  5. Click Publish to save your changes

Tool Configuration

Slack Send Message Tool

This tool uses the following fields to send messages to Slack:

  • channel: The name of the Slack channel where the message will be sent
  • text: The message content to be sent to the channel

The channel name should be specified in the format “#channel-name”. Make sure the bot has been added to the channel before sending messages.

Example Usage

Here’s how the tool can be used in your assistant’s configuration:

1{
2 "model": {
3 "provider": "openai",
4 "model": "gpt-4",
5 "messages": [
6 {
7 "role": "system",
8 "content": "You are a customer service assistant. When a customer requests a callback or needs urgent attention, use the Slack tool to notify the support team in the #customer-support channel. Include the following information in your message:\n\n- Customer name\n- Phone number\n- Reason for callback/urgent attention\n- Any specific time constraints\n\nAlways be professional and concise in your Slack messages."
9 }
10 ],
11 "tools": [
12 {
13 "type": "slack.message.send",
14 "name": "notifySupport",
15 "description": "Use this tool to send urgent notifications to the support team in the #customer-support channel. Only use this when a customer needs immediate attention or requests a callback."
16 }
17 ]
18 }
19}

Best Practices

  1. Channel Selection: Always verify the correct channel name before sending messages
  2. Message Formatting: Use clear and concise language in your Slack messages
  3. Error Handling: Include fallback responses for cases where the tool fails
  4. User Confirmation: Always confirm with the user before sending notifications to Slack
  5. Channel Access: Ensure the Slack bot has been added to the target channel