Slack as a Data Source for Conversational and User Learning
Connect Slack to Aisera to ingest channel messages and user data for Knowledge Base, Conversations, and User Learning.
Overview
The Slack connector retrieves data from your Slack workspace to support three learning functions:
KB Learning — Ingests each selected Slack channel as a single Knowledge Base article. All messages in a channel are combined into one article. Images are downloaded and stored in Aisera; other attachments are included as hyperlinks in the article body. Use the date range settings during data source setup to control how far back messages are included.
Conversations Learning — Ingests each message in a selected channel as a separate entry using the Conversations data model.
User Learning — Ingests user data from your Slack workspace. For most use cases, User Learning is sufficient. User Profile Learning is only needed if you require additional profile attribute data beyond what standard User Learning provides.
You can enable one or more learning functions on a single data source. If you plan to use Conversations Learning, run User Learning first so that ingested messages can be associated with known users in your workspace.
See Conversational Learning and Gen AI Learning for more information about running these jobs.
Prepare
Before setting up the Slack connector in Aisera, you need to create and configure a Slack application in your Slack workspace.
Endpoint
Before you begin, note the following endpoint for use during integration setup:
https://slack.com
Create a service account
Create a dedicated Slack user account for Aisera to use when connecting to your workspace. Using a service account rather than an admin account limits Aisera's access to only the permissions it requires.
The service account needs Read permissions with Export ability to transfer data to Aisera. If you plan to use features that write back to Slack, such as Ticket Concierge or Knowledge Generation, the account will also need Read/Write permissions with Import and Export ability.
This account does not need Execute or Delete permissions. All Aisera operations are performed, tracked, and logged in the Aisera cloud.
Use this account to complete the remaining steps in Prepare.
Create a Slack application
Log in to the Slack workspace where you want to install the Aisera bot.
Go to https://api.slack.com/apps.
Click Create New App and select From scratch.
Set the App Name and Slack Development Workspace.
Set the display information for your app:
App name
Short description
App icon (512x512 px PNG)
Background color
Click Save Changes.
From the left navigation menu, click Event Subscriptions.
Enable Events.
Expand Subscribe to bot events, click Add Bot User Events, and add the required events.
Click Save Changes.
From the left navigation menu, go to Interactivity & Shortcuts and enable it.
Set the following URL as the Request URL in both the Event Subscriptions window and the Interactivity & Select Menus window:
https://<tenant_id>.chatbot.aisera.<top_level_domain>/slack/receive
OAuth authorization
From the left navigation menu, go to OAuth & Permissions.
In the Scopes section, add the following scopes to your user or bot token:
User Learning:
users:readConversations Learning:
channels:read,groups:read,im:read,mpim:read,channels:history,groups:history,im:history,mpim:history
Click Install to [App Name] under OAuth Tokens and click Allow.
Copy the User OAuth Token from the OAuth Tokens section.
After completing this section you should have:
User OAuth Token
Authorization URL:
https://slack.com/oauth/v2/authorizeAccess Token URL:
https://slack.com/api/oauth.v2.access
Basic authentication
From the left navigation menu, go to Basic Information.
Under App Credentials, copy the Verification Token.
After completing this section you should have:
Verification Token
Integration setup
To create the Slack integration:
In the Aisera Admin UI, navigate to Settings → Integrations and click + New Integration.
Select Slack from the list.
Enter a name for the integration and click Next.
Select your Auth Type and enter the credentials from your Prepare steps.
Click OK.
Data source setup
To create a Slack data source:
In the Aisera Admin UI, navigate to Settings → Data Sources and click + New Data Source.
Select Slack from the list.
Enter the following details and click Next:
Name
A name for this data source
Functions
Select the learning functions you want to enable for this data source
Integration
Select the Slack integration you created in Integration setup
Schedule
Select how frequently the data source should run
Data Retrieval
How you would like data to be retrieved. Incremental retrieves only messages created or updated since the last data ingestion. Date Range (UTC) retrieves messages within a specified date range. Leave the end date blank to retrieve all messages after the start date.
Language
Select the language of your Slack content
The remaining fields on this screen are optional configurations. See Optional configurations for details.
Click Next through the remaining steps and click OK to complete the data source creation.
Contact your Aisera representative to configure a channel override for your data source. Provide the names or IDs of the Slack channels you want to ingest. Your representative will add the override on your behalf before data ingestion can run.
If you are using Conversations Learning with Incremental data retrieval, note that edited messages will not be captured on subsequent runs. This is a limitation of the Slack API: edited messages retain their original timestamp and are filtered out as already-ingested. Use Date Range retrieval if capturing edited messages is a requirement.
Click Next until the setup wizard closes to complete the data source creation.
Optional configurations
Transformation Script
[STUB: document when guidance is available from engineering]
Auto Commit
Automatically commits ingested content without requiring manual review. See Data Source Configurations for full details.
Post-setup actions
Next steps
Run data ingestion to begin pulling content into Aisera. See Data Ingestion.
To make your Aisera bot available in Slack, install it as a Slack channel. See Setting up a Slack Channel.
Last updated
Was this helpful?
