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
- Go to the Slack API portal and click Create New App.
- Choose From scratch.
- Enter a name for your app and select the target workspace.
- Click Create App.
Step 2: Get the App-Level Token
- Go to Basic Information in your app settings. Scroll to App-Level Tokens and click Generate Token and Scopes.
- Enter a name for the token.
- Click Add Scope and select
connections:write. - Click Generate.
- Copy the token (starts with
xapp-) β you will need it later.
Step 3: Configure Permissions and Enable Socket Mode
Enable Socket Mode
- Go to Socket Mode in your app settings.
- Toggle Socket Mode on.
Add Bot Token Scopes
- Go to OAuth & Permissions.
- Scroll to Bot Token Scopes and add the following scopes:
Enable Event Subscriptions
- Go to Event Subscriptions and toggle it on.
- Under Subscribe to bot events, add
app_mentionandmessage.im. - Click Save Changes.
Step 4: Get the Bot Token
- Go to OAuth & Permissions.
- Click Install to Workspace at the top.
- Review the requested permissions and click Allow.
- Copy the Bot User OAuth Token (starts with
xoxb-).
Step 5: Connect to Lensmor
- Open your Lensmor dashboard and go to the bot settings page.
- Paste the
xapp-token into the App-Level Token field. - Paste the
xoxb-token into the Bot Token field. - 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.