Slack Setup
Connect your agent to Slack to enable it to respond in your workspace channels and direct messages.
Creating a Slack App
- Go to api.slack.com/apps
- Click Create New App and choose From scratch
- Give your app a name and select your workspace
-
Under OAuth & Permissions, add these Bot Token Scopes:
-
chat:write– Send messages -
app_mentions:read– Respond to mentions -
channels:history– Read channel messages -
im:history– Read direct messages -
im:write– Send direct messages -
users:read– Verify the bot token belongs to this exact Slack app
-
- Install the app to your workspace
-
Copy the Bot User OAuth Token (starts with
xoxb-), Signing Secret, Team ID, and App ID. All four values are required. Lenno callsauth.testandbots.infoso a bot token from another app in the same workspace fails closed.
Enabling Events
- In your Slack app settings, go to Event Subscriptions
- Enable events and set the Request URL to your Lenno webhook endpoint
-
Subscribe to these bot events:
-
message.channels– Messages in channels -
message.im– Direct messages -
app_mention– When someone mentions your bot
-
Connecting to Lenno
- Go to your agent’s Channels tab
- Click Add Channel and select Slack
- Paste the Bot User OAuth Token, Signing Secret, Team ID, and App ID. Lenno routes and verifies each installation by the compound Team ID + App ID and rejects duplicates or credentials belonging to a different app.
- Click Save
Pairing The Owner
The bot token and Slack request signature authenticate the app and workspace; they do not identify the human owner. The channel stays unlinked and ordinary senders are ignored until the agent’s current effective owner completes pairing:
-
Optionally save the expected stable Slack member ID (
U...) in Access & Trust. It constrains every pairing attempt but grants no authority alone. - Generate a code for this exact Slack channel.
-
Send the ordinary message
lenno pair <code>to the bot within 15 minutes: use a direct message when no expected identity is configured, or the matching account in a shared channel when one is configured. Slack reserves slash-prefixed input for separately registered app commands, so this visible message phrase reaches Lenno through the signed Events API.
The code is single-use and cannot pair another Slack channel. A configured ID, display name, and handle never grant owner authority by themselves.
Tips
-
Invite the bot to channels where you want it to respond using
/invite @botname - Direct messages are the safest place to complete owner pairing
- Use threads for multi-turn conversations to keep channels clean