Ejento AI
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Ejento AI
  1. Guides
  • Basic Operations
    • Features
      • Organization → Projects → Assistants → Teams Hierarchy
    • Guides
      • Login/Signup
  • Assistants
    • Overview
    • Features
      • Assistant Access Control
      • Caching Responses for Assistants
      • Assistant Evaluation
      • Evaluation Metrics
      • URL-based Chat Thread Creation and Prepopulation
      • Reasoning Patterns
    • Guides
      • Add Assistant
      • Evaluate Assistant
      • Edit Assistant
      • Embed Assistant
      • Delete Assistant
      • Add Favourite Assistants
      • View Assistant Id
      • View Dataset Id
      • Voice Calling with Assistants
  • Corpus
    • Overview
    • Features
      • Corpus Permissions
      • PII Redaction
    • Guides
      • Assistant Corpus Setup
      • Assistant Corpus Settings
      • Corpus Access Control
      • Corpus Connections
      • ETag Setup for Corpus Incremental Refresh
      • View Corpus Id
      • View Document Id
      • Tagging
        • Corpus tagging
        • Document tagging
  • Teams
    • Overview
    • Guides
      • Add a Team
      • Edit a Team
      • Delete a Team
      • View Team Id
  • Projects
    • Overview
    • Guides
      • Add a Project
      • Edit a Project
      • Managing Assistants in a Project
      • Delete a Project
      • View Project Id
  • User Settings
    • Overview
    • Features
      • Ejento AI User Access Levels
    • Guides
      • Assistant Edit Access
      • Add new user
      • View my User Id
  • API Keys
    • Overview
    • Guides
      • How to generate API Key and Auth Token
  • Workflows
    • Overview
    • Guides
      • Add Workflow
      • Workflow Chat
  • Tools
    • Overview
    • Guides
      • Tools Overview
      • Create External Tool
      • Connect Tool to Assistant
  • Analytics
    • Overview
    • Guides
      • Analyzing Data in the Analytics Dashboard
  • Chatlogs
    • Overview
    • Guides
      • Managing Chatlogs
      • View Chatlog & Chat thread Id
  • Integrations
    • Overview
    • Guides
      • Email Indexing
      • Microsoft Teams
      • Sharepoint Indexing
      • MS Teams Integration Setup
      • Creating a Connection in Credential Manager
      • Slack App
      • Discord Bot
  • Ejento AI Shield
    • Overview
    • Features
      • Understanding Guardrails
    • Guides
      • How to enable Guardrails
  • Assistant Security
    • Overview
    • Features
      • Assistant Red Teaming
    • Guides
      • Red Team an Assistant
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Guides
QuickstartRecipesREST APIsRelease NotesFAQs
Ejento AI
  1. Guides

Slack App

This guide explains how to create a Slack App that is restricted to your own workspace (organization) and how to collect the required credentials to connect it with our Node.js Slack integration app.

Overview#

By default, Slack apps can be distributed publicly. For security and privacy reasons, this setup ensures:
The app is not listed publicly in Slack's App Directory
The app can be installed only in your workspace
Tokens and credentials remain private to your organization
You will create a Slack app, configure permissions, generate tokens, and connect them to our Node.js service.

Prerequisites#

Before starting, make sure you have:
Admin or App Management permissions in your Slack workspace
Access to your Slack workspace where the app will be installed
Our Node.js app running locally or deployed (you will need its public URL)

Step 1: Create a New Slack App#

1.
Go to: https://api.slack.com/apps
2.
Click Create New App
3.
Select From Scratch
4.
Enter:
App Name: (example: Policy Assistant)
Workspace: Select your own Slack workspace
5.
Click Create App
Important: Apps created this way are private by default and are NOT publicly listed.
Create Slack App

Step 2: Confirm App Is Workspace-Only#

Slack apps are private unless you explicitly submit them to the Slack App Directory.
To ensure your app stays internal:
Do NOT submit the app for review
Do NOT enable "Distribution" for public sharing
You can verify this by:
1.
Opening your app dashboard
2.
Going to Manage Distribution
3.
Making sure it is not submitted for public listing

Step 3: Configure Bot User#

1.
In the left sidebar, click App Home
2.
Enable:
Display App Home Tab
Allow users to send Slash commands and messages
3.
Scroll to Bot User section
4.
Click Add Bot User
5.
Save changes
Note: This creates a bot identity for your app.

Step 4: Set OAuth Scopes (Permissions)#

Go to OAuth & Permissions.
Under Bot Token Scopes, add the required permissions:

Common Scopes#

app_mentions:read → View messages that directly mention the bot
channels:history → View messages and other content in channels that the bot is added in
chat:write → Send messages
groups:history → Read private channels (if needed)
im:history → Read direct messages and other content in DMs
mpim:history → Read direct messages and other content in groups
users:read → View people in a workspace
users:read.email → View email addresses of people
files:read → View files shared in channels (for attachment feature)
Security Tip: Only enable scopes you actually need for security.
Click Save Changes.
Bot Token Scopes

Step 5: Enable Socket Mode (Recommended)#

If you are not exposing a public HTTPS endpoint, Socket Mode is recommended.
1.
Go to Socket Mode
2.
Enable Socket Mode
3.
Generate an App-Level Token
When prompted:
Token Name: Example: socket-token
Scope: connections:write
4.
Save the generated token.
You will use this as:
SLACK_APP_TOKEN=xapp-xxxxxxxxxx

Step 6: Install App to Your Workspace#

1.
Go to OAuth & Permissions
2.
Click Install to Workspace
3.
Approve permissions
After installation, Slack will generate a Bot User OAuth Token.
Copy this value. It will look like:
xoxb-xxxxxxxxxxxxx
You will use this as:
SLACK_BOT_TOKEN=xoxb-xxxxxxxxxx

Step 7: Enable Event Subscriptions#

If your bot listens to messages or events:
1.
Go to Event Subscriptions
2.
Enable Events

If Using Socket Mode#

Note: No Request URL is required when using Socket Mode.

Subscribe to Bot Events#

Common examples:
message.im
message.channels
app_mention
Save changes.

Step 8: Collect Required Keys#

You will need the following values from Slack:

Required Environment Variables#

Variable NameDescription
SLACK_BOT_TOKENBot token used to send messages
SLACK_APP_TOKENSocket Mode token

Step 9: Configure Your Node.js App#

Add the following environment variables to your Node.js project:
If using .env file:
SLACK_BOT_TOKEN=your_bot_token_here
SLACK_APP_TOKEN=your_app_token_here
Important: Restart your Node server after updating environment variables.

Step 10: Verify Installation#

To confirm everything is working:
1.
Open Slack
2.
Search for your bot name
3.
Send a test message or mention it:
   @YourBot hello
If configured correctly, the bot should respond.

Troubleshooting#

Common Issues:
If the bot doesn't respond, verify that all required scopes are added
Ensure both tokens are correctly set in your environment variables
Check that Socket Mode is enabled if not using a public endpoint
Verify the bot is added to the channel where you're testing

Security Best Practices#

Never commit tokens to version control
Use environment variables or secure secret management
Regularly rotate tokens if exposed
Only grant minimum required scopes
Keep your app private to your organization
Previous
Creating a Connection in Credential Manager
Next
Discord Bot