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

Singer Community

Stitch plan

Standard

API availability

Available

Singer GitHub repository

singer-io/tap-slack

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

  1. Navigate to the Slack App site.
  2. Click Create an App.
  3. Enter a name for the app and select the workspace you want to replicate data from.
  4. 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 add permission by scope or API method menu, expanded, in the Bot Token Scopes section of the Slack App Scopes page

  1. 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.
  2. Click Features > OAuth & Permissions in the left side menu.
  3. Scroll to the Scopes section.
  4. In the Bot Token Scopes section, click the Add an OAuth Scope button.
  5. 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.

  6. 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.

  1. Scroll up to the OAuth Tokens & Redirect URLs section of the OAuth & Permissions page.
  2. In this section, click the Install App to Workspace button.
  3. 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:

The Bot User OAuth Access Token in the Tokens for Your Workspace section of the OAuth Tokens & Redirect URLs App page in Slack

Keep the token readily available for the next step.

Step 2: Add Slack as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the Slack icon.

  4. 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.

  5. In the Token field, paste the bot user OAuth access token you copied from Step 1.4.
  6. 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.
  7. Check the Include private channels box if you’d like to replicate data for private channels in the workspace.
  8. 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:

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:

  1. Individual tables and columns

  2. All tables and columns

Click the tabs to view instructions for each selection method.

  1. In the integration’s Tables to Replicate tab, locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A blue checkmark means the table is set to replicate.

  3. To track a column, click the checkbox next to the column’s name. A blue checkmark means the column is set to replicate.

  4. Repeat this process for all the tables and columns you want to replicate.
  5. When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.
  1. Click into the integration from the Stitch Dashboard page.
  2. Click the Tables to Replicate tab.

  3. In the list of tables, click the box next to the Table Names column.
  4. In the menu that displays, click Track all Tables and Fields:

    The Track all Tables and Fields menu in the Tables to Replicate tab

  5. 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.

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

Replication Method :

Full Table

Primary Key :

id

API endpoint :

conversations.list

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
STRING

The channel ID.

Reference:

channel_id
STRING

created
DATE-TIME

creator
STRING

The ID of the user who created the channel.

Reference:

is_archived
BOOLEAN

is_channel
BOOLEAN

is_ext_shared
BOOLEAN

is_general
BOOLEAN

is_group
BOOLEAN

is_im
BOOLEAN

is_member
BOOLEAN

is_mpim
BOOLEAN

is_org_shared
BOOLEAN

is_pending_ext_shared
BOOLEAN

is_private
BOOLEAN

is_shared
BOOLEAN

members
ARRAY

The channel members.

name
STRING

name_normalized
STRING

num_members
INTEGER

parent_conversation
STRING

pending_connected_team_ids
ARRAY

pending_shared
ARRAY

value
STRING

channels (table), pending_shared (attribute)

previous_names
ARRAY

value
STRING

channels (table), previous_names (attribute)

purpose
OBJECT

creator
STRING

last_set
DATE-TIME

value
STRING

channels (table), purpose (attribute)

shared_team_ids
ARRAY

topic
OBJECT

creator
STRING

last_set
DATE-TIME

value
STRING

channels (table), topic (attribute)

unlinked
DATE-TIME


Replication Method :

Full Table

Primary Key :

channel_id : user_id

API endpoint :

conversation.members

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.


Replication Method :

Key-based Incremental

Replication Key :

updated

Primary Key :

id

API endpoint :

files.list

The files table contains info about Slack team files.

id
STRING

The file ID.

Reference:

updated
DATE-TIME

The time the file was last updated.

channels
ARRAY

The channels the file was shared in.

comments_count
INTEGER

created
DATE-TIME

date_delete
DATE-TIME

display_as_bot
BOOLEAN

editable
BOOLEAN

editor
STRING

external_id
STRING

external_type
STRING

external_url
URI

filetype
STRING

groups
ARRAY

files (table), groups (attribute)

has_rich_preview
BOOLEAN

image_exif_rotation
INTEGER

ims
ARRAY

value
STRING

files (table), ims (attribute)

is_external
BOOLEAN

is_public
BOOLEAN

is_starred
BOOLEAN

is_tombstoned
BOOLEAN

last_editor
STRING

mimetype
STRING

mode
STRING

name
STRING

