1. Setting Up a Slack Workspace for ClawdBot [1]

To integrate ClawdBot with Slack, users must first set up a Slack account and create a dedicated workspace.

1.1. Creating a Slack Account and Workspace [1]

  1. Users can register for a Slack account by visiting slack.com and clicking "Get Started" [2].
    1. Logging in with a Google account simplifies the registration process [2].
  2. After logging in, users are prompted to create a workspace, which serves as a chat space for teams [4].
    1. The example workspace is named "AI Chats Cloud" [6].
    2. Users can skip inviting colleagues during the initial setup [7].
  3. The setup process may involve a prompt to pay, but refreshing the page allows access to a limited free version of Slack [9].
  4. The goal is to invite ClawdBot into this workspace to enable chat interactions from any location [12].

2. Integrating ClawdBot with Slack via API and Terminal [14]

Integrating ClawdBot with Slack involves a complex, multi-step process that requires creating a Slack app, configuring its settings, obtaining specific tokens, and using terminal commands.

2.1. Creating a Slack App and Configuring Manifest [14]

  1. Adding an application to the Slack workspace is a complex process [15].
  2. Users must access the Slack API by navigating to api.slack.com/apps [17].
    1. On the Slack API page, click "Create an app" [19].
    2. Select "From Manifest" to use a pre-written configuration [20].
    3. Choose the desired Slack workspace, such as "Python AI Chat Cloud" [20].
  3. A configuration file, found in the ClawdBot documentation under the "Manifest" section, needs to be copied [20].
    1. This JSON code must be pasted into the Slack app creation page [21].
    2. After accepting cookies, click "Next" and then "Create" to grant the bot necessary permissions [21].
  4. Upon creation, various IDs and secrets are generated, which can be dismissed for now [23].

2.2. Configuring ClawdBot Channels and Tokens via Terminal [24]

  1. The next step involves using the Terminal tool to configure ClawdBot [24].
    1. Typing Cloud Bot Channels in the terminal shows available communication channels, which are initially zero [26].
    2. The command line interface can be challenging, but ChatGPT can assist with understanding commands [28].
    3. Cloud Bot Channels list displays connected chat platforms, which will be empty before configuration [31].
  2. To add a channel, use Cloud Bot Config in the terminal [32].
    1. Select "local" for where ClawdBot is running and confirm the model configuration [32].
    2. Choose "channels" and then "Add or Link new channel" [32].
    3. Select "Slack" (Socket Mode) [33].
  3. The system will request several tokens, starting with the Slack Bot Token (prefixed with XOXB) [33].
    1. To find this token, go to "OAuth Permissions" under the "Features" section in the Slack API settings [34].
    2. Click "Install to Python for AI Chat Cloud" and allow the installation [36].
    3. The Bot User OAuth Token will be generated; copy and paste it into the terminal [38].
  4. The second required token is the Slack App Token [39].
    1. In the Slack API settings, navigate to "Basic Information" and then "App Level Tokens" [40].
    2. Generate a new token, name it "Slack bot," and add the connection:write scope [40].
    3. Copy the generated token (prefixed with xapp) and paste it into the terminal [40].
  5. Configure Slack channel access by selecting "yes" to allow ClawdBot to join channels [41].
    1. Choose "open" to allow everyone in the workspace to use the bot [44].
    2. Complete the configuration by repeatedly pressing the down arrow and selecting "finished" [45].
  6. Enable Direct Message (DM) access by selecting "yes" [47].
    1. For security, choose "pairing mode," which requires explicit permission for each chat interaction [48].

2.3. Testing and Pairing ClawdBot in Slack [50]

  1. After completing the configuration, select "continue" in the terminal to finalize the setup [50].
  2. To test the integration, refresh the Slack channel (web or app) [53].
    1. Locate ClawdBot in the channel and attempt to send a message [54].
    2. If the bot is not in the channel, add it manually [55].
    3. Sending "hi" should elicit a response from ClawdBot, confirming successful integration [55].
  3. For pairing mode, a pairing code is required for direct messaging [65].
    1. Copy the last line of the code provided in the terminal, excluding the "Code" part, and paste it into the terminal [65].
    2. Copy the one-time password-like pairing code and paste it into the terminal, then press enter [66].
    3. This action allows the user to chat with the bot [66].
  4. Sending "hi" again should confirm that the pairing is successful and the bot responds [67].
  5. The configuration of ClawdBot with Slack is now complete [68].
    1. Users are encouraged to pause and review the steps if needed [70].
    2. Questions or suggestions can be left in the comments [71].