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.
CLI Pro Required: APIs require a CLI Pro token or Platform Plan.
Setup
The following credentials are accepted:
Secrets:
bot_token(required) -> Your Slack Bot User OAuth Token (starts withxoxb-)
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
Go to the Slack API Apps page
Click Create New App β From scratch
Enter an app name (e.g., "Sling Data Extractor") and select your workspace
Navigate to OAuth & Permissions in the sidebar
Under Bot Token Scopes, add the following scopes:
channels:readβ View basic information about public channelschannels:historyβ View messages and other content in public channelschannels:joinβ Join public channels (needed to read message history)groups:readβ View basic information about private channelsgroups:historyβ View messages in private channels the bot is inusers:readβ View people in the workspaceusers:read.emailβ View email addresses of people in the workspaceteam:readβ View the workspace name, email domain, and icon
Click Install to Workspace and authorize the app
Copy the Bot User OAuth Token (starts with
xoxb-)
Important: The bot must be a member of channels to read their message history. The bot will automatically join public channels when using the channels:join scope. For private channels, you must manually invite the bot.
Using sling conns
sling connsHere 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
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], on discord or open a Github Issue here.
Last updated
Was this helpful?