# Slack
The tap-slack
extractor pulls data from the Slack API.
- Repository: https://github.com/Mashey/tap-slack
- Maintainer: Mashey
- Maintenance status: Active
# Getting Started
# Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
# Installation and configuration
# Using the Command Line Interface
Add the
tap-slack
extractor to your project usingmeltano add
:meltano add extractor tap-slack
Configure the settings below using
meltano config
.
# Using Meltano UI
Start Meltano UI using
meltano ui
:meltano ui
Open the Extractors interface at http://localhost:5000/extractors.
Click the "Add to project" button for "Slack".
Configure the settings below in the "Configuration" interface that opens automatically.
# Next steps
Follow the remaining steps of the Getting Started guide:
- Select entities and attributes to extract
- Add a loader to send data to a destination
- Run a data integration (EL) pipeline
If you run into any issues, learn how to get help.
# Settings
tap-slack
requires the configuration of the following setting:
This and other supported settings are documented below. To quickly find the setting you're looking for, use the Table of Contents in the sidebar.
# Minimal configuration
A minimal configuration of tap-slack
in your meltano.yml
project file will look like this:
plugins:
extractors:
- name: tap-slack
variant: mashey
start_date: '2020-10-01T00:00:00Z'
Sensitive values are most appropriately stored in the environment or your project's .env
file:
export TAP_SLACK_API_TOKEN=my_api_token
# API Token
- Name:
api_token
- Environment variable:
TAP_SLACK_API_TOKEN
Your Slack API Token. To obtain a token for a single workspace you will need to create a Slack App in your workspace and assigning it the relevant scopes. The minimum required scopes for the tap are:
channels:history
channels:join
channels:read
files:read
groups:read
links:read
reactions:read
remote_files:read
remote_files:write
team:read
usergroups:read
users.profile:read
users:read
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set api_token <api_token>
export TAP_SLACK_API_TOKEN=<api_token>
# Channels
- Name:
channels
- Environment variable:
TAP_SLACK_CHANNELS
Optionally specify specific channels to sync. By default the tap will sync all channels it has been invited to, but this can be overriden using this configuration. Note that the values need to be channel ID, not the name, as recommended by the Slack API. To get the ID for a channel, either use the Slack API or find it in the URL.
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set channels '["<channelid>", ...]'
export TAP_SLACK_CHANNELS='["<channelid>", ...]'
# Private Channels
- Name:
private_channels
- Environment variable:
TAP_SLACK_PRIVATE_CHANNELS
- Default:
true
Specifies whether to sync private channels or not. Default is true.
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set private_channels false
export TAP_SLACK_PRIVATE_CHANNELS=false
# Public Channels
- Name:
join_public_channels
- Environment variable:
TAP_SLACK_JOIN_PUBLIC_CHANNELS
- Default:
false
Specifies whether to have the tap auto-join all public channels in your ogranziation. Default is false.
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set join_public_channels true
export TAP_SLACK_JOIN_PUBLIC_CHANNELS=true
# Archived Channels
- Name:
archived_channels
- Environment variable:
TAP_SLACK_ARCHIVED_CHANNELS
- Default:
false
Specifies whether the tap will sync archived channels or not. Note that a bot cannot join an archived channel, so unless the bot was added to the channel prior to it being archived it will not be able to sync the data from that channel. Default is false.
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set archived_channels true
export TAP_SLACK_ARCHIVED_CHANNELS=true
# Date Window Size
- Name:
date_window_size
- Environment variable:
TAP_SLACK_DATE_WINDOW_SIZE
- Default:
7
Specifies the window size for syncing certain streams (messages, files, threads). The default is 7 days.
# How to use
Manage this setting using Meltano UI, meltano config
, or an environment variable:
meltano config tap-slack set date_window_size <integer>
export TAP_SLACK_DATE_WINDOW_SIZE=<integer>