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

# Connect to Slack Bot

## Create Bot

Go to the [Slack App Platform](https://api.slack.com/apps).

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/slack_01.jpg?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=64545714afed2828436f2ab6e27a087c" alt="Slack Platform" width="2030" height="1162" data-path="images/zh/deploy/bots/slack/slack_01.jpg" />

Click `Create New App` in the top right corner, select `from a manifest`, select the workspace where you want to deploy the bot, select next, and choose to create the bot.

Enter the `Basic Information` option on the left, record the `signing_secret`.

Enter `OAuth & Permissions` on the left, scroll down to `Scopes`, add the following bot permissions:

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/slack_02.jpg?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=76143e1f4ea4e5218fa35a15bbeb19fb" alt="Bot Permissions 1" width="2062" height="1388" data-path="images/zh/deploy/bots/slack/slack_02.jpg" />

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/slack_03.jpg?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=667c75521fc8e6c7e540f2da355c86dc" alt="Bot Permissions 2" width="1764" height="1518" data-path="images/zh/deploy/bots/slack/slack_03.jpg" />

After adding the above permissions, click `Install to your workspace`, record the token starting with `xoxb-xxxxx`.<br />

**Note:**
**If you didn't add all permissions at once, you'll need to reinstall the App later.**<br />

Enter the `App Home` tab on the left, scroll to the bottom where you'll find `Message Tab`, turn it on and check
`Allow users to send Slash commands and messages from the messages tab`.

## Connect to LangBot

Enter `Event Subscriptions` on the left, turn on the switch, click `Subscribe to bot events`,
add the following permissions:

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/slack_04.jpg?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=6a6f15e2184947164fc5ea8077040457" alt="Event Permissions" width="1120" height="1108" data-path="images/zh/deploy/bots/slack/slack_04.jpg" />

After completing all the above operations, open the LangBot Webui configuration page, add a new bot

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/connect_to_langbot.png?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=dde8852be724bcd33e14218a6be99678" alt="Event Permissions" width="501" height="840" data-path="images/zh/deploy/bots/slack/connect_to_langbot.png" />

## Start Bot

<Info>
  Since Slack officially requires https, please configure reverse proxy first according to the documentation [Configure HTTP Reverse Proxy and SSL](/en/workshop/production/proxy-and-ssl).
</Info>

After filling in the Slack configuration items, **start LangBot**.
Enable and open the Slack bot configuration page on the LangBot homepage, copy the WebHook URL from it, then in the `Request URL` of the Event Subscriptions you just configured, fill in the WebHook URL.

After filling in all the above configuration items, click save link. If it shows a green **Verified**, it means the deployment is successful.
Otherwise, check if the above configuration items are filled in correctly.

## Effect Demonstration

<img src="https://mintcdn.com/langbot/ccEfWQOd_I5kaF_t/images/zh/deploy/bots/slack/slack_05.jpg?fit=max&auto=format&n=ccEfWQOd_I5kaF_t&q=85&s=ab5800fcdae7d750d5917e6961a09a06" alt="Effect Demonstration" width="1630" height="318" data-path="images/zh/deploy/bots/slack/slack_05.jpg" />
