Slack

Connect & Ingest data from Slack

Slack is a communication platform for teams and organizations. The Sling Slack connector extracts data from the Slack Web API, supporting workspace info, users, channels, channel members, messages, and thread replies.

circle-check

Setup

The following credentials are accepted:

Secrets:

  • bot_token (required) -> Your Slack Bot User OAuth Token (starts with xoxb-)

Inputs:

  • anchor_date (optional) -> Starting date for the first sync of incremental endpoints (ISO 8601 format, e.g., 2024-01-01T00:00:00Z). Defaults to 1 year ago.

Creating a Slack App and Getting a Bot Token

  1. Click Create New App β†’ From scratch

  2. Enter an app name (e.g., "Sling Data Extractor") and select your workspace

  3. Navigate to OAuth & Permissions in the sidebar

  4. Under Bot Token Scopes, add the following scopes:

    • channels:read β€” View basic information about public channels

    • channels:history β€” View messages and other content in public channels

    • channels:join β€” Join public channels (needed to read message history)

    • groups:read β€” View basic information about private channels

    • groups:history β€” View messages in private channels the bot is in

    • users:read β€” View people in the workspace

    • users:read.email β€” View email addresses of people in the workspace

    • team:read β€” View the workspace name, email domain, and icon

  5. Click Install to Workspace and authorize the app

  6. Copy the Bot User OAuth Token (starts with xoxb-)

circle-exclamation

Using sling conns

Here are examples of setting a connection named SLACK. We must provide the type=api property:

Environment Variable

Sling Env File YAML

See here to learn more about the sling env.yaml file.

Replication

Here's an example replication configuration to sync Slack data to a PostgreSQL database:

Incremental sync for messages:

Endpoints

Endpoint
Description
Incremental
Depends On

team_info

Workspace/team information

No

β€”

users

All users in the workspace

No

β€”

channels

All public channels in the workspace

No

β€”

channel_members

Members of each channel

No

channels

messages

Message history for each channel

Yes

channels

threads

Thread replies for messages with threads

No

messages

The connector uses a queue-based architecture to handle parent-child relationships. The channels endpoint runs first and populates channel IDs, which are used by channel_members and messages. The messages endpoint identifies threaded messages and queues thread references for the threads endpoint.

To discover available endpoints:

Endpoint Details

team_info β€” Returns information about the workspace/team, including name, domain, email domain, and icon.

users β€” Returns all users in the workspace, including profile information, timezone, admin status, and bot status. Runs in full-refresh mode.

channels β€” Returns all public channels in the workspace, including archived channels. Contains channel metadata such as name, topic, purpose, creator, and member count. Channel IDs are queued for child endpoints.

channel_members β€” Returns the member list for each channel. Iterates over all channel IDs from the channels endpoint.

messages β€” Returns the message history for each channel. Supports incremental sync using the oldest timestamp parameter. Messages with threads are identified and their references are queued for the threads endpoint. Each message includes text content, author, timestamps, reactions, and attachment information.

threads β€” Returns all replies within threaded conversations. Iterates over thread references queued by the messages endpoint. Includes the parent message and all replies.

Incremental Sync

The messages endpoint supports incremental sync using the oldest timestamp parameter:

  • First run: Fetches all messages from the anchor_date (defaults to 1 year ago)

  • Subsequent runs: Only fetches messages posted after the last sync timestamp

You can customize the starting date with the anchor_date input:

All other endpoints run in full-refresh mode since they represent current state rather than time-series data.

Rate Limiting

The Slack Web API enforces rate limits per method tier:

  • Tier 1: 1 request per minute

  • Tier 2: 20 requests per minute

  • Tier 3: 50 requests per minute

  • Tier 4: 100 requests per minute

The connector automatically:

  • Limits to 4 requests per second with concurrency of 3

  • Retries with exponential backoff on 429 (rate limit) responses

  • Allows up to 5 retry attempts

  • Gracefully skips channels the bot is not a member of

If you are facing issues connecting, please reach out to us at [email protected]envelope, on discordarrow-up-right or open a Github Issue herearrow-up-right.

Last updated

Was this helpful?