# Slack

### Connect to Slack

1\. Go to the **Resources** page and click the <img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2Fct5RJC2cjHhrvymOWWGx%2Fimage.png?alt=media&#x26;token=b4ff0c44-5510-49d1-97dd-a155af254113" alt="" data-size="line">  button.&#x20;

2\. Select **Slack**.

3\. Enter your account credentials and click **Connect**.&#x20;

* **`API Token`**: Follow the instructions [here](#setup-guide) to generate API Key.&#x20;
* **`Join all channels`**: Whether to join all channels or to sync data only from channels the bot is already in. If false, you'll need to manually add the bot to all the channels from which you'd like to sync messages.
* **`Channel name filter`**: A channel name list (without leading '#' char) which limit the channels from which you'd like to sync. Empty list means no filter.
* Threads Lookback window
* **`Start Date`**: Retrieve data after this date. The date should be UTC date and time in the format 2017-01-25T00:00:00Z.

4\. Choose tables to import and click **Finish Setup**.&#x20;

5\. You will see a  <img src="https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MB_fx7PCUqvFEdrucJC%2F-MgBh5PshcmRFk38itib%2F-MgBo4LSmdK4OS-NqLZy%2Fsyncing.png?alt=media&#x26;token=452494f9-e4be-48fa-9644-bee7d969c46c" alt="" data-size="line"> icon next to your resource. It may take a few minutes to several hours depending on the data size and the number of your tables. Once your data is ready, you will receive a notification email.&#x20;

### Get API Token[​](https://docs.airbyte.com/integrations/sources/slack#setup-guide) <a href="#setup-guide" id="setup-guide"></a>

1\. Go to the [apps page](https://api.slack.com/apps).

2\. Click **Create New App**. Then, configure the name and the workspace where you want to pull data. (If you already had an app, just click the app)

3\. Navigate to **Features** > **OAuth & Permissions**.

4\. Go to the Scopes section, click **Add an OAuth Scope** under **Bot Token Scopes**. And add the following scopes:

![](https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2FgGUPcDVFxp4j4r5Axpbl%2Fimage.png?alt=media\&token=073a9baf-5a3f-41ca-bf65-a90c28c0abf5)

5\. Scroll to the top of the page, click **Install to Workspace**, and click **Allow**.&#x20;

![](https://3574406564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MB_fx7PCUqvFEdrucJC%2Fuploads%2FE7gsYghEK1wObAdQvz1J%2Fimage.png?alt=media\&token=76ffe4a1-46cb-4c53-ad42-faa6c4b5ed50)

6\. Copy **Bot User OAuth Access Token**.

7\. Go to your slack workspace. For any public channel go to **info > more > add apps**. In the search bar search for the name of your app. (If using the desktop version of slack, you may need to restart Slack for it to pick up the new app). Slack will only replicate messages from channels that the Slack bot has been added to.

<img src="https://docs.airbyte.com/assets/images/slack-add-apps-f6bcb8744c2af9e1475747a43cc0c644.png" alt="" data-size="original">

8\. Go to Acho and paste your **Bot User OAuth Access Token** to **`API Token`** in your Slack configuration.

### Supported table <a href="#output-schema" id="output-schema"></a>

* [Channels (Conversations)](https://api.slack.com/methods/conversations.list)
* [Channel Members (Conversation Members)](https://api.slack.com/methods/conversations.members)
* [Messages (Conversation History)](https://api.slack.com/methods/conversations.history) It will only replicate messages from non-archive, public channels that the Slack App is a member of.
* [Users](https://api.slack.com/methods/users.list)
* [Threads (Conversation Replies)](https://api.slack.com/methods/conversations.replies)
* [User Groups](https://api.slack.com/methods/usergroups.list)
* [Files](https://api.slack.com/methods/files.list)
* [Remote Files](https://api.slack.com/methods/files.remote.list)