non_owner_editable
BOOLEAN

num_stars
INTEGER

original_h
INTEGER

original_w
INTEGER

permalink
URI

permalink_public
URI

pinned_info
OBJECT

pinned_to
ARRAY

The channels the file is currently pinned to.

pretty_type
STRING

preview
STRING

public_url_shared
BOOLEAN

size
INTEGER

source_team
STRING

The source’s team ID.

Reference:

state
STRING

thumb_1024
URI

thumb_1024_h
INTEGER

thumb_1024_w
INTEGER

thumb_160
URI

thumb_360
URI

thumb_360_h
INTEGER

thumb_360_w
INTEGER

thumb_480
URI

thumb_480_h
INTEGER

thumb_480_w
INTEGER

thumb_64
URI

thumb_720
URI

thumb_720_h
INTEGER

thumb_720_w
INTEGER

thumb_80
URI

thumb_800
URI

thumb_800_h
INTEGER

thumb_800_w
INTEGER

thumb_960
URI

thumb_960_h
INTEGER

thumb_960_w
INTEGER

thumb_tiny
STRING

timestamp
DATE-TIME

title
STRING

updated
DATE-TIME

url_private
URI

url_private_download
URI

user
STRING

The ID of the user who shared the file.

Reference:

user_team
STRING

The team ID of the user who shared the file.

Reference:

username
STRING


Replication Method :

Key-based Incremental

Replication Key :

ts

Primary Key :

channel_id : ts

API endpoint :

conversations.history

The messages table contains the history of messages and events in conversations in your Slack workspace.

channel_id
STRING

The channel ID.

Reference:

ts
DATE-TIME

The conversation timestamp.

blocks
ARRAY

type
STRING

messages (table), blocks (attribute)

bot_id
STRING

bot_profile
OBJECT

client_msg_id
STRING

display_as_bot
BOOLEAN

file_id
STRING

file_ids
ARRAY

The IDs of files associated with the conversation.

value
STRING

The file ID.

Reference:

messages (table), file_ids (attribute)

icons
OBJECT

emoji
STRING

messages (table), icons (attribute)

inviter
STRING

is_delayed_message
BOOLEAN

is_intro
BOOLEAN

is_starred
BOOLEAN

last_read
DATE-TIME

latest_reply
STRING

name
STRING

old_name
STRING

parent_user_id
STRING

permalink
URI

pinned_to
ARRAY

The channels the message is pinned to.

purpose
STRING

reactions
ARRAY

reply_count
INTEGER

reply_users
ARRAY

reply_users_count
INTEGER

source_team
STRING

Reference:

subscribed
BOOLEAN

subtype
STRING

team
STRING

The team ID.

Reference:

text
STRING

thread_ts
STRING

topic
STRING

type
STRING

unread_count
INTEGER

upload
BOOLEAN

user
STRING

The user ID.

Reference:

user_team
STRING

The user’s team ID.

Reference:

username
STRING


Replication Method :

Key-based Incremental

Replication Key :

updated

Primary Key :

id

API endpoint :

files.remote.list

The remote_files table contains info about remote files added to Slack.

id
STRING

The remote file ID.

updated
DATE-TIME

The time the file was last updated.

channels
ARRAY

The channels the remote file was shared in.

comments_count
INTEGER

created
DATE-TIME

date_delete
DATE-TIME

display_as_bot
BOOLEAN

editable
BOOLEAN

editor
STRING

external_id
STRING

external_type
STRING

external_url
URI

filetype
STRING

groups
ARRAY

remote_files (table), groups (attribute)

has_rich_preview
BOOLEAN

image_exif_rotation
INTEGER

ims
ARRAY

value
STRING

remote_files (table), ims (attribute)

is_external
BOOLEAN

is_public
BOOLEAN

is_starred
BOOLEAN

is_tombstoned
BOOLEAN

last_editor
STRING

mimetype
STRING

mode
STRING

name
STRING

non_owner_editable
BOOLEAN

num_stars
INTEGER

original_h
INTEGER

original_w
INTEGER

permalink
URI

permalink_public
URI

pinned_info
OBJECT

pinned_to
ARRAY

pretty_type
STRING

preview
STRING

public_url_shared
BOOLEAN

size
INTEGER

source_team
STRING

The source’s team ID.

Reference:

state
STRING

thumb_1024
URI

