Skip to main content

Create a Slack Connector

A Slack connector enables you to ingest messages from your Slack workspace into the Zeta Alpha platform. This guide shows you how to create and configure a Slack connector for your data ingestion workflows.

Info: This guide presents an example configuration for a Slack connector. For a complete set of configuration options, see the Slack Connector Configuration Reference.

Prerequisites

Before you begin, ensure you have:

  1. Access to the Zeta Alpha Platform UI
  2. A tenant created
  3. An index created
  4. Slack credentials (refer to the PDF tutorial "Connecting Slack to Zeta Alpha.pdf" for detailed instructions)

Step 1: Create the Slack Basic Configuration

To create a Slack connector, define a configuration file with the following basic fields:

  • is_document_owner: (boolean) Indicates whether this connector "owns" the crawled documents. When set to true, other connectors cannot crawl the same documents.
  • workspace_id: (string) The ID of the workspace to crawl. This can be found in the browser URL when you open your workspace (e.g., https://app.slack.com/client/<WORKSPACE_ID>).
  • api_token: (string) Token that grants access to Slack messages. This is obtained during authentication setup.
  • entities: (array of strings) Types of Slack channels to crawl. Possible values are:
    • "public_channel": Public channels
    • "private_channel": Private channels
    • "group_message": Group direct messages
    • "private_message": One-on-one direct messages
  • include_bot_messages: (boolean, optional, default: false) Whether to include messages created by bots.
  • include_archived_messages: (boolean, optional, default: false) Whether to include messages from archived channels.
  • logo_url: (string, optional) The URL of a logo to display on document cards

Example Configuration

{
"name": "My Slack Connector",
"description": "My Slack connector",
"is_indexable": true,
"connector": "slack",
"connector_configuration": {
"is_document_owner": true,
"workspace_id": "T1234567890",
"api_token": "xoxb-your-token-here",
"entities": [
"public_channel",
"private_channel"
],
"include_bot_messages": false,
"include_archived_messages": false,
"logo_url": "https://example.com/logo.png"
}
}

Step 2: Add Field Mapping Configuration

When crawling Slack, the connector extracts document metadata and content as described in the Slack Connector Configuration Reference. You can map these Slack fields to your index fields using the field_mappings configuration.

Example Field Mappings

The following example shows field mappings for the default index fields:

{
...
"connector_configuration": {
...
"field_mappings": [
{
"content_source_field_name": "formatted_id",
"index_field_name": "DCMI.title"
},
{
"content_source_field_name": "created_at",
"index_field_name": "DCMI.created"
},
{
"content_source_field_name": "last_updated_at",
"index_field_name": "DCMI.modified"
},
{
"content_source_field_name": "member_info.name",
"index_field_name": "DCMI.creator"
},
{
"content_source_field_name": "uri",
"index_field_name": "uri"
},
{
"content_source_field_name": "member_info.avatar_url",
"index_field_name": "image_urls"
},
{
"content_source_field_name": "document_content_type",
"index_field_name": "document_content_type"
},
{
"content_source_field_name": "document_content",
"index_field_name": "document_content"
}
],
...
}
}

Step 3: Specify What to Crawl

You can configure the Slack connector to crawl specific content using the following options:

  • channel_include_names: (array of strings, optional) Channel names in the list will be crawled. If a channel name is in both the include and exclude lists, the channel will not be crawled. If not passed, all channels are crawled.
  • channel_exclude_names: (array of strings, optional) Channel names in the list will not be crawled. If a channel name is in both the include and exclude lists, the channel will not be crawled.
  • file_include_regex_patterns: (array of strings, optional) Attached files whose names match any of the regular expressions in the list will be crawled. If a file matches both an include and exclude pattern, the exclude pattern takes precedence and the file is not crawled. If not passed, all files are crawled.
  • file_exclude_regex_patterns: (array of strings, optional) Attached files whose names match any of the regular expressions in the list will not be crawled. If a file matches both an include and exclude pattern, the exclude pattern takes precedence and the file is not crawled.

Example Configuration

{
...
"connector_configuration": {
...
"channel_include_names": [
"engineering",
"product-updates",
"company-announcements"
],
"channel_exclude_names": [
"random",
"off-topic"
],
"file_include_regex_patterns": [
".*\\.pdf$",
".*\\.docx$"
],
...
}
}

Step 4: Create the Slack Content Source

To create your Slack connector in the Zeta Alpha Platform UI:

  1. Navigate to your tenant and click View next to your target index
  2. Click View under Content Sources for the index
  3. Click Create Content Source
  4. Paste your JSON configuration
  5. Click Submit

Crawling Behavior

The connector crawls messages from your Slack workspace based on your configuration, extracting:

  • Message content (converted from Slack markup to Markdown)
  • Message author information
  • Creation and edit timestamps
  • Channel context
  • Thread relationships
  • User avatars and profile information

Access rights are automatically extracted from channel membership and workspace permissions. Only authorized users can access the messages in Zeta Alpha.