Skip to main content

Slack

This page contains the setup guide and reference information for the Slack source connector.

Prerequisites

Before you begin, have the following ready:

  • Administrator access to an active Slack Workspace
  • Slack App OAuth (preferred) or API Key

Setup guide

Step 1: Set up Slack

The following instructions guide you through creating a Slack app. Airbyte can only replicate messages from channels that the app has been added to.

info

If you are using a legacy Slack API Key, you can skip this section.

To create a Slack App, read this tutorial on how to create an app, or follow these instructions.

  1. Go to your Apps
  2. Click Create New App. Select From Scratch.
  3. Choose a name for your app and select the name of your Slack workspace. Click Create App.
  4. In the navigation menu, select OAuth & Permissions.
  5. Navigate to Scopes. In Bot Token Scopes, select the following scopes:
 channels:history
channels:join
channels:read
files:read
groups:read
links:read
reactions:read
remote_files:read
team:read
usergroups:read
users:read
users.profile:read
  1. At the top of the "OAuth & Permissions" page, click Install to Workspace. This will generate a Bot User OAuth Token. Copy this for later if you are using the API token for authentication.
  2. Go to your Slack instance. For any public channel, go to Info, More, and select Add Apps.
  3. Search for your newly created app. (If you are using the desktop version of Slack, you may need to restart Slack for it to pick up the new App). Add the App to all channels you want to sync data from.
note

If you are using an API key to authenticate to Slack, a refresh token is not required, as acccess tokens never expire. You can learn more about refresh tokens here.

Step 2: Set up the Slack connector in Airbyte

For Airbyte Cloud:

  1. In the navigation bar, click Sources.
  2. Click New source.
  3. Find and click Slack.
  4. Click Authenticate your Slack account. Log in and authorize Airbyte to access your Slack account.
  1. Toggle join_channels, if you want to join all public channels or to sync data only from channels the bot is already in. If not set, you'll need to manually add the bot to all the channels from which you'd like to sync messages.
  1. Start Date: Any data before this date will not be extracted.
  1. Threads Lookback window (Days). This corresponds to the number of days in the past from which you want to sync data.
  1. (Optional) Channel filter the list of channel names (without leading '#' char) that limits the channels from which you'd like to sync. If no channels are specified, Airbyte will replicate data from all channels.
  1. (Optional) Include_private_channels Toggle on to sync data from private channels. You will need to manually add the bot to private channels even if join_channels is toggled on.
  1. Click Set up source. You must add the App created in Step 1 to the channels with the data that you want to sync.

For Airbyte Open Source:

  1. In the navigation bar, click Sources.
  2. Click New source.
  3. Find and click Slack.
  4. Click Sign in via Slack (OAuth). Enter the Access Token, Client ID, and Client Secret. Alternatively, enter the API Token from Step 1.
  5. Toggle join_channels, if you want to join all public channels or to sync data only from channels the bot is already in. If not set, you'll need to manually add the bot to all the channels from which you'd like to sync messages.
  6. Start Date: Any data before this date will not be extracted.
  7. Threads Lookback window (Days). This corresponds to the number of days in the past from which you want to sync data.
  8. (Optional) Channel filter the list of channel names (without leading '#' char) that limits the channels from which you'd like to sync. If no channels are specified, Airbyte will replicate data from all channels.
  9. (Optional) Include_private_channels Toggle on to sync data from private channels. You will need to manually add the bot to private channels even if join_channels is toggled on.
  10. Click Set up source. You must add the App created in Step 1 to the channels with the data that you want to sync.

Supported sync modes

The Slack source connector supports the following sync modes:

FeatureSupported?
Full Refresh SyncYes
Incremental SyncYes
NamespacesNo

Supported Streams

For most of the streams, the Slack source connector uses the Conversations API under the hood.

Performance considerations

The connector is restricted by Slack rate limits.

We highly recommend only syncing required channels. This can be done by specifying the channel_filter in the Slack configuration setings.

