Overview
The Slack Connector provides functionality to retrieve channel messages from Slack workspaces and register them in the Fess index.
This feature requires the fess-ds-slack plugin.
Supported Content
Public channel messages
Private channel messages
File attachments (optional)
Prerequisites
Plugin installation is required
Slack App creation and permission configuration is required
OAuth Access Token must be obtained
Plugin Installation
Install from the admin console under “System” -> “Plugins”:
Download
fess-ds-slack-X.X.X.jarfrom Maven CentralUpload and install from the plugin management screen
Restart Fess
Or, see Plugin for details.
Configuration
Configure in the admin console under “Crawler” -> “Data Store” -> “Create New”.
Basic Settings
| Item | Example |
|---|---|
| Name | Company Slack |
| Handler Name | SlackDataStore |
| Enabled | On |
Parameter Configuration
Parameter List
Script Configuration
Available Fields
| Field | Description |
|---|---|
message.title | Title (empty string for messages, file name and title for file entries) |
message.text | Message text content |
message.user | Message sender’s display name |
message.channel | Channel name where message was sent |
message.timestamp | Message sent date/time |
message.permalink | Message permalink |
message.attachments | Attachment fallback information |
Slack App Configuration
1. Create Slack App
Access https://api.slack.com/apps:
Click “Create New App”
Select “From scratch”
Enter app name (e.g., Fess Crawler)
Select workspace
Click “Create App”
2. Configure OAuth & Permissions
In the “OAuth & Permissions” menu:
Add to Bot Token Scopes:
For public channels only:
channels:history- Read public channel messageschannels:read- Read public channel informationusers:read- Read user information (required for display name resolution)
When including private channels (include_private=true):
channels:historychannels:readgroups:history- Read private channel messagesgroups:read- Read private channel informationusers:read
When also crawling files (file_crawl=true):
files:read- Read file content
3. Install the App
In the “Install App” menu:
Click “Install to Workspace”
Review permissions and click “Allow”
Copy the “Bot User OAuth Token” (starts with
xoxb-)
Note
Normally use the Bot User OAuth Token that starts with xoxb-, but User OAuth Token starting with xoxp- can also be used in parameters.
4. Add to Channels
Add the app to target channels for crawling:
Open the channel in Slack
Click on the channel name
Select the “Integrations” tab
Click “Add apps”
Add the created app
Usage Examples
Crawl Specific Channels
Parameters:
Script:
Crawl All Channels
Parameters:
Script:
Crawl Including Private Channels
Parameters:
Script:
Crawl Including Files
Parameters:
Script:
Include Detailed Message Information
Script:
Troubleshooting
Authentication Error
Symptom: invalid_auth or not_authed
Check:
Verify token is copied correctly
Verify token format:
Bot User OAuth Token: starts with
xoxb-User OAuth Token: starts with
xoxp-
Verify app is installed to workspace
Verify required permissions are granted
Channel Not Found
Symptom: channel_not_found
Check:
Verify channel name is correct (# is not needed)
Verify app is added to the channel
For private channels, set
include_private=trueVerify channel exists and is not archived
Cannot Retrieve Messages
Symptom: Crawl succeeds but 0 messages found
Check:
Verify required scopes are granted:
channels:historychannels:readFor private channels:
groups:history,groups:read
Verify messages exist in the channel
Verify app is added to the channel
Verify Slack app is enabled
Insufficient Permissions Error
Symptom: missing_scope
Resolution:
Add required scopes in Slack App settings:
Public channels:
channels:historychannels:read
Private channels:
groups:historygroups:read
Files:
files:read
Reinstall the app
Restart Fess
Cannot Crawl Files
Symptom: Files not retrieved even with file_crawl=true
Check:
Verify
files:readscope is grantedVerify files are actually posted in the channel
Verify file access permissions
API Rate Limiting
Symptom: rate_limited
Resolution:
Increase crawl interval
Reduce number of channels
Split into multiple data stores and distribute schedules
Slack API limits:
Tier 3 methods: 50+ requests/minute
Tier 4 methods: 100+ requests/minute
Large Number of Messages
Symptom: Crawl takes too long or times out
Resolution:
Split channels and configure multiple data stores
Distribute crawl schedules
Consider settings to exclude old messages
Advanced Script Examples
Message Processing
Summarize long messages:
Format channel name:
Reference Information
Data Store Connector Overview - Data Store Connector Overview
Atlassian Connector - Atlassian Connector
Data Store Crawling - Data Store Configuration Guide