Slack is currently in beta. The info in this guide is subject to change.
This integration is powered by Singer's Slack tap. For support, visit the GitHub repo or join the Singer Slack.
Slack integration summary
Stitch’s Slack integration replicates data from a single Slack workspace using the Slack Web API. To replicate data from multiple workspaces, create an additional Slack integration for each workspace.
Refer to the Schema section for a list of objects available for replication.
Slack feature snapshot
A high-level look at Stitch's Slack (v1) integration, including release status, useful links, and the features supported in Stitch.
STITCH | |||
Release status |
Beta |
Supported by | |
Stitch plan |
Standard |
API availability |
Available |
Singer GitHub repository | |||
REPLICATION SETTINGS | |||
Anchor Scheduling |
Supported |
Advanced Scheduling |
Supported |
Table-level reset |
Unsupported |
Configurable Replication Methods |
Unsupported |
DATA SELECTION | |||
Table selection |
Supported |
Column selection |
Supported |
Select all |
Supported |
||
TRANSPARENCY | |||
Extraction Logs |
Supported |
Loading Reports |
Supported |
Connecting Slack
Step 1: Create a Slack app and retrieve a verification token
Step 1.1: Create the app
- Navigate to the Slack App site.
- Click Create an App.
- Enter a name for the app and select the workspace you want to replicate data from.
- Click Create App.
Step 1.2: Grant relevant scopes to the app
Next, you’ll grant the required permissions to the app you created in the previous step.
- The app you created should be selected in the drop-down menu near the top-left corner of the page. If it isn’t, select it.
- Click Features > OAuth & Permissions in the left side menu.
- Scroll to the Scopes section.
- In the Bot Token Scopes section, click the Add an OAuth Scope button.
- In the field that appears, search for the following scopes:
channels:history
channels:join
channels:read
files:read
groups:read
links:read
reactions:read
remote_files:read
remote_files:write
team:read
useergroups:read
users.profile:read
users:read
users:read.email
Slack will automatically save the changes each time a scope is added.
- Repeat steps 4 and 5 until all the scopes have been added.
Step 1.3: Install the app to your workspace
After the required scopes are added to the app, you’ll need to install it to your Slack workspace. This is required to successfully connect to Stitch.
- Scroll up to the OAuth Tokens & Redirect URLs section of the OAuth & Permissions page.
- In this section, click the Install App to Workspace button.
- Complete the steps that follow to install the app or submit a request to your Workspace Owner(s) for approval.
Step 1.4: Retrieve the app's bot user OAuth access token
After the app is successfully installed to your Slack workspace, a Tokens for Your Workspace section containing a Bot User OAuth Access Token field will display on the page:
Keep the token readily available for the next step.
Step 2: Add Slack as a Stitch data source
- Sign into your Stitch account.
-
On the Stitch Dashboard page, click the Add Integration button.
-
Click the Slack icon.
-
Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.
For example, the name “Stitch Slack” would create a schema called
stitch_slack
in the destination. Note: Schema names cannot be changed after you save the integration. - In the Token field, paste the bot user OAuth access token you copied from Step 1.4.
- Check the Join public channels box if you’d like to replicate data for all public channels in the workspace you’re connecting. Otherwise, only data for channels you’ve personally joined will be replicated.
- Check the Include private channels box if you’d like to replicate data for private channels in the workspace.
- Check the Exclude archived channels box if you don’t want to replicate data from archived channels.
Step 3: Define the historical replication start date
The Sync Historical Data setting defines the starting date for your Slack integration. This means that:
- For tables using Key-based Incremental Replication, data equal to or newer than this date will be replicated to your destination.
- For tables using Full Table Replication, all data - including records that are older, equal to, or newer than this date - will be replicated to your destination.
Change this setting if you want to replicate data beyond Slack’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.
Step 4: Create a replication schedule
In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.
Slack integrations support the following replication scheduling methods:
-
Advanced Scheduling using Cron (Advanced or Premium plans only)
To keep your row usage low, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.
Step 5: Set objects to replicate
The last step is to select the tables and columns you want to replicate. Learn about the available tables for this integration.
Note: If a replication job is currently in progress, new selections won’t be used until the next job starts.
For Slack integrations, you can select:
-
Individual tables and columns
-
All tables and columns
Click the tabs to view instructions for each selection method.
- In the integration’s Tables to Replicate tab, locate a table you want to replicate.
-
To track a table, click the checkbox next to the table’s name. A blue checkmark means the table is set to replicate.
-
To track a column, click the checkbox next to the column’s name. A blue checkmark means the column is set to replicate.
- Repeat this process for all the tables and columns you want to replicate.
- When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.
- Click into the integration from the Stitch Dashboard page.
-
Click the Tables to Replicate tab.
- In the list of tables, click the box next to the Table Names column.
-
In the menu that displays, click Track all Tables and Fields:
- Click the Finalize Your Selections button at the bottom of the page to save your data selections.
Initial and historical replication jobs
After you finish setting up Slack, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.
For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.
Initial replication jobs with Anchor Scheduling
If using Anchor Scheduling, an initial replication job may not kick off immediately. This depends on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.
Free historical data loads
The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.
Slack replication
Workspace replication
Stitch can only replicate data from one Slack workspace at a time. In order to replicate multiple workspaces, you will need to create integrations for each workspace.
Slack table reference
Schemas and versioning
Schemas and naming conventions can change from version to version, so we recommend verifying your integration’s version before continuing.
The schema and info displayed below is for version 1 of this integration.
This is the latest version of the Slack integration.
Table and column names in your destination
Depending on your destination, table and column names may not appear as they are outlined below.
For example: Object names are lowercased in Redshift (CusTomERs
> customers
), while case is maintained in PostgreSQL destinations (CusTomERs
> CusTomERs
). Refer to the Loading Guide for your destination for more info.
channels
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The channels
table contains info about the channels in your Slack workspace. This includes conversations, channels, and direct messages.
Note: Some types of channels - for example, private or archived channels - will be replicated only if the appropriate settings are configured in the integration’s settings. Refer to the Slack setup steps for more info.
id
The channel ID. Reference: |
|||
channel_id
|
|||
created
|
|||
creator
The ID of the user who created the channel. Reference: |
|||
is_archived
|
|||
is_channel
|
|||
is_ext_shared
|
|||
is_general
|
|||
is_group
|
|||
is_im
|
|||
is_member
|
|||
is_mpim
|
|||
is_org_shared
|
|||
is_pending_ext_shared
|
|||
is_private
|
|||
is_shared
|
|||
members
The channel members.
|
|||
name
|
|||
name_normalized
|
|||
num_members
|
|||
parent_conversation
|
|||
pending_connected_team_ids
|
|||
pending_shared
|
|||
previous_names
|
|||
purpose
|
|||
shared_team_ids
|
|||
topic
|
|||
unlinked
|
channel_members
Replication Method : |
Full Table |
Primary Key |
channel_id : user_id |
API endpoint : |
The channel_members
table contain info about members of channels in your Slack workspace. Channels include conversations, channels, and direct messages in your Slack workspace.
channel_id
The channel ID. Reference: |
user_id
The user ID. Reference: |
Replication Method : |
Key-based Incremental |
Replication Key |
updated |
Primary Key |
id |
API endpoint : |
The files
table contains info about Slack team files.
id
The file ID. Reference: |
|
updated
The time the file was last updated. |
|
channels
The channels the file was shared in.
|
|
comments_count
|
|
created
|
|
date_delete
|
|
display_as_bot
|
|
editable
|
|
editor
|
|
external_id
|
|
external_type
|
|
external_url
|
|
filetype
|
|
groups
|
|
has_rich_preview
|
|
image_exif_rotation
|
|
ims
|
|
is_external
|
|
is_public
|
|
is_starred
|
|
is_tombstoned
|
|
last_editor
|
|
mimetype
|
|
mode
|
|
name
|
|
non_owner_editable
|
|
num_stars
|
|
original_h
|
|
original_w
|
|
permalink
|
|
permalink_public
|
|
pinned_info
|
|
pinned_to
The channels the file is currently pinned to. |
|
pretty_type
|
|
preview
|
|
public_url_shared
|
|
size
|
|
source_team
The source’s team ID. Reference: |
|
state
|
|
thumb_1024
|
|
thumb_1024_h
|
|
thumb_1024_w
|
|
thumb_160
|
|
thumb_360
|
|
thumb_360_h
|
|
thumb_360_w
|
|
thumb_480
|
|
thumb_480_h
|
|
thumb_480_w
|
|
thumb_64
|
|
thumb_720
|
|
thumb_720_h
|
|
thumb_720_w
|
|
thumb_80
|
|
thumb_800
|
|
thumb_800_h
|
|
thumb_800_w
|
|
thumb_960
|
|
thumb_960_h
|
|
thumb_960_w
|
|
thumb_tiny
|
|
timestamp
|
|
title
|
|
updated
|
|
url_private
|
|
url_private_download
|
|
user
The ID of the user who shared the file. Reference: |
|
user_team
The team ID of the user who shared the file. Reference: |
|
username
|
messages
Replication Method : |
Key-based Incremental |
Replication Key |
ts |
Primary Key |
channel_id : ts |
API endpoint : |
The messages
table contains the history of messages and events in conversations in your Slack workspace.
channel_id
The channel ID. Reference: |
||||||
ts
The conversation timestamp. |
||||||
blocks
|
||||||
bot_id
|
||||||
bot_profile
|
||||||
client_msg_id
|
||||||
display_as_bot
|
||||||
file_id
|
||||||
file_ids
The IDs of files associated with the conversation.
|
||||||
icons
|
||||||
inviter
|
||||||
is_delayed_message
|
||||||
is_intro
|
||||||
is_starred
|
||||||
last_read
|
||||||
latest_reply
|
||||||
name
|
||||||
old_name
|
||||||
parent_user_id
|
||||||
permalink
|
||||||
pinned_to
The channels the message is pinned to. |
||||||
purpose
|
||||||
reactions
|
||||||
reply_count
|
||||||
reply_users
|
||||||
reply_users_count
|
||||||
source_team
Reference: |
||||||
subscribed
|
||||||
subtype
|
||||||
team
The team ID. Reference: |
||||||
text
|
||||||
thread_ts
|
||||||
topic
|
||||||
type
|
||||||
unread_count
|
||||||
upload
|
||||||
user
The user ID. Reference: |
||||||
user_team
The user’s team ID. Reference: |
||||||
username
|
remote_files
Replication Method : |
Key-based Incremental |
Replication Key |
updated |
Primary Key |
id |
API endpoint : |
The remote_files
table contains info about remote files added to Slack.
id
The remote file ID. |
|
updated
The time the file was last updated. |
|
channels
The channels the remote file was shared in.
|
|
comments_count
|
|
created
|
|
date_delete
|
|
display_as_bot
|
|
editable
|
|
editor
|
|
external_id
|
|
external_type
|
|
external_url
|
|
filetype
|
|
groups
|
|
has_rich_preview
|
|
image_exif_rotation
|
|
ims
|
|
is_external
|
|
is_public
|
|
is_starred
|
|
is_tombstoned
|
|
last_editor
|
|
mimetype
|
|
mode
|
|
name
|
|
non_owner_editable
|
|
num_stars
|
|
original_h
|
|
original_w
|
|
permalink
|
|
permalink_public
|
|
pinned_info
|
|
pinned_to
|
|
pretty_type
|
|
preview
|
|
public_url_shared
|
|
size
|
|
source_team
The source’s team ID. Reference: |
|
state
|
|
thumb_1024
|
|
thumb_1024_h
|
|
thumb_1024_w
|
|
thumb_160
|
|
thumb_360
|
|
thumb_360_h
|
|
thumb_360_w
|
|
thumb_480
|
|
thumb_480_h
|
|
thumb_480_w
|
|
thumb_64
|
|
thumb_720
|
|
thumb_720_h
|
|
thumb_720_w
|
|
thumb_80
|
|
thumb_800
|
|
thumb_800_h
|
|
thumb_800_w
|
|
thumb_960
|
|
thumb_960_h
|
|
thumb_960_w
|
|
thumb_tiny
|
|
timestamp
|
|
title
|
|
url_private
|
|
url_private_download
|
|
user
The ID of the user who shared the remote file. Reference: |
|
user_team
The ID of the team that the Reference: |
|
username
|
Replication Method : |
Full Table |
Primary Key |
None |
API endpoint : |
The teams
table contains info about teams in your Slack workspace.
id
The team ID. Reference: |
||||||||
archived
|
||||||||
avatar_base_url
|
||||||||
created
|
||||||||
date_create
|
||||||||
deleted
|
||||||||
description
|
||||||||
discoverable
|
||||||||
domain
|
||||||||
email_domain
|
||||||||
enterprise_id
|
||||||||
enterprise_name
|
||||||||
has_compliance_export
|
||||||||
icon
|
||||||||
is_assigned
|
||||||||
is_enterprise
|
||||||||
messages_count
|
||||||||
msg_edit_window_mins
|
||||||||
name
|
||||||||
over_integrations_limit
|
||||||||
over_storage_limit
|
||||||||
plan
|
threads
Replication Method : |
Full Table |
Primary Key |
channel_id : thread_ts |
API endpoint : |
The threads
table contains info about conversation threads in your Slack team.
Note: While this table uses Full Table, it’s not truly replicated in full during each replication job. Each time a message in a thread is updated, the entire thread and all the messages it contains will be replicated in full. This means that while only updated threads are replicated, they are replicated in full whenever they’re updated.
channel_id
The channel ID. Reference: |
|
thread_ts
The conversation thread timestamp. |
|
ts
The conversation timestamp. |
|
blocks
|
|
client_msg_id
|
|
latest_reply
|
|
reply_count
|
|
reply_users
The IDs of users who replied in the thread.
|
|
reply_users_count
|
|
subscribed
|
|
team
The team ID. Reference: |
|
text
|
|
type
|
|
user
The ID of the user who created the thread. Reference: |
Replication Method : |
Key-based Incremental |
Replication Key |
updated |
Primary Key |
id |
API endpoint : |
The users
table lists contains info about the users in your Slack team. This includes deactivated and deleted users.
id
The user ID. Reference: |
updated
The time the user was last updated. |
color
|
deleted
|
has_2fa
|
is_admin
|
is_app_user
|
is_bot
|
is_owner
|
is_primary_owner
|
is_restricted
|
is_ultra_restricted
|
name
|
profile
|
real_name
|
team_id
The ID of the team the user belongs to. Reference: |
tz
|
tz_label
|
tz_offset
|
user_groups
Replication Method : |
Full Table |
Primary Key |
id |
API endpoint : |
The user_groups
table contains info about user groups from your Slack team.
id
The user group ID. Reference: |
|||
created
|
|||
creator
|
|||
is_archived
|
|||
is_deleted
|
|||
is_group
|
|||
is_moved
|
|||
is_mpim
|
|||
is_open
|
|||
is_pending_ext_shared
|
|||
is_read_only
|
|||
is_thread_only
|
|||
last_read
|
|||
members
The user IDs of members belonging to the user group.
|
|||
name
|
|||
name_normalized
|
|||
num_members
|
|||
parent_group
The parent group ID. Reference: |
|||
priority
|
|||
purpose
|
|||
topic
|
|||
unread_count
|
|||
unread_count_display
|
Related | Troubleshooting |
Questions? Feedback?
Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.