Data type map

Integration TypeAirbyte Type
stringstring
numbernumber
arrayarray
objectobject

Limitations & Troubleshooting

Expand to see details about Slack connector limitations and troubleshooting.

Connector limitations

Rate limiting

Slack has rate limit restrictions.

Troubleshooting

  • Check out common troubleshooting issues for the Slack source connector on our Airbyte Forum here.

Reference

Config fields reference

Field
Type
Property name
string
start_date
integer
lookback_window
boolean
join_channels
boolean
include_private_channels
array<string>
channel_filter
object
credentials

Changelog

Expand to review
VersionDatePull RequestSubject
1.3.12024-07-2442485Fix MRO error for IncrementalMessageStream
1.3.02024-07-1741994Migrate to CDK v3.5.1
1.2.02024-07-1641970Migrate to CDK v2.4.0
1.1.132024-07-1341863Update dependencies
1.1.122024-07-1041485Update dependencies
1.1.112024-07-0941231Update dependencies
1.1.102024-07-0640839Update dependencies
1.1.92024-06-2540347Update dependencies
1.1.82024-06-2240166Update dependencies
1.1.72025-06-1439343Update state handling for threads Python stream
1.1.62024-06-1239132Respect include_private_channels option in threads stream
1.1.52024-06-1039132Convert string state to float for threads stream
1.1.42024-06-0639271[autopull] Upgrade base image to v1.2.2
1.1.32024-06-0539121Change cursor format for channel_messages stream to %s_as_float
1.1.22024-05-2338619Fix cursor granularity for the channel_messages stream
1.1.12024-05-0236661Schema descriptions
1.1.02024-04-1837332Add the capability to sync from private channels
1.0.02024-04-0235477Migration to low-code CDK
0.4.12024-03-2736579Upgrade airbyte-cdk version to emit record counts as floats
0.4.02024-03-1936267Pin airbyte-cdk version to ^0
0.3.92024-02-1235157Manage dependencies with Poetry
0.3.82024-02-0935131Fixed the issue when schema discovery fails with 502 due to the platform timeout
0.3.72024-01-101234Prepare for airbyte-lib
0.3.62023-11-2132707Threads: do not use client-side record filtering
0.3.52023-10-1931599Base image migration: remove Dockerfile and use the python-connector-base image
0.3.42023-10-0631134Update CDK and remove non iterable return from records
0.3.32023-09-2830580Add bot_id field to threads schema
0.3.22023-09-2030613Set default value for channel_filters during discover
0.3.12023-09-1930570Use default availability strategy
0.3.02023-09-1830521Add unexpected fields to streams channel_messages, channels, threads, users
0.2.02023-05-2426497Fixed lookback window value limitations
0.1.262023-05-1726186Limited the lookback window range for input configuration
0.1.252023-03-2022889Specified date formatting in specification
0.1.242023-03-2024126Increase page size to 1000
0.1.232023-02-2121907Do not join channels that not gonna be synced
0.1.222023-01-2722022Set AvailabilityStrategy for streams explicitly to None
0.1.212023-01-1221321Retry Timeout error
0.1.202022-12-2120767Update schema
0.1.192022-12-0119970Remove OAuth2.0 broken refresh_token support
0.1.182022-09-2817315Always install latest version of Airbyte CDK
0.1.172022-08-2816085Increase unit test coverage
0.1.162022-08-2816050Fix SATs
0.1.152022-03-3111613Add 'channel_filter' config and improve performance
0.1.142022-01-269575Correct schema
0.1.132021-11-087499Remove base-python dependencies
0.1.122021-10-076570Implement OAuth support with OAuth authenticator
0.1.112021-08-275830Fix sync operations hang forever issue
0.1.102021-08-275697Fix max retries issue
0.1.92021-07-204860Fix reading threads issue
0.1.82021-07-144683Add float_ts primary key
0.1.72021-06-253978Release Slack CDK Connector