Connect Lensmor Agent to Slack

A step-by-step guide to guide you to generate Slack App Token & Bot Token

Written By joyce

Last updated About 7 hours ago

This guide walks you through connecting the Lensmor AI Agent to your Slack workspace. You will need to create a Slack app and generate two tokens: an App-Level Token and a Bot Token.

Step 1: Create the Slack App

  1. Go to the Slack API portal and click Create New App.
  2. Choose From scratch.
  3. Enter a name for your app and select the target workspace.
  4. Click Create App.

Step 2: Get the App-Level Token

  1. Go to Basic Information in your app settings. Scroll to App-Level Tokens and click Generate Token and Scopes.
  2. Enter a name for the token.
  3. Click Add Scope and select connections:write.
  4. Click Generate.
  5. Copy the token (starts with xapp-) β€” you will need it later.

Step 3: Configure Permissions and Enable Socket Mode

Enable Socket Mode

  1. Go to Socket Mode in your app settings.
  2. Toggle Socket Mode on.

Add Bot Token Scopes

  1. Go to OAuth & Permissions.
  2. Scroll to Bot Token Scopes and add the following scopes:
ScopePurpose
app_mentions:readRead mentions of your app
channels:historyRead messages in public channels
chat:writeSend messages as the bot
groups:historyRead messages in private channels
im:historyRead direct message history
im:readView basic DM info
im:writeStart direct message conversations
mpim:historyRead group direct messages
reactions:writeAdd emoji reactions
users:readView workspace members

Enable Event Subscriptions

  1. Go to Event Subscriptions and toggle it on.
  2. Under Subscribe to bot events, add app_mention and message.im.
  3. Click Save Changes.

Step 4: Get the Bot Token

  1. Go to OAuth & Permissions.
  2. Click Install to Workspace at the top.
  3. Review the requested permissions and click Allow.
  4. Copy the Bot User OAuth Token (starts with xoxb-).

Step 5: Connect to Lensmor

  1. Open your Lensmor dashboard and go to the bot settings page.
  2. Paste the xapp- token into the App-Level Token field.
  3. Paste the xoxb- token into the Bot Token field.
  4. Click Connect.

Step 6: Invite the Agent to a Channel

Add the bot to the Slack channel where you want to use it, then start chatting with the Lensmor Agent directly in Slack.

FAQ

Q: Do I need Slack admin permissions to set this up?You need permission to create and install Slack apps in your workspace. In most organizations this requires Workspace Admin or Owner access. If you cannot create apps, ask your Slack admin to complete Steps 1–4 and provide you with the tokens.

Q: Can I use the bot in multiple channels?Yes. Once connected, you can invite the bot to as many channels as you like. The bot responds wherever it is mentioned or receives a direct message.

Q: What should I do if the connection fails?Double-check that you have pasted the correct tokens β€” the xapp- token in the App-Level Token field and the xoxb- token in the Bot Token field. Also confirm that Socket Mode is enabled and all required bot scopes have been added before installing the app to your workspace.

Q: Is the Slack integration available on all plans?Yes. The Slack integration is available on all Lensmor plans, including Free.