thumb_1024_h
INTEGER

thumb_1024_w
INTEGER

thumb_160
URI

thumb_360
URI

thumb_360_h
INTEGER

thumb_360_w
INTEGER

thumb_480
URI

thumb_480_h
INTEGER

thumb_480_w
INTEGER

thumb_64
URI

thumb_720
URI

thumb_720_h
INTEGER

thumb_720_w
INTEGER

thumb_80
URI

thumb_800
URI

thumb_800_h
INTEGER

thumb_800_w
INTEGER

thumb_960
URI

thumb_960_h
INTEGER

thumb_960_w
INTEGER

thumb_tiny
STRING

timestamp
DATE-TIME

title
STRING

url_private
URI

url_private_download
URI

user
STRING

The ID of the user who shared the remote file.

Reference:

user_team
STRING

The ID of the team that the user belongs to.

Reference:

username
STRING


Replication Method :

Full Table

Primary Key :

None

API endpoint :

team.info

The teams table contains info about teams in your Slack workspace.

id
STRING

The team ID.

Reference:

archived
BOOLEAN

avatar_base_url
URI

created
DATE-TIME

date_create
DATE-TIME

deleted
DATE-TIME

description
STRING

discoverable
STRING

domain
STRING

email_domain
STRING

enterprise_id
STRING

enterprise_name
STRING

has_compliance_export
BOOLEAN

icon
OBJECT

image_102
STRING

image_132
STRING

image_230
STRING

image_34
STRING

image_44
STRING

image_68
STRING

image_88
STRING

image_default
BOOLEAN

teams (table), icon (attribute)

is_assigned
BOOLEAN

is_enterprise
INTEGER

messages_count
INTEGER

msg_edit_window_mins
INTEGER

name
STRING

over_integrations_limit
BOOLEAN

over_storage_limit
BOOLEAN

plan
STRING


Replication Method :

Full Table

Primary Key :

channel_id : thread_ts

API endpoint :

conversations.replies

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
STRING

The channel ID.

Reference:

thread_ts
STRING

The conversation thread timestamp.

ts
DATE-TIME

The conversation timestamp.

blocks
ARRAY

type
STRING

threads (table), blocks (attribute)

client_msg_id
STRING

latest_reply
STRING

reply_count
INTEGER

reply_users
ARRAY

The IDs of users who replied in the thread.

reply_users_count
NUMBER

subscribed
BOOLEAN

team
STRING

The team ID.

Reference:

text
STRING

type
STRING

user
STRING

The ID of the user who created the thread.

Reference:


Replication Method :

Key-based Incremental

Replication Key :

updated

Primary Key :

id

API endpoint :

users.list

The users table lists contains info about the users in your Slack team. This includes deactivated and deleted users.

id
STRING

The user ID.

Reference:

updated
DATE-TIME

The time the user was last updated.

color
STRING

deleted
BOOLEAN

has_2fa
BOOLEAN

is_admin
BOOLEAN

is_app_user
BOOLEAN

is_bot
BOOLEAN

is_owner
BOOLEAN

is_primary_owner
BOOLEAN

is_restricted
BOOLEAN

is_ultra_restricted
BOOLEAN

name
STRING

profile
OBJECT

email
STRING

users (table), profile (attribute)

real_name
STRING

team_id
STRING

The ID of the team the user belongs to.

Reference:

tz
STRING

tz_label
STRING

tz_offset
INTEGER


Replication Method :

Full Table

Primary Key :

id

API endpoint :

usergroups.list

The user_groups table contains info about user groups from your Slack team.

id
STRING

The user group ID.

Reference:

created
DATE-TIME

creator
STRING

is_archived
BOOLEAN

is_deleted
BOOLEAN

is_group
BOOLEAN

is_moved
INTEGER

is_mpim
BOOLEAN

is_open
BOOLEAN

is_pending_ext_shared
BOOLEAN

is_read_only
BOOLEAN

is_thread_only
BOOLEAN

last_read
DATE-TIME

members
ARRAY

The user IDs of members belonging to the user group.

name
STRING

name_normalized
STRING

num_members
INTEGER

parent_group
STRING

The parent group ID.

Reference:

priority
NUMBER

purpose
OBJECT

topic
OBJECT

unread_count
INTEGER

unread_count_display
INTEGER



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.